38 lines
766 B
C
38 lines
766 B
C
|
/*
|
||
|
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
|