tdesktop/Telegram/SourceFiles/api/api_premium.h

38 lines
766 B
C
Raw Normal View History

2022-05-31 17:11:59 +00:00
/*
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"
class ApiWrap;
namespace Main {
class Session;
} // namespace Main
namespace Api {
class Premium final {
public:
explicit Premium(not_null<ApiWrap*> api);
void reload();
[[nodiscard]] rpl::producer<TextWithEntities> statusTextValue() const;
private:
const not_null<Main::Session*> _session;
MTP::Sender _api;
mtpRequestId _statusRequestId = 0;
std::optional<TextWithEntities> _statusText;
rpl::event_stream<TextWithEntities> _statusTextUpdates;
};
} // namespace Api