/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once #include "mtproto/sender.h" namespace Core { struct CloudPasswordState; } // namespace Core class ApiWrap; namespace Main { class Session; } // namespace Main namespace Api { class CloudPassword final { public: using ResetRetryDate = int; explicit CloudPassword(not_null api); void reload(); void clearUnconfirmedPassword(); rpl::producer state() const; std::optional stateCurrent() const; rpl::producer resetPassword(); rpl::producer cancelResetPassword(); private: MTP::Sender _api; mtpRequestId _requestId = 0; std::unique_ptr _state; rpl::event_stream _stateChanges; }; } // namespace Api