2018-12-31 20:04:05 +01:00
|
|
|
//
|
2021-01-01 13:57:46 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
|
2018-12-31 20:04:05 +01:00
|
|
|
//
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
//
|
|
|
|
#pragma once
|
|
|
|
|
2019-03-27 19:43:46 +01:00
|
|
|
#include "td/telegram/files/FileId.h"
|
2018-07-02 22:36:45 +02:00
|
|
|
#include "td/telegram/net/MtprotoHeader.h"
|
2018-12-31 20:04:05 +01:00
|
|
|
#include "td/telegram/net/NetQuery.h"
|
2020-07-30 21:59:23 +02:00
|
|
|
#include "td/telegram/net/NetQueryStats.h"
|
2018-12-31 20:04:05 +01:00
|
|
|
#include "td/telegram/StateManager.h"
|
|
|
|
#include "td/telegram/TdCallback.h"
|
|
|
|
#include "td/telegram/TdParameters.h"
|
2018-06-08 00:19:34 +02:00
|
|
|
#include "td/telegram/TermsOfService.h"
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
#include "td/telegram/td_api.h"
|
2020-04-30 21:21:42 +02:00
|
|
|
#include "td/telegram/telegram_api.h"
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
#include "td/actor/actor.h"
|
2018-10-01 04:22:56 +02:00
|
|
|
#include "td/actor/PromiseFuture.h"
|
2018-12-31 20:04:05 +01:00
|
|
|
#include "td/actor/Timeout.h"
|
|
|
|
|
2019-01-06 20:59:17 +01:00
|
|
|
#include "td/db/DbKey.h"
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
#include "td/utils/buffer.h"
|
|
|
|
#include "td/utils/common.h"
|
|
|
|
#include "td/utils/Container.h"
|
|
|
|
#include "td/utils/logging.h"
|
|
|
|
#include "td/utils/Slice.h"
|
|
|
|
#include "td/utils/Status.h"
|
|
|
|
|
2020-08-23 21:45:48 +02:00
|
|
|
#ifdef __linux__
|
|
|
|
#include <malloc.h>
|
|
|
|
#endif
|
|
|
|
#ifdef _WIN32
|
|
|
|
#include <malloc.h>
|
|
|
|
#endif
|
2018-12-31 20:04:05 +01:00
|
|
|
#include <memory>
|
2018-02-11 16:58:18 +01:00
|
|
|
#include <unordered_map>
|
2018-12-31 20:04:05 +01:00
|
|
|
#include <unordered_set>
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
namespace td {
|
2018-05-08 22:02:15 +02:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
class AnimationsManager;
|
|
|
|
class AudiosManager;
|
|
|
|
class AuthManager;
|
2019-05-07 04:51:56 +02:00
|
|
|
class BackgroundManager;
|
2018-12-31 20:04:05 +01:00
|
|
|
class CallManager;
|
|
|
|
class CallbackQueriesManager;
|
|
|
|
class ConfigManager;
|
|
|
|
class ContactsManager;
|
2020-08-23 23:43:31 +02:00
|
|
|
class CountryInfoManager;
|
2018-12-31 20:04:05 +01:00
|
|
|
class DeviceTokenManager;
|
|
|
|
class DocumentsManager;
|
|
|
|
class FileManager;
|
2019-01-03 16:26:44 +01:00
|
|
|
class FileReferenceManager;
|
2020-11-24 16:22:00 +01:00
|
|
|
class GroupCallManager;
|
2018-12-31 20:04:05 +01:00
|
|
|
class InlineQueriesManager;
|
|
|
|
class HashtagHints;
|
2018-07-03 19:28:00 +02:00
|
|
|
class LanguagePackManager;
|
2018-12-31 20:04:05 +01:00
|
|
|
class MessagesManager;
|
|
|
|
class NetStatsManager;
|
2018-11-09 15:14:02 +01:00
|
|
|
class NotificationManager;
|
2018-12-31 20:04:05 +01:00
|
|
|
class PasswordManager;
|
2018-07-02 22:36:45 +02:00
|
|
|
class PhoneNumberManager;
|
2019-02-19 14:45:32 +01:00
|
|
|
class PollManager;
|
2018-12-31 20:04:05 +01:00
|
|
|
class PrivacyManager;
|
2018-04-05 13:18:47 +02:00
|
|
|
class SecureManager;
|
2018-12-31 20:04:05 +01:00
|
|
|
class SecretChatsManager;
|
|
|
|
class StickersManager;
|
|
|
|
class StorageManager;
|
2020-10-25 02:20:24 +01:00
|
|
|
class MemoryManager;
|
2018-12-31 20:04:05 +01:00
|
|
|
class TopDialogManager;
|
|
|
|
class UpdatesManager;
|
|
|
|
class VideoNotesManager;
|
|
|
|
class VideosManager;
|
|
|
|
class VoiceNotesManager;
|
|
|
|
class WebPagesManager;
|
|
|
|
|
|
|
|
} // namespace td
|
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
2018-10-24 17:42:40 +02:00
|
|
|
extern int VERBOSITY_NAME(td_init);
|
2020-10-05 17:07:23 +02:00
|
|
|
extern int VERBOSITY_NAME(td_requests);
|
2021-01-05 12:27:29 +01:00
|
|
|
extern int VERBOSITY_NAME(messages);
|
2021-01-05 14:40:44 +01:00
|
|
|
extern int VERBOSITY_NAME(postponed_pts_update);
|
2021-01-07 13:08:07 +01:00
|
|
|
extern int VERBOSITY_NAME(add_pending_update);
|
2018-10-24 17:42:40 +02:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
// Td may start closing after explicit "close" or "destroy" query.
|
|
|
|
// Or it may start closing by itself, because authorization is lost.
|
|
|
|
// It any case the parent will be notified via updateAuthorizationState.
|
|
|
|
//
|
|
|
|
// Td needs a way to know that it will receive no more queries.
|
|
|
|
// It happens after "hangup".
|
|
|
|
//
|
|
|
|
// Parent needs a way to know that it will receive no more updates.
|
|
|
|
// It happens after destruction of callback or after on_closed.
|
|
|
|
class Td final : public NetQueryCallback {
|
|
|
|
public:
|
|
|
|
Td(const Td &) = delete;
|
|
|
|
Td(Td &&) = delete;
|
|
|
|
Td &operator=(const Td &) = delete;
|
|
|
|
Td &operator=(Td &&) = delete;
|
2019-04-27 00:21:08 +02:00
|
|
|
~Td() override;
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2020-07-30 16:28:56 +02:00
|
|
|
struct Options {
|
2020-10-08 17:44:34 +02:00
|
|
|
std::shared_ptr<NetQueryStats> net_query_stats;
|
2020-07-30 16:28:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Td(unique_ptr<TdCallback> callback, Options options);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void request(uint64 id, tl_object_ptr<td_api::Function> function);
|
|
|
|
|
|
|
|
void destroy();
|
|
|
|
|
2018-06-08 00:19:34 +02:00
|
|
|
void schedule_get_terms_of_service(int32 expires_in);
|
|
|
|
|
2020-04-30 20:00:58 +02:00
|
|
|
void schedule_get_promo_data(int32 expires_in);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_result(NetQueryPtr query) override;
|
2020-01-08 21:41:03 +01:00
|
|
|
|
|
|
|
void on_update_server_time_difference();
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_authorization_lost();
|
|
|
|
|
|
|
|
void on_online_updated(bool force, bool send_update);
|
2018-03-10 15:10:23 +01:00
|
|
|
void on_update_status_success(bool is_online);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2018-01-30 07:16:25 +01:00
|
|
|
void on_channel_unban_timeout(int64 channel_id_long);
|
|
|
|
|
2018-01-31 10:18:40 +01:00
|
|
|
bool is_online() const;
|
|
|
|
|
2021-03-02 02:06:02 +01:00
|
|
|
void set_is_bot_online(bool is_bot_online);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
template <class ActorT, class... ArgsT>
|
|
|
|
ActorId<ActorT> create_net_actor(ArgsT &&... args) {
|
|
|
|
auto slot_id = request_actors_.create(ActorOwn<>(), RequestActorIdType);
|
|
|
|
inc_request_actor_refcnt();
|
|
|
|
auto actor = make_unique<ActorT>(std::forward<ArgsT>(args)...);
|
|
|
|
actor->set_parent(actor_shared(this, slot_id));
|
|
|
|
|
|
|
|
auto actor_own = register_actor("net_actor", std::move(actor));
|
|
|
|
auto actor_id = actor_own.get();
|
|
|
|
*request_actors_.get(slot_id) = std::move(actor_own);
|
|
|
|
return actor_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
unique_ptr<AudiosManager> audios_manager_;
|
|
|
|
unique_ptr<CallbackQueriesManager> callback_queries_manager_;
|
|
|
|
unique_ptr<DocumentsManager> documents_manager_;
|
|
|
|
unique_ptr<VideoNotesManager> video_notes_manager_;
|
|
|
|
unique_ptr<VideosManager> videos_manager_;
|
|
|
|
unique_ptr<VoiceNotesManager> voice_notes_manager_;
|
|
|
|
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<AnimationsManager> animations_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<AnimationsManager> animations_manager_actor_;
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<AuthManager> auth_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<AuthManager> auth_manager_actor_;
|
2019-05-07 04:51:56 +02:00
|
|
|
unique_ptr<BackgroundManager> background_manager_;
|
|
|
|
ActorOwn<BackgroundManager> background_manager_actor_;
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<ContactsManager> contacts_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<ContactsManager> contacts_manager_actor_;
|
2020-08-24 13:39:03 +02:00
|
|
|
unique_ptr<CountryInfoManager> country_info_manager_;
|
|
|
|
ActorOwn<CountryInfoManager> country_info_manager_actor_;
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<FileManager> file_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<FileManager> file_manager_actor_;
|
2019-01-03 16:26:44 +01:00
|
|
|
unique_ptr<FileReferenceManager> file_reference_manager_;
|
|
|
|
ActorOwn<FileReferenceManager> file_reference_manager_actor_;
|
2020-11-24 16:22:00 +01:00
|
|
|
unique_ptr<GroupCallManager> group_call_manager_;
|
|
|
|
ActorOwn<GroupCallManager> group_call_manager_actor_;
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<InlineQueriesManager> inline_queries_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<InlineQueriesManager> inline_queries_manager_actor_;
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<MessagesManager> messages_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<MessagesManager> messages_manager_actor_;
|
2018-11-11 13:58:52 +01:00
|
|
|
unique_ptr<NotificationManager> notification_manager_;
|
|
|
|
ActorOwn<NotificationManager> notification_manager_actor_;
|
2019-02-19 14:45:32 +01:00
|
|
|
unique_ptr<PollManager> poll_manager_;
|
|
|
|
ActorOwn<PollManager> poll_manager_actor_;
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<StickersManager> stickers_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<StickersManager> stickers_manager_actor_;
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<UpdatesManager> updates_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<UpdatesManager> updates_manager_actor_;
|
2020-10-25 02:20:24 +01:00
|
|
|
unique_ptr<MemoryManager> memory_manager_;
|
|
|
|
ActorOwn<MemoryManager> memory_manager_actor_;
|
2018-09-27 03:19:03 +02:00
|
|
|
unique_ptr<WebPagesManager> web_pages_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<WebPagesManager> web_pages_manager_actor_;
|
|
|
|
|
|
|
|
ActorOwn<CallManager> call_manager_;
|
2018-06-27 20:26:52 +02:00
|
|
|
ActorOwn<PhoneNumberManager> change_phone_number_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<ConfigManager> config_manager_;
|
2018-06-27 20:26:52 +02:00
|
|
|
ActorOwn<PhoneNumberManager> confirm_phone_number_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<DeviceTokenManager> device_token_manager_;
|
|
|
|
ActorOwn<HashtagHints> hashtag_hints_;
|
2018-07-03 19:28:00 +02:00
|
|
|
ActorOwn<LanguagePackManager> language_pack_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<NetStatsManager> net_stats_manager_;
|
|
|
|
ActorOwn<PasswordManager> password_manager_;
|
|
|
|
ActorOwn<PrivacyManager> privacy_manager_;
|
2018-04-05 13:18:47 +02:00
|
|
|
ActorOwn<SecureManager> secure_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
ActorOwn<SecretChatsManager> secret_chats_manager_;
|
|
|
|
ActorOwn<StateManager> state_manager_;
|
|
|
|
ActorOwn<StorageManager> storage_manager_;
|
|
|
|
ActorOwn<TopDialogManager> top_dialog_manager_;
|
2018-06-27 20:26:52 +02:00
|
|
|
ActorOwn<PhoneNumberManager> verify_phone_number_manager_;
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
class ResultHandler : public std::enable_shared_from_this<ResultHandler> {
|
|
|
|
public:
|
|
|
|
ResultHandler() = default;
|
|
|
|
ResultHandler(const ResultHandler &) = delete;
|
|
|
|
ResultHandler &operator=(const ResultHandler &) = delete;
|
|
|
|
virtual ~ResultHandler() = default;
|
2020-01-08 21:41:03 +01:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
virtual void on_result(NetQueryPtr query);
|
|
|
|
virtual void on_result(uint64 id, BufferSlice packet) {
|
|
|
|
UNREACHABLE();
|
|
|
|
}
|
|
|
|
virtual void on_error(uint64 id, Status status) {
|
|
|
|
UNREACHABLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
friend class Td;
|
|
|
|
|
|
|
|
protected:
|
2020-01-08 21:41:03 +01:00
|
|
|
void send_query(NetQueryPtr query);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
Td *td = nullptr;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void set_td(Td *new_td);
|
|
|
|
};
|
|
|
|
|
|
|
|
template <class HandlerT, class... Args>
|
|
|
|
std::shared_ptr<HandlerT> create_handler(Args &&... args) {
|
2019-03-17 23:51:43 +01:00
|
|
|
LOG_CHECK(close_flag_ < 2) << close_flag_
|
|
|
|
#if TD_CLANG || TD_GCC
|
|
|
|
<< ' ' << __PRETTY_FUNCTION__
|
|
|
|
#endif
|
|
|
|
;
|
2018-12-31 20:04:05 +01:00
|
|
|
auto ptr = std::make_shared<HandlerT>(std::forward<Args>(args)...);
|
|
|
|
ptr->set_td(this);
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
void send_update(tl_object_ptr<td_api::Update> &&object);
|
|
|
|
|
|
|
|
static td_api::object_ptr<td_api::Object> static_request(td_api::object_ptr<td_api::Function> function);
|
|
|
|
|
|
|
|
private:
|
2021-02-25 14:09:55 +01:00
|
|
|
static constexpr const char *TDLIB_VERSION = "1.7.2";
|
2018-02-11 19:33:32 +01:00
|
|
|
static constexpr int64 ONLINE_ALARM_ID = 0;
|
|
|
|
static constexpr int64 PING_SERVER_ALARM_ID = -1;
|
|
|
|
static constexpr int32 PING_SERVER_TIMEOUT = 300;
|
2018-06-08 00:19:34 +02:00
|
|
|
static constexpr int64 TERMS_OF_SERVICE_ALARM_ID = -2;
|
2020-04-30 20:00:58 +02:00
|
|
|
static constexpr int64 PROMO_DATA_ALARM_ID = -3;
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2020-01-08 21:41:03 +01:00
|
|
|
void on_connection_state_changed(StateManager::State new_state);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void send_result(uint64 id, tl_object_ptr<td_api::Object> object);
|
|
|
|
void send_error(uint64 id, Status error);
|
|
|
|
void send_error_impl(uint64 id, tl_object_ptr<td_api::error> error);
|
|
|
|
void send_error_raw(uint64 id, int32 code, CSlice error);
|
|
|
|
void answer_ok_query(uint64 id, Status status);
|
|
|
|
|
2020-08-02 22:03:06 +02:00
|
|
|
ActorShared<Td> create_reference();
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void inc_actor_refcnt();
|
|
|
|
void dec_actor_refcnt();
|
|
|
|
|
|
|
|
void inc_request_actor_refcnt();
|
|
|
|
void dec_request_actor_refcnt();
|
|
|
|
|
2020-08-02 22:03:06 +02:00
|
|
|
void close();
|
2018-02-09 11:29:50 +01:00
|
|
|
void on_closed();
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void dec_stop_cnt();
|
|
|
|
|
2020-10-09 14:39:30 +02:00
|
|
|
unique_ptr<TdCallback> callback_;
|
|
|
|
Options td_options_;
|
|
|
|
|
2018-07-02 22:36:45 +02:00
|
|
|
MtprotoHeader::Options options_;
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
TdParameters parameters_;
|
|
|
|
|
|
|
|
StateManager::State connection_state_;
|
|
|
|
|
|
|
|
std::unordered_multiset<uint64> request_set_;
|
|
|
|
int actor_refcnt_ = 0;
|
|
|
|
int request_actor_refcnt_ = 0;
|
|
|
|
int stop_cnt_ = 2;
|
|
|
|
bool destroy_flag_ = false;
|
|
|
|
int close_flag_ = 0;
|
|
|
|
|
2018-04-19 15:08:30 +02:00
|
|
|
enum class State : int32 { WaitParameters, Decrypt, Run, Close } state_ = State::WaitParameters;
|
2019-01-06 20:59:17 +01:00
|
|
|
bool is_database_encrypted_ = false;
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
vector<std::pair<uint64, std::shared_ptr<ResultHandler>>> result_handlers_;
|
|
|
|
enum : int8 { RequestActorIdType = 1, ActorIdType = 2 };
|
|
|
|
Container<ActorOwn<Actor>> request_actors_;
|
|
|
|
|
|
|
|
bool is_online_ = false;
|
2021-03-02 02:06:02 +01:00
|
|
|
bool is_bot_online_ = false;
|
2018-03-10 12:41:59 +01:00
|
|
|
NetQueryRef update_status_query_;
|
2018-02-09 16:59:13 +01:00
|
|
|
|
|
|
|
int64 alarm_id_ = 1;
|
|
|
|
std::unordered_map<int64, uint64> pending_alarms_;
|
2018-08-01 19:31:20 +02:00
|
|
|
MultiTimeout alarm_timeout_{"AlarmTimeout"};
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2018-09-20 22:08:55 +02:00
|
|
|
TermsOfService pending_terms_of_service_;
|
|
|
|
|
2020-01-08 21:41:03 +01:00
|
|
|
double last_sent_server_time_difference_ = 1e100;
|
|
|
|
|
2019-03-27 19:43:46 +01:00
|
|
|
struct DownloadInfo {
|
|
|
|
int32 offset = -1;
|
|
|
|
int32 limit = -1;
|
|
|
|
vector<uint64> request_ids;
|
|
|
|
};
|
|
|
|
std::unordered_map<FileId, DownloadInfo, FileIdHash> pending_file_downloads_;
|
|
|
|
|
2018-05-15 22:04:27 +02:00
|
|
|
vector<std::pair<uint64, td_api::object_ptr<td_api::Function>>> pending_preauthentication_requests_;
|
|
|
|
|
2018-05-16 21:35:27 +02:00
|
|
|
template <class T>
|
|
|
|
void complete_pending_preauthentication_requests(const T &func);
|
|
|
|
|
2018-09-20 18:33:41 +02:00
|
|
|
td_api::object_ptr<td_api::AuthorizationState> get_fake_authorization_state_object() const;
|
|
|
|
|
2018-02-09 16:59:13 +01:00
|
|
|
static void on_alarm_timeout_callback(void *td_ptr, int64 alarm_id);
|
|
|
|
void on_alarm_timeout(int64 alarm_id);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2018-09-20 22:08:55 +02:00
|
|
|
td_api::object_ptr<td_api::updateTermsOfService> get_update_terms_of_service_object() const;
|
|
|
|
|
2018-06-08 00:19:34 +02:00
|
|
|
void on_get_terms_of_service(Result<std::pair<int32, TermsOfService>> result, bool dummy);
|
2020-04-30 20:00:58 +02:00
|
|
|
|
|
|
|
void on_get_promo_data(Result<telegram_api::object_ptr<telegram_api::help_PromoData>> result, bool dummy);
|
2018-06-08 00:19:34 +02:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
template <class T>
|
2018-04-09 16:20:12 +02:00
|
|
|
friend class RequestActor; // uses send_result/send_error
|
2018-08-08 21:55:54 +02:00
|
|
|
friend class TestQuery; // uses send_result/send_error, TODO pass Promise<>
|
|
|
|
friend class AuthManager; // uses send_result/send_error, TODO pass Promise<>
|
|
|
|
friend class PhoneNumberManager; // uses send_result/send_error, TODO pass Promise<>
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void add_handler(uint64 id, std::shared_ptr<ResultHandler> handler);
|
|
|
|
std::shared_ptr<ResultHandler> extract_handler(uint64 id);
|
|
|
|
void invalidate_handler(ResultHandler *handler);
|
|
|
|
void clear_handlers();
|
|
|
|
// void destroy_handler(ResultHandler *handler);
|
|
|
|
|
2018-05-16 17:40:26 +02:00
|
|
|
void clear_requests();
|
|
|
|
|
2019-03-27 19:43:46 +01:00
|
|
|
void on_file_download_finished(FileId file_id);
|
|
|
|
|
2018-03-04 21:50:38 +01:00
|
|
|
static bool is_internal_config_option(Slice name);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_config_option_updated(const string &name);
|
|
|
|
|
|
|
|
static tl_object_ptr<td_api::ConnectionState> get_connection_state_object(StateManager::State state);
|
|
|
|
|
|
|
|
void send(NetQueryPtr &&query);
|
|
|
|
|
|
|
|
class OnRequest;
|
|
|
|
|
|
|
|
class DownloadFileCallback;
|
|
|
|
|
|
|
|
std::shared_ptr<DownloadFileCallback> download_file_callback_;
|
|
|
|
|
|
|
|
class UploadFileCallback;
|
|
|
|
|
|
|
|
std::shared_ptr<UploadFileCallback> upload_file_callback_;
|
|
|
|
|
2020-09-02 22:35:54 +02:00
|
|
|
std::shared_ptr<ActorContext> old_context_;
|
|
|
|
|
2018-09-29 06:04:28 +02:00
|
|
|
static int *get_log_verbosity_level(Slice name);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
template <class T>
|
2018-10-01 04:22:56 +02:00
|
|
|
Promise<T> create_request_promise(uint64 id) {
|
|
|
|
return PromiseCreator::lambda([id = id, actor_id = actor_id(this)](Result<T> r_state) {
|
|
|
|
if (r_state.is_error()) {
|
|
|
|
send_closure(actor_id, &Td::send_error, id, r_state.move_as_error());
|
|
|
|
} else {
|
|
|
|
send_closure(actor_id, &Td::send_result, id, r_state.move_as_ok());
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2018-04-11 20:13:46 +02:00
|
|
|
|
|
|
|
Promise<Unit> create_ok_request_promise(uint64 id);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2018-05-15 22:04:27 +02:00
|
|
|
static bool is_authentication_request(int32 id);
|
|
|
|
|
|
|
|
static bool is_synchronous_request(int32 id);
|
|
|
|
|
|
|
|
static bool is_preinitialization_request(int32 id);
|
|
|
|
|
|
|
|
static bool is_preauthentication_request(int32 id);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
template <class T>
|
|
|
|
void on_request(uint64 id, const T &request) = delete;
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::setTdlibParameters &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::checkDatabaseEncryptionKey &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setDatabaseEncryptionKey &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getAuthorizationState &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setAuthenticationPhoneNumber &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::resendAuthenticationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::checkAuthenticationCode &request);
|
|
|
|
|
2019-07-16 21:08:34 +02:00
|
|
|
void on_request(uint64 id, td_api::registerUser &request);
|
|
|
|
|
2019-12-17 17:17:57 +01:00
|
|
|
void on_request(uint64 id, td_api::requestQrCodeAuthentication &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::checkAuthenticationPassword &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::requestAuthenticationPasswordRecovery &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::recoverAuthenticationPassword &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::logOut &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::close &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::destroy &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::checkAuthenticationBotToken &request);
|
|
|
|
|
2019-12-17 17:17:57 +01:00
|
|
|
void on_request(uint64 id, td_api::confirmQrCodeAuthentication &request);
|
|
|
|
|
2018-09-20 18:33:41 +02:00
|
|
|
void on_request(uint64 id, const td_api::getCurrentState &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::getPasswordState &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setPassword &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getRecoveryEmailAddress &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setRecoveryEmailAddress &request);
|
|
|
|
|
2019-02-10 21:16:52 +01:00
|
|
|
void on_request(uint64 id, td_api::checkRecoveryEmailAddressCode &request);
|
|
|
|
|
2019-02-10 21:32:49 +01:00
|
|
|
void on_request(uint64 id, const td_api::resendRecoveryEmailAddressCode &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::requestPasswordRecovery &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::recoverPassword &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getTemporaryPasswordState &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::createTemporaryPassword &request);
|
|
|
|
|
2018-12-24 01:12:59 +01:00
|
|
|
void on_request(uint64 id, td_api::processPushNotification &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::registerDevice &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getUserPrivacySettingRules &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setUserPrivacySettingRules &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getAccountTtl &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::setAccountTtl &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::deleteAccount &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::changePhoneNumber &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::checkChangePhoneNumberCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::resendChangePhoneNumberCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getActiveSessions &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::terminateSession &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::terminateAllOtherSessions &request);
|
|
|
|
|
2018-02-07 00:31:38 +01:00
|
|
|
void on_request(uint64 id, const td_api::getConnectedWebsites &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::disconnectWebsite &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::disconnectAllWebsites &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getMe &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getUser &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getUserFullInfo &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getBasicGroup &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getBasicGroupFullInfo &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getSupergroup &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getSupergroupFullInfo &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getSecretChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getMessage &request);
|
|
|
|
|
2019-01-09 03:57:43 +01:00
|
|
|
void on_request(uint64 id, const td_api::getMessageLocally &request);
|
|
|
|
|
2018-02-07 00:31:38 +01:00
|
|
|
void on_request(uint64 id, const td_api::getRepliedMessage &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getChatPinnedMessage &request);
|
|
|
|
|
2020-10-28 23:06:07 +01:00
|
|
|
void on_request(uint64 id, const td_api::getCallbackQueryMessage &request);
|
|
|
|
|
2020-09-22 16:27:35 +02:00
|
|
|
void on_request(uint64 id, const td_api::getMessageThread &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getMessages &request);
|
|
|
|
|
2019-04-08 03:50:26 +02:00
|
|
|
void on_request(uint64 id, const td_api::getMessageLink &request);
|
2019-04-08 01:42:16 +02:00
|
|
|
|
2020-09-20 17:17:47 +02:00
|
|
|
void on_request(uint64 id, const td_api::getMessageEmbeddingCode &request);
|
|
|
|
|
2019-08-05 11:12:59 +02:00
|
|
|
void on_request(uint64 id, td_api::getMessageLinkInfo &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getFile &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getRemoteFile &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getStorageStatistics &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getStorageStatisticsFast &request);
|
|
|
|
|
2019-04-17 11:17:51 +02:00
|
|
|
void on_request(uint64 id, td_api::getDatabaseStatistics &request);
|
|
|
|
|
2020-10-25 02:20:24 +01:00
|
|
|
void on_request(uint64 id, td_api::getMemoryStatistics &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::optimizeMemory &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::optimizeStorage &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getNetworkStatistics &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::resetNetworkStatistics &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::addNetworkStatistics &request);
|
|
|
|
|
2019-05-14 01:03:05 +02:00
|
|
|
void on_request(uint64 id, const td_api::setNetworkType &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getAutoDownloadSettingsPresets &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::setAutoDownloadSettings &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getTopChats &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::removeTopChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getChats &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchPublicChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchPublicChats &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchChats &request);
|
|
|
|
|
2018-01-16 19:56:59 +01:00
|
|
|
void on_request(uint64 id, td_api::searchChatsOnServer &request);
|
|
|
|
|
2019-10-16 20:55:16 +02:00
|
|
|
void on_request(uint64 id, const td_api::searchChatsNearby &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::addRecentlyFoundChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::removeRecentlyFoundChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::clearRecentlyFoundChats &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getGroupsInCommon &request);
|
|
|
|
|
2018-03-02 00:19:00 +01:00
|
|
|
void on_request(uint64 id, td_api::checkChatUsername &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getCreatedPublicChats &request);
|
|
|
|
|
2019-10-22 13:06:46 +02:00
|
|
|
void on_request(uint64 id, const td_api::checkCreatedPublicChatsLimit &request);
|
|
|
|
|
2019-09-13 19:25:17 +02:00
|
|
|
void on_request(uint64 id, const td_api::getSuitableDiscussionChats &request);
|
|
|
|
|
2019-12-13 15:27:44 +01:00
|
|
|
void on_request(uint64 id, const td_api::getInactiveSupergroupChats &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::openChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::closeChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::viewMessages &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::openMessageContent &request);
|
|
|
|
|
2021-02-04 12:36:11 +01:00
|
|
|
void on_request(uint64 id, td_api::getExternalLink &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getChatHistory &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::deleteChatHistory &request);
|
|
|
|
|
2021-01-20 12:49:18 +01:00
|
|
|
void on_request(uint64 id, const td_api::deleteChat &request);
|
|
|
|
|
2020-09-30 03:26:39 +02:00
|
|
|
void on_request(uint64 id, const td_api::getMessageThreadHistory &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::searchChatMessages &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchSecretMessages &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchMessages &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchCallMessages &request);
|
|
|
|
|
2021-01-19 11:21:50 +01:00
|
|
|
void on_request(uint64 id, const td_api::deleteAllCallMessages &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::searchChatRecentLocationMessages &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getActiveLiveLocationMessages &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getChatMessageByDate &request);
|
|
|
|
|
2018-07-19 15:58:09 +02:00
|
|
|
void on_request(uint64 id, td_api::getChatMessageCount &request);
|
|
|
|
|
2019-12-04 18:06:39 +01:00
|
|
|
void on_request(uint64 id, const td_api::getChatScheduledMessages &request);
|
|
|
|
|
2020-08-21 13:47:43 +02:00
|
|
|
void on_request(uint64 id, td_api::getMessagePublicForwards &request);
|
|
|
|
|
2018-11-08 19:00:03 +01:00
|
|
|
void on_request(uint64 id, const td_api::removeNotification &request);
|
|
|
|
|
2018-11-09 23:56:00 +01:00
|
|
|
void on_request(uint64 id, const td_api::removeNotificationGroup &request);
|
2018-11-08 19:00:03 +01:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::deleteMessages &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::deleteChatMessagesFromUser &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::readAllChatMentions &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendMessage &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendMessageAlbum &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendBotStartMessage &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendInlineQueryResultMessage &request);
|
|
|
|
|
2018-03-26 22:20:56 +02:00
|
|
|
void on_request(uint64 id, td_api::addLocalMessage &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::editMessageText &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::editMessageLiveLocation &request);
|
|
|
|
|
2018-06-19 01:31:34 +02:00
|
|
|
void on_request(uint64 id, td_api::editMessageMedia &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::editMessageCaption &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::editMessageReplyMarkup &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::editInlineMessageText &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::editInlineMessageLiveLocation &request);
|
|
|
|
|
2018-06-19 01:31:34 +02:00
|
|
|
void on_request(uint64 id, td_api::editInlineMessageMedia &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::editInlineMessageCaption &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::editInlineMessageReplyMarkup &request);
|
|
|
|
|
2019-12-03 02:36:23 +01:00
|
|
|
void on_request(uint64 id, td_api::editMessageSchedulingState &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::setGameScore &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setInlineGameScore &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getGameHighScores &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getInlineGameHighScores &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::deleteChatReplyMarkup &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendChatAction &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendChatScreenshotTakenNotification &request);
|
|
|
|
|
2019-12-06 00:32:23 +01:00
|
|
|
void on_request(uint64 id, td_api::forwardMessages &request);
|
2019-08-11 03:05:00 +02:00
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::resendMessages &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getWebPagePreview &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getWebPageInstantView &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::createPrivateChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::createBasicGroupChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::createSupergroupChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::createSecretChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::createNewBasicGroupChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::createNewSupergroupChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::createNewSecretChat &request);
|
|
|
|
|
2020-08-10 10:34:28 +02:00
|
|
|
void on_request(uint64 id, const td_api::createCall &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2020-08-10 10:34:28 +02:00
|
|
|
void on_request(uint64 id, const td_api::acceptCall &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2020-08-10 10:34:28 +02:00
|
|
|
void on_request(uint64 id, td_api::sendCallSignalingData &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::discardCall &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendCallRating &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendCallDebugInformation &request);
|
|
|
|
|
2020-12-02 23:08:20 +01:00
|
|
|
void on_request(uint64 id, const td_api::createVoiceChat &request);
|
2020-11-26 08:56:13 +01:00
|
|
|
|
2020-12-03 00:00:46 +01:00
|
|
|
void on_request(uint64 id, const td_api::getGroupCall &request);
|
|
|
|
|
2020-11-26 12:32:29 +01:00
|
|
|
void on_request(uint64 id, td_api::joinGroupCall &request);
|
|
|
|
|
2020-12-08 15:51:37 +01:00
|
|
|
void on_request(uint64 id, const td_api::toggleGroupCallMuteNewParticipants &request);
|
2020-11-26 23:58:36 +01:00
|
|
|
|
2020-12-08 15:51:37 +01:00
|
|
|
void on_request(uint64 id, const td_api::inviteGroupCallParticipants &request);
|
2020-11-27 13:22:19 +01:00
|
|
|
|
2020-12-08 15:51:37 +01:00
|
|
|
void on_request(uint64 id, const td_api::setGroupCallParticipantIsSpeaking &request);
|
2020-12-04 15:06:37 +01:00
|
|
|
|
2020-12-08 15:51:37 +01:00
|
|
|
void on_request(uint64 id, const td_api::toggleGroupCallParticipantIsMuted &request);
|
2020-11-27 15:40:29 +01:00
|
|
|
|
2021-01-02 20:59:48 +01:00
|
|
|
void on_request(uint64 id, const td_api::setGroupCallParticipantVolumeLevel &request);
|
|
|
|
|
2020-12-11 17:39:27 +01:00
|
|
|
void on_request(uint64 id, const td_api::loadGroupCallParticipants &request);
|
2020-11-26 08:56:13 +01:00
|
|
|
|
2020-11-26 09:37:54 +01:00
|
|
|
void on_request(uint64 id, const td_api::leaveGroupCall &request);
|
|
|
|
|
2020-11-26 09:21:26 +01:00
|
|
|
void on_request(uint64 id, const td_api::discardGroupCall &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::upgradeBasicGroupChatToSupergroupChat &request);
|
|
|
|
|
2020-05-31 02:50:52 +02:00
|
|
|
void on_request(uint64 id, const td_api::getChatListsToAddChat &request);
|
|
|
|
|
2020-05-30 23:48:33 +02:00
|
|
|
void on_request(uint64 id, const td_api::addChatToList &request);
|
2019-08-27 16:23:01 +02:00
|
|
|
|
2020-05-18 01:29:28 +02:00
|
|
|
void on_request(uint64 id, const td_api::getChatFilter &request);
|
|
|
|
|
2020-05-19 03:03:15 +02:00
|
|
|
void on_request(uint64 id, const td_api::getRecommendedChatFilters &request);
|
|
|
|
|
2020-05-18 21:26:44 +02:00
|
|
|
void on_request(uint64 id, td_api::createChatFilter &request);
|
|
|
|
|
2020-05-18 23:47:34 +02:00
|
|
|
void on_request(uint64 id, td_api::editChatFilter &request);
|
|
|
|
|
2020-05-19 00:06:24 +02:00
|
|
|
void on_request(uint64 id, const td_api::deleteChatFilter &request);
|
|
|
|
|
2020-05-19 01:41:07 +02:00
|
|
|
void on_request(uint64 id, const td_api::reorderChatFilters &request);
|
2019-08-27 16:23:01 +02:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::setChatTitle &request);
|
|
|
|
|
2018-06-28 23:06:17 +02:00
|
|
|
void on_request(uint64 id, const td_api::setChatPhoto &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2021-02-09 16:51:08 +01:00
|
|
|
void on_request(uint64 id, const td_api::setChatMessageTtlSetting &request);
|
2021-02-05 12:21:16 +01:00
|
|
|
|
2019-03-20 18:58:13 +01:00
|
|
|
void on_request(uint64 id, const td_api::setChatPermissions &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::setChatDraftMessage &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::toggleChatIsPinned &request);
|
|
|
|
|
2018-06-27 23:08:44 +02:00
|
|
|
void on_request(uint64 id, const td_api::toggleChatIsMarkedAsUnread &request);
|
|
|
|
|
2020-10-18 00:54:32 +02:00
|
|
|
void on_request(uint64 id, const td_api::toggleMessageSenderIsBlocked &request);
|
2020-09-20 02:00:01 +02:00
|
|
|
|
2018-04-28 20:05:04 +02:00
|
|
|
void on_request(uint64 id, const td_api::toggleChatDefaultDisableNotification &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::setPinnedChats &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setChatClientData &request);
|
|
|
|
|
2019-03-18 03:24:25 +01:00
|
|
|
void on_request(uint64 id, td_api::setChatDescription &request);
|
|
|
|
|
2019-09-14 04:35:56 +02:00
|
|
|
void on_request(uint64 id, const td_api::setChatDiscussionGroup &request);
|
|
|
|
|
2019-10-14 18:07:31 +02:00
|
|
|
void on_request(uint64 id, td_api::setChatLocation &request);
|
|
|
|
|
2019-11-15 16:17:52 +01:00
|
|
|
void on_request(uint64 id, const td_api::setChatSlowModeDelay &request);
|
|
|
|
|
2019-02-01 13:19:32 +01:00
|
|
|
void on_request(uint64 id, const td_api::pinChatMessage &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::unpinChatMessage &request);
|
|
|
|
|
2020-10-23 00:56:06 +02:00
|
|
|
void on_request(uint64 id, const td_api::unpinAllChatMessages &request);
|
|
|
|
|
2018-08-16 19:09:23 +02:00
|
|
|
void on_request(uint64 id, const td_api::joinChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::leaveChat &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::addChatMember &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::addChatMembers &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setChatMemberStatus &request);
|
|
|
|
|
2021-01-20 19:12:48 +01:00
|
|
|
void on_request(uint64 id, const td_api::banChatMember &request);
|
|
|
|
|
2019-10-17 18:43:41 +02:00
|
|
|
void on_request(uint64 id, const td_api::canTransferOwnership &request);
|
|
|
|
|
2019-10-17 16:05:01 +02:00
|
|
|
void on_request(uint64 id, td_api::transferChatOwnership &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getChatMember &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchChatMembers &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getChatAdministrators &request);
|
|
|
|
|
2021-02-24 10:19:55 +01:00
|
|
|
void on_request(uint64 id, const td_api::replacePrimaryChatInviteLink &request);
|
2021-02-02 00:00:28 +01:00
|
|
|
|
2021-01-12 17:21:12 +01:00
|
|
|
void on_request(uint64 id, const td_api::createChatInviteLink &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::editChatInviteLink &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2021-02-24 20:25:10 +01:00
|
|
|
void on_request(uint64 id, td_api::getChatInviteLink &request);
|
|
|
|
|
2021-02-02 17:23:45 +01:00
|
|
|
void on_request(uint64 id, const td_api::getChatInviteLinkCounts &request);
|
2021-01-18 20:35:28 +01:00
|
|
|
|
2021-01-14 17:39:51 +01:00
|
|
|
void on_request(uint64 id, td_api::getChatInviteLinks &request);
|
|
|
|
|
2021-01-17 21:07:17 +01:00
|
|
|
void on_request(uint64 id, td_api::getChatInviteLinkMembers &request);
|
2021-01-14 21:21:23 +01:00
|
|
|
|
2021-02-02 17:23:45 +01:00
|
|
|
void on_request(uint64 id, td_api::revokeChatInviteLink &request);
|
|
|
|
|
2021-01-18 17:51:46 +01:00
|
|
|
void on_request(uint64 id, td_api::deleteRevokedChatInviteLink &request);
|
|
|
|
|
2021-01-18 17:59:21 +01:00
|
|
|
void on_request(uint64 id, const td_api::deleteAllRevokedChatInviteLinks &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::checkChatInviteLink &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::joinChatByInviteLink &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getChatEventLog &request);
|
|
|
|
|
2018-07-17 05:46:27 +02:00
|
|
|
void on_request(uint64 id, const td_api::clearAllDraftMessages &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::downloadFile &request);
|
|
|
|
|
2019-04-26 00:03:31 +02:00
|
|
|
void on_request(uint64 id, const td_api::getFileDownloadedPrefixSize &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::cancelDownloadFile &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::uploadFile &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::cancelUploadFile &request);
|
|
|
|
|
2019-04-26 02:18:00 +02:00
|
|
|
void on_request(uint64 id, td_api::writeGeneratedFilePart &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::setFileGenerationProgress &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::finishFileGeneration &request);
|
|
|
|
|
2019-04-26 00:03:31 +02:00
|
|
|
void on_request(uint64 id, const td_api::readFilePart &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::deleteFile &request);
|
|
|
|
|
2021-01-22 17:14:35 +01:00
|
|
|
void on_request(uint64 id, td_api::getMessageFileType &request);
|
|
|
|
|
2021-02-23 00:03:24 +01:00
|
|
|
void on_request(uint64 id, const td_api::getMessageImportConfirmationText &request);
|
|
|
|
|
2021-01-21 20:00:08 +01:00
|
|
|
void on_request(uint64 id, const td_api::importMessages &request);
|
|
|
|
|
2020-10-18 00:26:36 +02:00
|
|
|
void on_request(uint64 id, const td_api::blockMessageSenderFromReplies &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2020-10-18 01:10:58 +02:00
|
|
|
void on_request(uint64 id, const td_api::getBlockedMessageSenders &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2019-10-08 17:12:15 +02:00
|
|
|
void on_request(uint64 id, td_api::addContact &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::importContacts &request);
|
|
|
|
|
2018-08-16 19:09:23 +02:00
|
|
|
void on_request(uint64 id, const td_api::getContacts &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::searchContacts &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::removeContacts &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getImportedContactCount &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::changeImportedContacts &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::clearImportedContacts &request);
|
|
|
|
|
2019-10-11 16:59:04 +02:00
|
|
|
void on_request(uint64 id, const td_api::sharePhoneNumber &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getRecentInlineBots &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setName &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setBio &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setUsername &request);
|
|
|
|
|
2020-03-27 23:43:52 +01:00
|
|
|
void on_request(uint64 id, td_api::setCommands &request);
|
|
|
|
|
2020-02-14 14:17:45 +01:00
|
|
|
void on_request(uint64 id, const td_api::setLocation &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::setProfilePhoto &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::deleteProfilePhoto &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getUserProfilePhotos &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setSupergroupUsername &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::setSupergroupStickerSet &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::toggleSupergroupSignMessages &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::toggleSupergroupIsAllHistoryAvailable &request);
|
|
|
|
|
2021-02-16 23:06:35 +01:00
|
|
|
void on_request(uint64 id, const td_api::toggleSupergroupIsBroadcastGroup &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::reportSupergroupSpam &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getSupergroupMembers &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::closeSecretChat &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getStickers &request);
|
|
|
|
|
2018-03-09 18:04:44 +01:00
|
|
|
void on_request(uint64 id, td_api::searchStickers &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getInstalledStickerSets &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getArchivedStickerSets &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getTrendingStickerSets &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getAttachedStickerSets &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getStickerSet &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchStickerSet &request);
|
|
|
|
|
2018-03-05 23:44:11 +01:00
|
|
|
void on_request(uint64 id, td_api::searchInstalledStickerSets &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchStickerSets &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::changeStickerSet &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::viewTrendingStickerSets &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::reorderInstalledStickerSets &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::uploadStickerFile &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::createNewStickerSet &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::addStickerToSet &request);
|
|
|
|
|
2020-03-20 14:36:07 +01:00
|
|
|
void on_request(uint64 id, td_api::setStickerSetThumbnail &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::setStickerPositionInSet &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::removeStickerFromSet &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getRecentStickers &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::addRecentSticker &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::removeRecentSticker &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::clearRecentStickers &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getSavedAnimations &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::addSavedAnimation &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::removeSavedAnimation &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getStickerEmojis &request);
|
|
|
|
|
2019-05-21 17:48:35 +02:00
|
|
|
void on_request(uint64 id, td_api::searchEmojis &request);
|
|
|
|
|
2019-05-21 21:44:13 +02:00
|
|
|
void on_request(uint64 id, td_api::getEmojiSuggestionsUrl &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getFavoriteStickers &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::addFavoriteSticker &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::removeFavoriteSticker &request);
|
|
|
|
|
2019-02-14 19:44:20 +01:00
|
|
|
void on_request(uint64 id, const td_api::getChatNotificationSettingsExceptions &request);
|
|
|
|
|
2018-04-09 18:30:27 +02:00
|
|
|
void on_request(uint64 id, const td_api::getScopeNotificationSettings &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2018-04-09 18:30:27 +02:00
|
|
|
void on_request(uint64 id, td_api::setChatNotificationSettings &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setScopeNotificationSettings &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::resetAllNotificationSettings &request);
|
|
|
|
|
2019-10-11 02:28:41 +02:00
|
|
|
void on_request(uint64 id, const td_api::removeChatActionBar &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::reportChat &request);
|
|
|
|
|
2021-02-19 17:11:27 +01:00
|
|
|
void on_request(uint64 id, td_api::reportChatPhoto &request);
|
|
|
|
|
2019-02-26 21:37:59 +01:00
|
|
|
void on_request(uint64 id, td_api::getChatStatisticsUrl &request);
|
|
|
|
|
2020-04-03 02:53:33 +02:00
|
|
|
void on_request(uint64 id, const td_api::getChatStatistics &request);
|
2020-04-02 15:06:05 +02:00
|
|
|
|
2020-08-01 04:19:54 +02:00
|
|
|
void on_request(uint64 id, const td_api::getMessageStatistics &request);
|
|
|
|
|
2020-11-19 15:23:26 +01:00
|
|
|
void on_request(uint64 id, td_api::getStatisticalGraph &request);
|
2020-04-02 15:06:05 +02:00
|
|
|
|
2018-08-13 22:18:27 +02:00
|
|
|
void on_request(uint64 id, const td_api::getMapThumbnailFile &request);
|
|
|
|
|
2018-09-04 03:29:26 +02:00
|
|
|
void on_request(uint64 id, const td_api::getLocalizationTargetInfo &request);
|
2018-07-03 19:28:00 +02:00
|
|
|
|
2019-02-12 02:15:45 +01:00
|
|
|
void on_request(uint64 id, td_api::getLanguagePackInfo &request);
|
|
|
|
|
2018-07-03 19:28:00 +02:00
|
|
|
void on_request(uint64 id, td_api::getLanguagePackStrings &request);
|
|
|
|
|
2019-02-23 18:27:14 +01:00
|
|
|
void on_request(uint64 id, td_api::synchronizeLanguagePack &request);
|
|
|
|
|
2019-02-11 19:53:10 +01:00
|
|
|
void on_request(uint64 id, td_api::addCustomServerLanguagePack &request);
|
|
|
|
|
2018-09-04 03:29:26 +02:00
|
|
|
void on_request(uint64 id, td_api::setCustomLanguagePack &request);
|
2018-08-06 16:22:22 +02:00
|
|
|
|
2018-09-04 03:29:26 +02:00
|
|
|
void on_request(uint64 id, td_api::editCustomLanguagePackInfo &request);
|
2018-08-31 19:18:12 +02:00
|
|
|
|
2018-09-04 03:29:26 +02:00
|
|
|
void on_request(uint64 id, td_api::setCustomLanguagePackString &request);
|
2018-08-22 22:11:54 +02:00
|
|
|
|
2018-09-04 03:29:26 +02:00
|
|
|
void on_request(uint64 id, td_api::deleteLanguagePack &request);
|
2018-08-06 16:22:22 +02:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::getOption &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setOption &request);
|
|
|
|
|
2019-02-21 13:23:05 +01:00
|
|
|
void on_request(uint64 id, td_api::setPollAnswer &request);
|
2019-02-21 01:52:58 +01:00
|
|
|
|
2020-01-13 19:21:58 +01:00
|
|
|
void on_request(uint64 id, td_api::getPollVoters &request);
|
|
|
|
|
2019-04-12 01:10:33 +02:00
|
|
|
void on_request(uint64 id, td_api::stopPoll &request);
|
2019-02-22 16:09:55 +01:00
|
|
|
|
2020-07-12 14:04:49 +02:00
|
|
|
void on_request(uint64 id, const td_api::hideSuggestedAction &request);
|
|
|
|
|
2019-09-07 01:07:56 +02:00
|
|
|
void on_request(uint64 id, const td_api::getLoginUrlInfo &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getLoginUrl &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::getInlineQueryResults &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::answerInlineQuery &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getCallbackQueryAnswer &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::answerCallbackQuery &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::answerShippingQuery &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::answerPreCheckoutQuery &request);
|
|
|
|
|
2020-02-13 17:20:34 +01:00
|
|
|
void on_request(uint64 id, td_api::getBankCardInfo &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getPaymentForm &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::validateOrderInfo &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendPaymentForm &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getPaymentReceipt &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getSavedOrderInfo &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::deleteSavedOrderInfo &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::deleteSavedCredentials &request);
|
|
|
|
|
2018-08-01 15:52:07 +02:00
|
|
|
void on_request(uint64 id, td_api::getPassportElement &request);
|
2018-03-27 15:11:15 +02:00
|
|
|
|
2018-08-01 15:52:07 +02:00
|
|
|
void on_request(uint64 id, td_api::getAllPassportElements &request);
|
2018-04-07 00:29:36 +02:00
|
|
|
|
2018-08-01 15:52:07 +02:00
|
|
|
void on_request(uint64 id, td_api::setPassportElement &request);
|
2018-03-27 15:11:15 +02:00
|
|
|
|
2018-08-01 15:52:07 +02:00
|
|
|
void on_request(uint64 id, const td_api::deletePassportElement &request);
|
2018-03-27 15:11:15 +02:00
|
|
|
|
2018-08-01 15:52:07 +02:00
|
|
|
void on_request(uint64 id, td_api::setPassportElementErrors &request);
|
2018-04-17 17:04:09 +02:00
|
|
|
|
2018-08-24 00:02:59 +02:00
|
|
|
void on_request(uint64 id, td_api::getPreferredCountryLanguage &request);
|
|
|
|
|
2018-03-27 15:11:15 +02:00
|
|
|
void on_request(uint64 id, td_api::sendPhoneNumberVerificationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::resendPhoneNumberVerificationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::checkPhoneNumberVerificationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendEmailAddressVerificationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::resendEmailAddressVerificationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::checkEmailAddressVerificationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::getPassportAuthorizationForm &request);
|
|
|
|
|
2018-09-25 04:12:41 +02:00
|
|
|
void on_request(uint64 id, td_api::getPassportAuthorizationFormAvailableElements &request);
|
|
|
|
|
2018-04-06 21:37:30 +02:00
|
|
|
void on_request(uint64 id, td_api::sendPassportAuthorizationForm &request);
|
2018-03-27 15:11:15 +02:00
|
|
|
|
2018-06-27 20:26:52 +02:00
|
|
|
void on_request(uint64 id, td_api::sendPhoneNumberConfirmationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::resendPhoneNumberConfirmationCode &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::checkPhoneNumberConfirmationCode &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getSupportUser &request);
|
|
|
|
|
2019-05-07 04:51:56 +02:00
|
|
|
void on_request(uint64 id, const td_api::getBackgrounds &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2019-05-07 16:10:20 +02:00
|
|
|
void on_request(uint64 id, td_api::getBackgroundUrl &request);
|
|
|
|
|
2019-05-07 17:21:57 +02:00
|
|
|
void on_request(uint64 id, td_api::searchBackground &request);
|
|
|
|
|
2019-05-10 14:36:37 +02:00
|
|
|
void on_request(uint64 id, td_api::setBackground &request);
|
|
|
|
|
2019-05-12 03:10:18 +02:00
|
|
|
void on_request(uint64 id, const td_api::removeBackground &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::resetBackgrounds &request);
|
2019-05-10 22:55:26 +02:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::getRecentlyVisitedTMeUrls &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::setBotUpdatesStatus &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::sendCustomRequest &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::answerCustomQuery &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::setAlarm &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::searchHashtags &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::removeRecentHashtag &request);
|
|
|
|
|
2018-06-07 20:42:17 +02:00
|
|
|
void on_request(uint64 id, td_api::acceptTermsOfService &request);
|
|
|
|
|
2020-08-24 22:38:45 +02:00
|
|
|
void on_request(uint64 id, const td_api::getCountries &request);
|
|
|
|
|
2018-03-04 22:36:16 +01:00
|
|
|
void on_request(uint64 id, const td_api::getCountryCode &request);
|
|
|
|
|
2020-08-25 12:42:14 +02:00
|
|
|
void on_request(uint64 id, const td_api::getPhoneNumberInfo &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getInviteText &request);
|
|
|
|
|
2018-04-12 22:51:42 +02:00
|
|
|
void on_request(uint64 id, td_api::getDeepLinkInfo &request);
|
|
|
|
|
2018-12-10 20:08:58 +01:00
|
|
|
void on_request(uint64 id, const td_api::getApplicationConfig &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, td_api::saveApplicationLogEvent &request);
|
|
|
|
|
2018-05-14 21:00:38 +02:00
|
|
|
void on_request(uint64 id, td_api::addProxy &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2018-07-27 17:10:45 +02:00
|
|
|
void on_request(uint64 id, td_api::editProxy &request);
|
|
|
|
|
2018-05-14 21:00:38 +02:00
|
|
|
void on_request(uint64 id, const td_api::enableProxy &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::disableProxy &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::removeProxy &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getProxies &request);
|
|
|
|
|
2018-05-17 20:08:51 +02:00
|
|
|
void on_request(uint64 id, const td_api::getProxyLink &request);
|
|
|
|
|
2018-05-14 21:00:38 +02:00
|
|
|
void on_request(uint64 id, const td_api::pingProxy &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getTextEntities &request);
|
|
|
|
|
2018-12-10 02:01:02 +01:00
|
|
|
void on_request(uint64 id, const td_api::parseTextEntities &request);
|
2018-01-30 18:06:54 +01:00
|
|
|
|
2020-03-09 21:55:32 +01:00
|
|
|
void on_request(uint64 id, const td_api::parseMarkdown &request);
|
|
|
|
|
2020-03-12 04:22:14 +01:00
|
|
|
void on_request(uint64 id, const td_api::getMarkdownText &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, const td_api::getFileMimeType &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getFileExtension &request);
|
|
|
|
|
2018-04-30 14:50:54 +02:00
|
|
|
void on_request(uint64 id, const td_api::cleanFileName &request);
|
|
|
|
|
2018-07-23 19:29:14 +02:00
|
|
|
void on_request(uint64 id, const td_api::getLanguagePackString &request);
|
|
|
|
|
2018-12-28 23:48:32 +01:00
|
|
|
void on_request(uint64 id, const td_api::getPushReceiverId &request);
|
|
|
|
|
2020-06-05 02:43:13 +02:00
|
|
|
void on_request(uint64 id, const td_api::getChatFilterDefaultIconName &request);
|
|
|
|
|
2018-12-10 02:01:02 +01:00
|
|
|
void on_request(uint64 id, const td_api::getJsonValue &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getJsonString &request);
|
|
|
|
|
2018-10-24 17:42:40 +02:00
|
|
|
void on_request(uint64 id, const td_api::setLogStream &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getLogStream &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::setLogVerbosityLevel &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getLogVerbosityLevel &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getLogTags &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::setLogTagVerbosityLevel &request);
|
|
|
|
|
|
|
|
void on_request(uint64 id, const td_api::getLogTagVerbosityLevel &request);
|
|
|
|
|
2019-04-13 20:40:31 +02:00
|
|
|
void on_request(uint64 id, const td_api::addLogMessage &request);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
// test
|
2019-08-06 02:29:16 +02:00
|
|
|
void on_request(uint64 id, const td_api::testNetwork &request);
|
2019-07-20 15:13:36 +02:00
|
|
|
void on_request(uint64 id, td_api::testProxy &request);
|
2019-08-06 02:29:16 +02:00
|
|
|
void on_request(uint64 id, const td_api::testGetDifference &request);
|
|
|
|
void on_request(uint64 id, const td_api::testUseUpdate &request);
|
|
|
|
void on_request(uint64 id, const td_api::testReturnError &request);
|
|
|
|
void on_request(uint64 id, const td_api::testCallEmpty &request);
|
|
|
|
void on_request(uint64 id, const td_api::testSquareInt &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
void on_request(uint64 id, td_api::testCallString &request);
|
|
|
|
void on_request(uint64 id, td_api::testCallBytes &request);
|
|
|
|
void on_request(uint64 id, td_api::testCallVectorInt &request);
|
|
|
|
void on_request(uint64 id, td_api::testCallVectorIntObject &request);
|
|
|
|
void on_request(uint64 id, td_api::testCallVectorString &request);
|
|
|
|
void on_request(uint64 id, td_api::testCallVectorStringObject &request);
|
|
|
|
|
|
|
|
template <class T>
|
2018-10-01 04:22:56 +02:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const T &request) {
|
2020-06-23 08:56:47 +02:00
|
|
|
return td_api::make_object<td_api::error>(400, "The method can't be executed synchronously");
|
2018-10-01 04:22:56 +02:00
|
|
|
}
|
2018-12-31 20:04:05 +01:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getTextEntities &request);
|
2018-01-30 18:06:54 +01:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(td_api::parseTextEntities &request);
|
2020-03-09 21:55:32 +01:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(td_api::parseMarkdown &request);
|
2020-03-12 04:22:14 +01:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(td_api::getMarkdownText &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getFileMimeType &request);
|
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getFileExtension &request);
|
2018-04-30 14:50:54 +02:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::cleanFileName &request);
|
2018-07-23 19:29:14 +02:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getLanguagePackString &request);
|
2018-12-28 23:48:32 +01:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getPushReceiverId &request);
|
2020-06-05 02:43:13 +02:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getChatFilterDefaultIconName &request);
|
2018-12-10 02:01:02 +01:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(td_api::getJsonValue &request);
|
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getJsonString &request);
|
2018-10-24 17:42:40 +02:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(td_api::setLogStream &request);
|
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getLogStream &request);
|
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::setLogVerbosityLevel &request);
|
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getLogVerbosityLevel &request);
|
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getLogTags &request);
|
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::setLogTagVerbosityLevel &request);
|
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getLogTagVerbosityLevel &request);
|
2019-04-13 20:40:31 +02:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::addLogMessage &request);
|
2019-08-06 02:29:16 +02:00
|
|
|
static td_api::object_ptr<td_api::Object> do_static_request(td_api::testReturnError &request);
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2018-10-01 22:18:05 +02:00
|
|
|
static DbKey as_db_key(string key);
|
2018-12-31 20:04:05 +01:00
|
|
|
Status init(DbKey key) TD_WARN_UNUSED_RESULT;
|
2019-04-26 21:44:32 +02:00
|
|
|
void init_options_and_network();
|
|
|
|
void init_connection_creator();
|
|
|
|
void init_file_manager();
|
|
|
|
void init_managers();
|
2018-12-31 20:04:05 +01:00
|
|
|
void clear();
|
|
|
|
void close_impl(bool destroy_flag);
|
2018-10-01 22:18:05 +02:00
|
|
|
static Status fix_parameters(TdParameters ¶meters) TD_WARN_UNUSED_RESULT;
|
2018-02-09 11:29:50 +01:00
|
|
|
Status set_parameters(td_api::object_ptr<td_api::tdlibParameters> parameters) TD_WARN_UNUSED_RESULT;
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2018-10-01 22:18:05 +02:00
|
|
|
static td_api::object_ptr<td_api::error> make_error(int32 code, CSlice error) {
|
|
|
|
return td_api::make_object<td_api::error>(code, error.str());
|
|
|
|
}
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
// Actor
|
|
|
|
void start_up() override;
|
|
|
|
void tear_down() override;
|
|
|
|
void hangup_shared() override;
|
|
|
|
void hangup() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace td
|