/* 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 class UserData; namespace Ui { class Show; } // namespace Ui namespace Core { struct CloudPasswordResult; } // namespace Core class PasscodeBox; class ChannelOwnershipTransfer { public: ChannelOwnershipTransfer( not_null peer, not_null selectedUser, std::shared_ptr show, Fn)> onSuccess = nullptr); void start(); private: bool handleTransferPasswordError(const QString &error); void requestPassword(); void sendRequest( base::weak_qptr box, const Core::CloudPasswordResult &result); const not_null _peer; const not_null _selectedUser; const std::shared_ptr _show; const Fn)> _onSuccess; rpl::lifetime _lifetime; };