api_confirm_phone.h 703 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "mtproto/sender.h"
  9. class ApiWrap;
  10. namespace Window {
  11. class SessionController;
  12. } // namespace Window
  13. namespace Api {
  14. class ConfirmPhone final {
  15. public:
  16. explicit ConfirmPhone(not_null<ApiWrap*> api);
  17. void resolve(
  18. not_null<Window::SessionController*> controller,
  19. const QString &phone,
  20. const QString &hash);
  21. private:
  22. MTP::Sender _api;
  23. mtpRequestId _sendRequestId = 0;
  24. mtpRequestId _checkRequestId = 0;
  25. };
  26. } // namespace Api