tdlight/td/telegram/Td.h

1810 lines
65 KiB
C
Raw Normal View History

//
2022-12-31 22:28:08 +01:00
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
//
// 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
#include "td/telegram/ConnectionState.h"
#include "td/telegram/files/FileId.h"
#include "td/telegram/net/MtprotoHeader.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/net/NetQueryStats.h"
2021-09-18 23:47:05 +02:00
#include "td/telegram/td_api.h"
#include "td/telegram/TdCallback.h"
2022-06-10 15:44:53 +02:00
#include "td/telegram/TdDb.h"
2021-09-18 23:47:05 +02:00
#include "td/telegram/telegram_api.h"
#include "td/telegram/TermsOfService.h"
2021-09-18 23:47:05 +02:00
#include "td/db/DbKey.h"
#include "td/actor/actor.h"
2022-07-02 22:32:18 +02:00
#include "td/actor/MultiTimeout.h"
#include "td/utils/buffer.h"
#include "td/utils/common.h"
#include "td/utils/Container.h"
2022-02-07 22:04:34 +01:00
#include "td/utils/FlatHashMap.h"
#include "td/utils/logging.h"
2022-06-27 12:30:18 +02:00
#include "td/utils/Promise.h"
#include "td/utils/Slice.h"
#include "td/utils/Status.h"
#include <memory>
2022-08-18 20:32:36 +02:00
#include <unordered_map>
#include <utility>
namespace td {
2023-09-08 15:19:30 +02:00
class AccountManager;
class AnimationsManager;
2022-03-25 12:17:09 +01:00
class AttachMenuManager;
class AudiosManager;
class AuthManager;
2023-02-03 08:41:31 +01:00
class AutosaveManager;
class BackgroundManager;
2023-10-19 15:25:51 +02:00
class BoostManager;
2023-04-16 22:12:28 +02:00
class BotInfoManager;
class CallManager;
class CallbackQueriesManager;
class ConfigManager;
class ContactsManager;
class CountryInfoManager;
class DeviceTokenManager;
2023-03-27 10:27:17 +02:00
class DialogFilterManager;
class DocumentsManager;
2022-02-23 19:34:09 +01:00
class DownloadManager;
class FileManager;
class FileReferenceManager;
2022-10-25 14:03:35 +02:00
class ForumTopicManager;
2021-09-07 09:02:44 +02:00
class GameManager;
2020-11-24 16:22:00 +01:00
class GroupCallManager;
class InlineQueriesManager;
class HashtagHints;
class LanguagePackManager;
2021-05-25 01:24:30 +02:00
class LinkManager;
class MessagesManager;
class NetStatsManager;
class NotificationManager;
2022-04-04 23:40:22 +02:00
class NotificationSettingsManager;
2021-12-15 23:09:59 +01:00
class OptionManager;
class PasswordManager;
class PhoneNumberManager;
class PollManager;
class PrivacyManager;
class ReactionManager;
class SecureManager;
class SecretChatsManager;
2021-09-07 14:49:34 +02:00
class SponsoredMessageManager;
class StateManager;
2023-09-19 20:24:19 +02:00
class StatisticsManager;
class StickersManager;
class StorageManager;
2023-05-01 21:19:16 +02:00
class StoryManager;
2021-08-27 14:51:50 +02:00
class ThemeManager;
class TopDialogManager;
2023-01-18 12:47:31 +01:00
class TranslationManager;
class UpdatesManager;
class VideoNotesManager;
class VideosManager;
class VoiceNotesManager;
class WebPagesManager;
extern int VERBOSITY_NAME(td_init);
extern int VERBOSITY_NAME(td_requests);
// 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.
2022-09-30 15:52:27 +02:00
// It happens after destruction of callback
class Td final : public Actor {
public:
Td(const Td &) = delete;
Td(Td &&) = delete;
Td &operator=(const Td &) = delete;
Td &operator=(Td &&) = delete;
2021-07-03 22:51:36 +02:00
~Td() final;
struct Options {
std::shared_ptr<NetQueryStats> net_query_stats;
};
Td(unique_ptr<TdCallback> callback, Options options);
void request(uint64 id, tl_object_ptr<td_api::Function> function);
void destroy();
void schedule_get_terms_of_service(int32 expires_in);
2023-03-22 17:52:06 +01:00
void reload_promo_data();
2023-07-27 11:52:29 +02:00
void on_update(telegram_api::object_ptr<telegram_api::Updates> updates, uint64 auth_key_id);
2021-09-10 16:32:39 +02:00
void on_result(NetQueryPtr query);
void on_online_updated(bool force, bool send_update);
void on_update_status_success(bool is_online);
bool is_online() const;
void set_is_online(bool is_online);
2021-03-02 02:06:02 +01:00
void set_is_bot_online(bool is_bot_online);
bool can_ignore_background_updates() const {
return can_ignore_background_updates_;
}
bool ignore_background_updates() const;
unique_ptr<AudiosManager> audios_manager_;
unique_ptr<CallbackQueriesManager> callback_queries_manager_;
unique_ptr<DocumentsManager> documents_manager_;
2022-08-18 17:52:59 +02:00
unique_ptr<OptionManager> option_manager_;
unique_ptr<VideosManager> videos_manager_;
2023-09-08 15:19:30 +02:00
unique_ptr<AccountManager> account_manager_;
ActorOwn<AccountManager> account_manager_actor_;
unique_ptr<AnimationsManager> animations_manager_;
ActorOwn<AnimationsManager> animations_manager_actor_;
2022-03-25 12:17:09 +01:00
unique_ptr<AttachMenuManager> attach_menu_manager_;
ActorOwn<AttachMenuManager> attach_menu_manager_actor_;
unique_ptr<AuthManager> auth_manager_;
ActorOwn<AuthManager> auth_manager_actor_;
2023-02-03 08:41:31 +01:00
unique_ptr<AutosaveManager> autosave_manager_;
ActorOwn<AutosaveManager> autosave_manager_actor_;
unique_ptr<BackgroundManager> background_manager_;
ActorOwn<BackgroundManager> background_manager_actor_;
2023-10-19 15:25:51 +02:00
unique_ptr<BoostManager> boost_manager_;
ActorOwn<BoostManager> boost_manager_actor_;
2023-04-16 22:12:28 +02:00
unique_ptr<BotInfoManager> bot_info_manager_;
ActorOwn<BotInfoManager> bot_info_manager_actor_;
unique_ptr<ContactsManager> contacts_manager_;
ActorOwn<ContactsManager> contacts_manager_actor_;
unique_ptr<CountryInfoManager> country_info_manager_;
ActorOwn<CountryInfoManager> country_info_manager_actor_;
2023-03-27 10:27:17 +02:00
unique_ptr<DialogFilterManager> dialog_filter_manager_;
ActorOwn<DialogFilterManager> dialog_filter_manager_actor_;
2022-02-23 19:34:09 +01:00
unique_ptr<DownloadManager> download_manager_;
2022-02-23 20:56:03 +01:00
ActorOwn<DownloadManager> download_manager_actor_;
unique_ptr<FileManager> file_manager_;
ActorOwn<FileManager> file_manager_actor_;
unique_ptr<FileReferenceManager> file_reference_manager_;
ActorOwn<FileReferenceManager> file_reference_manager_actor_;
2022-10-25 14:03:35 +02:00
unique_ptr<ForumTopicManager> forum_topic_manager_;
ActorOwn<ForumTopicManager> forum_topic_manager_actor_;
2021-09-07 09:02:44 +02:00
unique_ptr<GameManager> game_manager_;
ActorOwn<GameManager> game_manager_actor_;
2020-11-24 16:22:00 +01:00
unique_ptr<GroupCallManager> group_call_manager_;
ActorOwn<GroupCallManager> group_call_manager_actor_;
unique_ptr<InlineQueriesManager> inline_queries_manager_;
ActorOwn<InlineQueriesManager> inline_queries_manager_actor_;
2021-05-25 01:24:30 +02:00
unique_ptr<LinkManager> link_manager_;
ActorOwn<LinkManager> link_manager_actor_;
unique_ptr<MessagesManager> messages_manager_;
ActorOwn<MessagesManager> messages_manager_actor_;
unique_ptr<NotificationManager> notification_manager_;
ActorOwn<NotificationManager> notification_manager_actor_;
2022-04-04 23:40:22 +02:00
unique_ptr<NotificationSettingsManager> notification_settings_manager_;
ActorOwn<NotificationSettingsManager> notification_settings_manager_actor_;
unique_ptr<PollManager> poll_manager_;
ActorOwn<PollManager> poll_manager_actor_;
unique_ptr<PrivacyManager> privacy_manager_;
ActorOwn<PrivacyManager> privacy_manager_actor_;
unique_ptr<ReactionManager> reaction_manager_;
ActorOwn<ReactionManager> reaction_manager_actor_;
2021-09-07 14:49:34 +02:00
unique_ptr<SponsoredMessageManager> sponsored_message_manager_;
ActorOwn<SponsoredMessageManager> sponsored_message_manager_actor_;
2023-09-19 20:24:19 +02:00
unique_ptr<StatisticsManager> statistics_manager_;
ActorOwn<StatisticsManager> statistics_manager_actor_;
unique_ptr<StickersManager> stickers_manager_;
ActorOwn<StickersManager> stickers_manager_actor_;
2023-05-01 21:19:16 +02:00
unique_ptr<StoryManager> story_manager_;
ActorOwn<StoryManager> story_manager_actor_;
2021-08-27 14:51:50 +02:00
unique_ptr<ThemeManager> theme_manager_;
ActorOwn<ThemeManager> theme_manager_actor_;
unique_ptr<TopDialogManager> top_dialog_manager_;
ActorOwn<TopDialogManager> top_dialog_manager_actor_;
2023-01-18 12:47:31 +01:00
unique_ptr<TranslationManager> translation_manager_;
ActorOwn<TranslationManager> translation_manager_actor_;
unique_ptr<UpdatesManager> updates_manager_;
ActorOwn<UpdatesManager> updates_manager_actor_;
2022-10-20 17:53:12 +02:00
unique_ptr<VideoNotesManager> video_notes_manager_;
ActorOwn<VideoNotesManager> video_notes_manager_actor_;
2022-05-27 18:07:37 +02:00
unique_ptr<VoiceNotesManager> voice_notes_manager_;
ActorOwn<VoiceNotesManager> voice_notes_manager_actor_;
unique_ptr<WebPagesManager> web_pages_manager_;
ActorOwn<WebPagesManager> web_pages_manager_actor_;
ActorOwn<CallManager> call_manager_;
ActorOwn<PhoneNumberManager> change_phone_number_manager_;
ActorOwn<ConfigManager> config_manager_;
ActorOwn<PhoneNumberManager> confirm_phone_number_manager_;
ActorOwn<DeviceTokenManager> device_token_manager_;
ActorOwn<HashtagHints> hashtag_hints_;
ActorOwn<LanguagePackManager> language_pack_manager_;
ActorOwn<NetStatsManager> net_stats_manager_;
ActorOwn<PasswordManager> password_manager_;
ActorOwn<SecretChatsManager> secret_chats_manager_;
2022-10-03 13:39:20 +02:00
ActorOwn<SecureManager> secure_manager_;
ActorOwn<StateManager> state_manager_;
ActorOwn<StorageManager> storage_manager_;
ActorOwn<PhoneNumberManager> verify_phone_number_manager_;
class ResultHandler : public std::enable_shared_from_this<ResultHandler> {
public:
ResultHandler() = default;
ResultHandler(const ResultHandler &) = delete;
ResultHandler &operator=(const ResultHandler &) = delete;
virtual ~ResultHandler() = default;
virtual void on_result(BufferSlice packet) {
UNREACHABLE();
}
virtual void on_error(Status status) {
UNREACHABLE();
}
friend class Td;
protected:
void send_query(NetQueryPtr query);
Td *td_ = nullptr;
bool is_query_sent_ = false;
private:
void set_td(Td *td);
};
template <class HandlerT, class... Args>
2021-12-09 22:27:13 +01:00
std::shared_ptr<HandlerT> create_handler(Args &&...args) {
LOG_CHECK(close_flag_ < 2) << close_flag_
#if TD_CLANG || TD_GCC
<< ' ' << __PRETTY_FUNCTION__
#endif
;
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:
static constexpr int64 ONLINE_ALARM_ID = 0;
static constexpr int64 PING_SERVER_ALARM_ID = -1;
static constexpr int32 PING_SERVER_TIMEOUT = 300;
static constexpr int64 TERMS_OF_SERVICE_ALARM_ID = -2;
static constexpr int64 PROMO_DATA_ALARM_ID = -3;
void on_connection_state_changed(ConnectionState new_state);
2022-06-10 15:44:53 +02:00
void run_request(uint64 id, tl_object_ptr<td_api::Function> function);
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);
ActorShared<Td> create_reference();
void inc_actor_refcnt();
void dec_actor_refcnt();
void inc_request_actor_refcnt();
void dec_request_actor_refcnt();
void close();
void on_closed();
void dec_stop_cnt();
unique_ptr<TdCallback> callback_;
Options td_options_;
MtprotoHeader::Options options_;
ConnectionState connection_state_ = ConnectionState::Empty;
2022-08-18 20:32:36 +02:00
std::unordered_multimap<uint64, int32> request_set_;
int actor_refcnt_ = 0;
int request_actor_refcnt_ = 0;
int stop_cnt_ = 2;
bool destroy_flag_ = false;
int close_flag_ = 0;
enum class State : int32 { WaitParameters, Run, Close } state_ = State::WaitParameters;
uint64 set_parameters_request_id_ = 0;
FlatHashMap<uint64, std::shared_ptr<ResultHandler>> result_handlers_;
enum : int8 { RequestActorIdType = 1, ActorIdType = 2 };
Container<ActorOwn<Actor>> request_actors_;
bool can_ignore_background_updates_ = false;
2023-03-22 17:52:06 +01:00
bool reloading_promo_data_ = false;
bool need_reload_promo_data_ = false;
bool is_online_ = false;
2021-03-02 02:06:02 +01:00
bool is_bot_online_ = false;
NetQueryRef update_status_query_;
int64 alarm_id_ = 1;
FlatHashMap<int64, uint64> pending_alarms_;
MultiTimeout alarm_timeout_{"AlarmTimeout"};
TermsOfService pending_terms_of_service_;
struct DownloadInfo {
2022-05-11 16:17:20 +02:00
int64 offset = -1;
int64 limit = -1;
vector<uint64> request_ids;
};
FlatHashMap<FileId, DownloadInfo, FileIdHash> pending_file_downloads_;
vector<std::pair<uint64, td_api::object_ptr<td_api::Function>>> pending_preauthentication_requests_;
vector<std::pair<uint64, td_api::object_ptr<td_api::Function>>> pending_set_parameters_requests_;
2022-06-10 15:44:53 +02:00
vector<std::pair<uint64, td_api::object_ptr<td_api::Function>>> pending_init_requests_;
template <class T>
void complete_pending_preauthentication_requests(const T &func);
td_api::object_ptr<td_api::AuthorizationState> get_fake_authorization_state_object() const;
vector<td_api::object_ptr<td_api::Update>> get_fake_current_state() const;
static void on_alarm_timeout_callback(void *td_ptr, int64 alarm_id);
void on_alarm_timeout(int64 alarm_id);
td_api::object_ptr<td_api::updateTermsOfService> get_update_terms_of_service_object() const;
void on_get_terms_of_service(Result<std::pair<int32, TermsOfService>> result, bool dummy);
2021-10-19 17:11:16 +02:00
void on_get_promo_data(Result<telegram_api::object_ptr<telegram_api::help_PromoData>> r_promo_data, bool dummy);
template <class T>
friend class RequestActor; // uses send_result/send_error
friend class AuthManager; // uses send_result/send_error, TODO pass Promise<>
friend class PhoneNumberManager; // uses send_result/send_error, TODO pass Promise<>
void add_handler(uint64 id, std::shared_ptr<ResultHandler> handler);
std::shared_ptr<ResultHandler> extract_handler(uint64 id);
void clear_requests();
void on_file_download_finished(FileId file_id);
class OnRequest;
class DownloadFileCallback;
std::shared_ptr<DownloadFileCallback> download_file_callback_;
class UploadFileCallback;
std::shared_ptr<UploadFileCallback> upload_file_callback_;
std::shared_ptr<ActorContext> old_context_;
2023-03-22 17:52:06 +01:00
void schedule_get_promo_data(int32 expires_in);
static int *get_log_verbosity_level(Slice name);
template <class T>
Promise<T> create_request_promise(uint64 id) {
return PromiseCreator::lambda([actor_id = actor_id(this), id](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());
}
});
}
Promise<Unit> create_ok_request_promise(uint64 id);
static bool is_authentication_request(int32 id);
static bool is_synchronous_request(const td_api::Function *function);
static bool is_preinitialization_request(int32 id);
static bool is_preauthentication_request(int32 id);
template <class T>
void on_request(uint64 id, const T &) = delete;
void on_request(uint64 id, const td_api::setTdlibParameters &request);
void on_request(uint64 id, const td_api::getAuthorizationState &request);
void on_request(uint64 id, td_api::setAuthenticationPhoneNumber &request);
2023-01-19 14:45:47 +01:00
void on_request(uint64 id, td_api::sendAuthenticationFirebaseSms &request);
void on_request(uint64 id, td_api::setAuthenticationEmailAddress &request);
void on_request(uint64 id, const td_api::resendAuthenticationCode &request);
void on_request(uint64 id, td_api::checkAuthenticationEmailCode &request);
void on_request(uint64 id, td_api::checkAuthenticationCode &request);
void on_request(uint64 id, td_api::registerUser &request);
void on_request(uint64 id, td_api::requestQrCodeAuthentication &request);
void on_request(uint64 id, const td_api::resetAuthenticationEmailAddress &request);
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::checkAuthenticationPasswordRecoveryCode &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);
void on_request(uint64 id, td_api::confirmQrCodeAuthentication &request);
void on_request(uint64 id, td_api::setDatabaseEncryptionKey &request);
void on_request(uint64 id, const td_api::getCurrentState &request);
void on_request(uint64 id, td_api::getPasswordState &request);
void on_request(uint64 id, td_api::setPassword &request);
2022-09-07 12:49:48 +02:00
void on_request(uint64 id, td_api::setLoginEmailAddress &request);
void on_request(uint64 id, const td_api::resendLoginEmailAddressCode &request);
void on_request(uint64 id, td_api::checkLoginEmailAddressCode &request);
void on_request(uint64 id, td_api::getRecoveryEmailAddress &request);
void on_request(uint64 id, td_api::setRecoveryEmailAddress &request);
void on_request(uint64 id, td_api::checkRecoveryEmailAddressCode &request);
void on_request(uint64 id, const td_api::resendRecoveryEmailAddressCode &request);
void on_request(uint64 id, td_api::requestPasswordRecovery &request);
2021-06-28 22:47:54 +02:00
void on_request(uint64 id, td_api::checkPasswordRecoveryCode &request);
void on_request(uint64 id, td_api::recoverPassword &request);
2021-06-29 04:16:48 +02:00
void on_request(uint64 id, const td_api::resetPassword &request);
2021-06-30 18:49:52 +02:00
void on_request(uint64 id, const td_api::cancelPasswordReset &request);
2021-06-29 04:24:55 +02:00
void on_request(uint64 id, td_api::getTemporaryPasswordState &request);
void on_request(uint64 id, td_api::createTemporaryPassword &request);
void on_request(uint64 id, td_api::processPushNotification &request);
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::getDefaultMessageAutoDeleteTime &request);
2022-11-29 17:51:33 +01:00
void on_request(uint64 id, const td_api::setDefaultMessageAutoDeleteTime &request);
2022-11-29 16:53:36 +01:00
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);
2022-12-01 13:08:13 +01:00
void on_request(uint64 id, const td_api::getUserLink &request);
2022-12-01 14:54:58 +01:00
void on_request(uint64 id, td_api::searchUserByToken &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);
2023-09-12 13:28:02 +02:00
void on_request(uint64 id, const td_api::confirmSession &request);
void on_request(uint64 id, const td_api::toggleSessionCanAcceptCalls &request);
2021-11-16 13:22:00 +01:00
void on_request(uint64 id, const td_api::toggleSessionCanAcceptSecretChats &request);
2021-11-24 12:03:35 +01:00
void on_request(uint64 id, const td_api::setInactiveSessionTtl &request);
2021-11-16 14:04:19 +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);
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);
void on_request(uint64 id, const td_api::getMessageLocally &request);
void on_request(uint64 id, const td_api::getRepliedMessage &request);
void on_request(uint64 id, const td_api::getChatPinnedMessage &request);
void on_request(uint64 id, const td_api::getCallbackQueryMessage &request);
void on_request(uint64 id, const td_api::getMessageThread &request);
2021-09-03 15:14:03 +02:00
void on_request(uint64 id, const td_api::getMessageViewers &request);
void on_request(uint64 id, const td_api::getMessages &request);
2022-10-21 14:04:56 +02:00
void on_request(uint64 id, const td_api::getChatSponsoredMessages &request);
2021-08-24 22:44:47 +02:00
2023-05-04 16:21:50 +02:00
void on_request(uint64 id, const td_api::clickChatSponsoredMessage &request);
void on_request(uint64 id, const td_api::getMessageLink &request);
void on_request(uint64 id, const td_api::getMessageEmbeddingCode &request);
void on_request(uint64 id, td_api::getMessageLinkInfo &request);
void on_request(uint64 id, td_api::translateText &request);
2022-01-14 20:28:28 +01:00
2023-01-23 13:46:26 +01:00
void on_request(uint64 id, td_api::translateMessageText &request);
2022-05-25 20:18:40 +02:00
void on_request(uint64 id, const td_api::recognizeSpeech &request);
2022-05-26 19:40:43 +02:00
void on_request(uint64 id, const td_api::rateSpeechRecognition &request);
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);
void on_request(uint64 id, td_api::getDatabaseStatistics &request);
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);
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);
2023-02-03 10:39:23 +01:00
void on_request(uint64 id, const td_api::getAutosaveSettings &request);
2023-02-03 13:58:15 +01:00
void on_request(uint64 id, td_api::setAutosaveSettings &request);
void on_request(uint64 id, const td_api::clearAutosaveSettingsExceptions &request);
2023-11-20 20:03:21 +01:00
void on_request(uint64 id, const td_api::getSimilarChats &request);
void on_request(uint64 id, const td_api::getTopChats &request);
void on_request(uint64 id, const td_api::removeTopChat &request);
2021-08-10 16:52:31 +02:00
void on_request(uint64 id, const td_api::loadChats &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);
void on_request(uint64 id, td_api::searchChatsOnServer &request);
void on_request(uint64 id, const td_api::searchChatsNearby &request);
2023-05-16 20:41:19 +02:00
void on_request(uint64 id, td_api::searchRecentlyFoundChats &request);
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);
2021-09-14 13:18:37 +02:00
void on_request(uint64 id, const td_api::getRecentlyOpenedChats &request);
void on_request(uint64 id, const td_api::getGroupsInCommon &request);
void on_request(uint64 id, td_api::checkChatUsername &request);
void on_request(uint64 id, const td_api::getCreatedPublicChats &request);
void on_request(uint64 id, const td_api::checkCreatedPublicChatsLimit &request);
void on_request(uint64 id, const td_api::getSuitableDiscussionChats &request);
void on_request(uint64 id, const td_api::getInactiveSupergroupChats &request);
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-09-15 23:41:40 +02:00
void on_request(uint64 id, const td_api::clickAnimatedEmojiMessage &request);
2023-03-02 14:21:36 +01:00
void on_request(uint64 id, const td_api::getInternalLink &request);
2021-06-01 04:41:32 +02:00
void on_request(uint64 id, const td_api::getInternalLinkType &request);
2021-03-15 22:52:37 +01:00
void on_request(uint64 id, td_api::getExternalLinkInfo &request);
2021-02-04 12:36:11 +01:00
void on_request(uint64 id, td_api::getExternalLink &request);
void on_request(uint64 id, const td_api::getChatHistory &request);
void on_request(uint64 id, const td_api::deleteChatHistory &request);
void on_request(uint64 id, const td_api::deleteChat &request);
void on_request(uint64 id, const td_api::getMessageThreadHistory &request);
2021-10-30 02:34:49 +02:00
void on_request(uint64 id, td_api::getChatMessageCalendar &request);
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, const td_api::searchCallMessages &request);
void on_request(uint64 id, td_api::searchOutgoingDocumentMessages &request);
2021-01-19 11:21:50 +01:00
void on_request(uint64 id, const td_api::deleteAllCallMessages &request);
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);
void on_request(uint64 id, const td_api::getChatSparseMessagePositions &request);
void on_request(uint64 id, const td_api::getChatMessageCount &request);
2022-09-30 19:04:21 +02:00
void on_request(uint64 id, const td_api::getChatMessagePosition &request);
void on_request(uint64 id, const td_api::getChatScheduledMessages &request);
2022-09-12 14:03:35 +02:00
void on_request(uint64 id, const td_api::getEmojiReaction &request);
void on_request(uint64 id, const td_api::getCustomEmojiReactionAnimations &request);
void on_request(uint64 id, const td_api::getMessageAvailableReactions &request);
2022-09-12 18:37:45 +02:00
void on_request(uint64 id, const td_api::clearRecentReactions &request);
void on_request(uint64 id, td_api::addMessageReaction &request);
void on_request(uint64 id, td_api::removeMessageReaction &request);
2022-01-21 18:39:55 +01:00
2022-01-26 23:52:21 +01:00
void on_request(uint64 id, td_api::getMessageAddedReactions &request);
2022-01-21 14:46:16 +01:00
2022-08-16 22:08:36 +02:00
void on_request(uint64 id, td_api::setDefaultReactionType &request);
void on_request(uint64 id, td_api::getMessagePublicForwards &request);
void on_request(uint64 id, const td_api::removeNotification &request);
void on_request(uint64 id, const td_api::removeNotificationGroup &request);
void on_request(uint64 id, const td_api::deleteMessages &request);
void on_request(uint64 id, const td_api::deleteChatMessagesBySender &request);
2021-10-25 19:39:22 +02:00
void on_request(uint64 id, const td_api::deleteChatMessagesByDate &request);
void on_request(uint64 id, const td_api::readAllChatMentions &request);
void on_request(uint64 id, const td_api::readAllMessageThreadMentions &request);
2022-01-30 10:37:24 +01:00
void on_request(uint64 id, const td_api::readAllChatReactions &request);
void on_request(uint64 id, const td_api::readAllMessageThreadReactions &request);
2021-11-12 15:11:01 +01:00
void on_request(uint64 id, const td_api::getChatAvailableMessageSenders &request);
void on_request(uint64 id, const td_api::setChatMessageSender &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);
void on_request(uint64 id, td_api::addLocalMessage &request);
void on_request(uint64 id, td_api::editMessageText &request);
void on_request(uint64 id, td_api::editMessageLiveLocation &request);
void on_request(uint64 id, td_api::editMessageMedia &request);
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);
void on_request(uint64 id, td_api::editInlineMessageMedia &request);
void on_request(uint64 id, td_api::editInlineMessageCaption &request);
void on_request(uint64 id, td_api::editInlineMessageReplyMarkup &request);
void on_request(uint64 id, td_api::editMessageSchedulingState &request);
2023-06-05 15:55:06 +02:00
void on_request(uint64 id, const td_api::getStory &request);
2023-09-14 17:59:30 +02:00
void on_request(uint64 id, const td_api::getChatsToSendStories &request);
2023-08-11 18:43:26 +02:00
void on_request(uint64 id, const td_api::canSendStory &request);
2023-05-25 14:03:29 +02:00
void on_request(uint64 id, td_api::sendStory &request);
2023-05-30 13:41:36 +02:00
void on_request(uint64 id, td_api::editStory &request);
2023-07-18 15:00:06 +02:00
void on_request(uint64 id, td_api::setStoryPrivacySettings &request);
2023-05-25 17:18:28 +02:00
2023-05-26 13:21:36 +02:00
void on_request(uint64 id, const td_api::toggleStoryIsPinned &request);
2023-06-01 16:28:49 +02:00
void on_request(uint64 id, const td_api::deleteStory &request);
2023-06-29 13:22:50 +02:00
void on_request(uint64 id, const td_api::loadActiveStories &request);
void on_request(uint64 id, const td_api::setChatActiveStoriesList &request);
2022-10-27 09:06:13 +02:00
void on_request(uint64 id, const td_api::getForumTopicDefaultIcons &request);
2022-10-25 15:10:15 +02:00
void on_request(uint64 id, td_api::createForumTopic &request);
2022-10-27 15:53:23 +02:00
void on_request(uint64 id, td_api::editForumTopic &request);
2022-12-02 15:04:24 +01:00
void on_request(uint64 id, const td_api::getForumTopic &request);
2022-12-05 11:03:38 +01:00
void on_request(uint64 id, const td_api::getForumTopicLink &request);
2022-12-06 16:16:22 +01:00
void on_request(uint64 id, td_api::getForumTopics &request);
2022-10-27 16:31:05 +02:00
void on_request(uint64 id, const td_api::toggleForumTopicIsClosed &request);
void on_request(uint64 id, const td_api::toggleGeneralForumTopicIsHidden &request);
2022-12-29 21:23:09 +01:00
void on_request(uint64 id, const td_api::toggleForumTopicIsPinned &request);
2022-12-29 21:48:19 +01:00
void on_request(uint64 id, const td_api::setPinnedForumTopics &request);
2022-10-29 23:35:37 +02:00
void on_request(uint64 id, const td_api::deleteForumTopic &request);
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::forwardMessages &request);
void on_request(uint64 id, td_api::resendMessages &request);
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);
void on_request(uint64 id, const td_api::createCall &request);
void on_request(uint64 id, const td_api::acceptCall &request);
void on_request(uint64 id, td_api::sendCallSignalingData &request);
void on_request(uint64 id, const td_api::discardCall &request);
void on_request(uint64 id, td_api::sendCallRating &request);
void on_request(uint64 id, td_api::sendCallDebugInformation &request);
2022-04-22 14:16:09 +02:00
void on_request(uint64 id, td_api::sendCallLog &request);
2021-10-14 14:44:21 +02:00
void on_request(uint64 id, const td_api::getVideoChatAvailableParticipants &request);
2021-10-14 14:44:21 +02:00
void on_request(uint64 id, const td_api::setVideoChatDefaultParticipant &request);
2021-10-14 14:44:21 +02:00
void on_request(uint64 id, td_api::createVideoChat &request);
void on_request(uint64 id, const td_api::getVideoChatRtmpUrl &request);
void on_request(uint64 id, const td_api::replaceVideoChatRtmpUrl &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);
2021-04-07 01:11:14 +02:00
void on_request(uint64 id, const td_api::startScheduledGroupCall &request);
void on_request(uint64 id, const td_api::toggleGroupCallEnabledStartNotification &request);
2020-11-26 12:32:29 +01:00
void on_request(uint64 id, td_api::joinGroupCall &request);
2021-04-30 18:53:39 +02:00
void on_request(uint64 id, td_api::startGroupCallScreenSharing &request);
2021-04-30 19:21:07 +02:00
void on_request(uint64 id, const td_api::endGroupCallScreenSharing &request);
2021-03-02 17:44:57 +01:00
void on_request(uint64 id, td_api::setGroupCallTitle &request);
void on_request(uint64 id, const td_api::toggleGroupCallMuteNewParticipants &request);
2021-03-12 17:31:52 +01:00
void on_request(uint64 id, const td_api::revokeGroupCallInviteLink &request);
2021-03-12 16:58:43 +01:00
void on_request(uint64 id, const td_api::inviteGroupCallParticipants &request);
2020-11-27 13:22:19 +01:00
2021-03-12 17:29:06 +01:00
void on_request(uint64 id, const td_api::getGroupCallInviteLink &request);
2021-03-11 20:19:19 +01:00
void on_request(uint64 id, td_api::startGroupCallRecording &request);
2021-06-04 00:17:15 +02:00
void on_request(uint64 id, const td_api::toggleGroupCallScreenSharingIsPaused &request);
2021-06-01 23:38:08 +02:00
2021-03-11 20:19:19 +01:00
void on_request(uint64 id, const td_api::endGroupCallRecording &request);
2021-06-01 19:11:18 +02:00
void on_request(uint64 id, const td_api::toggleGroupCallIsMyVideoPaused &request);
2021-05-02 01:40:22 +02:00
void on_request(uint64 id, const td_api::toggleGroupCallIsMyVideoEnabled &request);
void on_request(uint64 id, const td_api::setGroupCallParticipantIsSpeaking &request);
void on_request(uint64 id, const td_api::toggleGroupCallParticipantIsMuted &request);
void on_request(uint64 id, const td_api::setGroupCallParticipantVolumeLevel &request);
void on_request(uint64 id, const td_api::toggleGroupCallParticipantIsHandRaised &request);
2020-12-11 17:39:27 +01:00
void on_request(uint64 id, const td_api::loadGroupCallParticipants &request);
2020-11-26 09:37:54 +01:00
void on_request(uint64 id, const td_api::leaveGroupCall &request);
2021-12-23 11:00:05 +01:00
void on_request(uint64 id, const td_api::endGroupCall &request);
2020-11-26 09:21:26 +01:00
2022-02-22 15:42:58 +01:00
void on_request(uint64 id, const td_api::getGroupCallStreams &request);
void on_request(uint64 id, td_api::getGroupCallStreamSegment &request);
2021-03-10 20:50:14 +01:00
void on_request(uint64 id, const td_api::upgradeBasicGroupChatToSupergroupChat &request);
void on_request(uint64 id, const td_api::getChatListsToAddChat &request);
void on_request(uint64 id, const td_api::addChatToList &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, const td_api::getChatFolder &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, const td_api::getRecommendedChatFolders &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, td_api::createChatFolder &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, td_api::editChatFolder &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, const td_api::deleteChatFolder &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, const td_api::getChatFolderChatsToLeave &request);
2023-04-02 11:40:57 +02:00
2023-05-01 13:57:16 +02:00
void on_request(uint64 id, td_api::getChatFolderChatCount &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, const td_api::reorderChatFolders &request);
void on_request(uint64 id, const td_api::getChatsForChatFolderInviteLink &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, td_api::createChatFolderInviteLink &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, td_api::getChatFolderInviteLinks &request);
2023-03-30 16:15:04 +02:00
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, td_api::editChatFolderInviteLink &request);
2023-03-30 18:37:01 +02:00
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, td_api::deleteChatFolderInviteLink &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, td_api::checkChatFolderInviteLink &request);
2023-03-31 14:50:49 +02:00
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, td_api::addChatFolderByInviteLink &request);
2023-03-31 15:48:32 +02:00
2023-04-04 15:21:31 +02:00
void on_request(uint64 id, const td_api::getChatFolderNewChats &request);
void on_request(uint64 id, const td_api::processChatFolderNewChats &request);
2023-04-05 18:43:58 +02:00
void on_request(uint64 id, const td_api::getArchiveChatListSettings &request);
void on_request(uint64 id, td_api::setArchiveChatListSettings &request);
void on_request(uint64 id, td_api::setChatTitle &request);
void on_request(uint64 id, const td_api::setChatPhoto &request);
2023-10-18 18:43:14 +02:00
void on_request(uint64 id, const td_api::setChatAccentColor &request);
void on_request(uint64 id, const td_api::setChatMessageAutoDeleteTime &request);
void on_request(uint64 id, const td_api::setChatPermissions &request);
2023-04-11 16:46:55 +02:00
void on_request(uint64 id, td_api::setChatBackground &request);
2023-11-10 12:53:16 +01:00
void on_request(uint64 id, const td_api::revertChatBackground &request);
2021-08-27 18:23:22 +02:00
void on_request(uint64 id, td_api::setChatTheme &request);
void on_request(uint64 id, td_api::setChatDraftMessage &request);
void on_request(uint64 id, const td_api::toggleChatHasProtectedContent &request);
2021-11-25 09:44:51 +01:00
void on_request(uint64 id, const td_api::toggleChatIsPinned &request);
2023-11-16 14:57:18 +01:00
void on_request(uint64 id, const td_api::toggleChatViewAsTopics &request);
void on_request(uint64 id, const td_api::toggleChatIsTranslatable &request);
void on_request(uint64 id, const td_api::toggleChatIsMarkedAsUnread &request);
2023-07-28 16:33:47 +02:00
void on_request(uint64 id, const td_api::setMessageSenderBlockList &request);
void on_request(uint64 id, const td_api::toggleChatDefaultDisableNotification &request);
void on_request(uint64 id, const td_api::setPinnedChats &request);
2023-04-14 14:17:25 +02:00
void on_request(uint64 id, const td_api::readChatList &request);
void on_request(uint64 id, const td_api::getStoryNotificationSettingsExceptions &request);
2023-06-27 21:45:01 +02:00
void on_request(uint64 id, const td_api::getChatActiveStories &request);
2023-06-09 16:21:34 +02:00
2023-06-27 21:45:01 +02:00
void on_request(uint64 id, const td_api::getChatPinnedStories &request);
2023-05-20 22:24:36 +02:00
void on_request(uint64 id, const td_api::getChatArchivedStories &request);
2023-05-21 11:39:53 +02:00
2023-06-14 14:17:24 +02:00
void on_request(uint64 id, const td_api::openStory &request);
void on_request(uint64 id, const td_api::closeStory &request);
void on_request(uint64 id, const td_api::getStoryAvailableReactions &request);
2023-08-06 22:28:00 +02:00
void on_request(uint64 id, const td_api::setStoryReaction &request);
2023-08-07 18:40:15 +02:00
void on_request(uint64 id, td_api::getStoryViewers &request);
2023-06-18 22:25:50 +02:00
2023-06-21 22:23:19 +02:00
void on_request(uint64 id, td_api::reportStory &request);
2023-08-04 14:23:51 +02:00
void on_request(uint64 id, const td_api::activateStoryStealthMode &request);
void on_request(uint64 id, const td_api::getAvailableChatBoostSlots &request);
2023-09-12 17:37:32 +02:00
void on_request(uint64 id, const td_api::getChatBoostStatus &request);
2023-09-15 14:11:37 +02:00
void on_request(uint64 id, const td_api::boostChat &request);
2023-09-15 15:37:17 +02:00
void on_request(uint64 id, const td_api::getChatBoostLink &request);
2023-09-15 18:07:18 +02:00
void on_request(uint64 id, td_api::getChatBoostLinkInfo &request);
2023-09-16 11:22:11 +02:00
void on_request(uint64 id, td_api::getChatBoosts &request);
2023-10-30 23:52:26 +01:00
void on_request(uint64 id, const td_api::getUserChatBoosts &request);
2022-04-14 21:56:27 +02:00
void on_request(uint64 id, const td_api::getAttachmentMenuBot &request);
2022-03-29 14:00:00 +02:00
2022-04-14 21:56:27 +02:00
void on_request(uint64 id, const td_api::toggleBotIsAddedToAttachmentMenu &request);
2022-01-05 14:23:35 +01:00
void on_request(uint64 id, td_api::setChatAvailableReactions &request);
void on_request(uint64 id, td_api::setChatClientData &request);
void on_request(uint64 id, td_api::setChatDescription &request);
void on_request(uint64 id, const td_api::setChatDiscussionGroup &request);
void on_request(uint64 id, td_api::setChatLocation &request);
void on_request(uint64 id, const td_api::setChatSlowModeDelay &request);
void on_request(uint64 id, const td_api::pinChatMessage &request);
void on_request(uint64 id, const td_api::unpinChatMessage &request);
void on_request(uint64 id, const td_api::unpinAllChatMessages &request);
void on_request(uint64 id, const td_api::unpinAllMessageThreadMessages &request);
void on_request(uint64 id, const td_api::joinChat &request);
void on_request(uint64 id, const td_api::leaveChat &request);
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);
void on_request(uint64 id, const td_api::canTransferOwnership &request);
void on_request(uint64 id, td_api::transferChatOwnership &request);
void on_request(uint64 id, const td_api::getChatMember &request);
void on_request(uint64 id, td_api::searchChatMembers &request);
void on_request(uint64 id, const td_api::getChatAdministrators &request);
void on_request(uint64 id, const td_api::replacePrimaryChatInviteLink &request);
2021-02-02 00:00:28 +01:00
void on_request(uint64 id, td_api::createChatInviteLink &request);
2021-01-12 17:21:12 +01:00
void on_request(uint64 id, td_api::editChatInviteLink &request);
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-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-10-13 21:33:31 +02:00
void on_request(uint64 id, td_api::getChatJoinRequests &request);
void on_request(uint64 id, const td_api::processChatJoinRequest &request);
2021-10-13 22:10:47 +02:00
2021-11-24 10:02:23 +01:00
void on_request(uint64 id, td_api::processChatJoinRequests &request);
2021-02-02 17:23:45 +01:00
void on_request(uint64 id, td_api::revokeChatInviteLink &request);
void on_request(uint64 id, td_api::deleteRevokedChatInviteLink &request);
void on_request(uint64 id, const td_api::deleteAllRevokedChatInviteLinks &request);
2021-02-02 00:00:28 +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);
void on_request(uint64 id, const td_api::clearAllDraftMessages &request);
void on_request(uint64 id, const td_api::downloadFile &request);
void on_request(uint64 id, const td_api::getFileDownloadedPrefixSize &request);
void on_request(uint64 id, const td_api::cancelDownloadFile &request);
2021-07-24 06:19:22 +02:00
void on_request(uint64 id, const td_api::getSuggestedFileName &request);
void on_request(uint64 id, td_api::preliminaryUploadFile &request);
void on_request(uint64 id, const td_api::cancelPreliminaryUploadFile &request);
void on_request(uint64 id, td_api::writeGeneratedFilePart &request);
void on_request(uint64 id, const td_api::setFileGenerationProgress &request);
void on_request(uint64 id, td_api::finishFileGeneration &request);
void on_request(uint64 id, const td_api::readFilePart &request);
void on_request(uint64 id, const td_api::deleteFile &request);
2022-02-17 23:37:04 +01:00
void on_request(uint64 id, const td_api::addFileToDownloads &request);
void on_request(uint64 id, const td_api::toggleDownloadIsPaused &request);
void on_request(uint64 id, const td_api::toggleAllDownloadsArePaused &request);
void on_request(uint64 id, const td_api::removeFileFromDownloads &request);
void on_request(uint64 id, const td_api::removeAllFilesFromDownloads &request);
void on_request(uint64 id, td_api::searchFileDownloads &request);
2021-01-22 17:14:35 +01:00
void on_request(uint64 id, td_api::getMessageFileType &request);
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);
void on_request(uint64 id, const td_api::blockMessageSenderFromReplies &request);
void on_request(uint64 id, const td_api::getBlockedMessageSenders &request);
void on_request(uint64 id, td_api::addContact &request);
void on_request(uint64 id, td_api::importContacts &request);
void on_request(uint64 id, const td_api::getContacts &request);
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);
2023-05-03 19:42:47 +02:00
void on_request(uint64 id, const td_api::getCloseFriends &request);
2023-05-04 17:27:03 +02:00
void on_request(uint64 id, const td_api::setCloseFriends &request);
void on_request(uint64 id, td_api::setUserPersonalProfilePhoto &request);
2022-12-26 11:49:00 +01:00
void on_request(uint64 id, td_api::suggestUserProfilePhoto &request);
2022-12-15 16:12:30 +01:00
2022-02-18 16:13:10 +01:00
void on_request(uint64 id, td_api::searchUserByPhoneNumber &request);
void on_request(uint64 id, const td_api::sharePhoneNumber &request);
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);
void on_request(uint64 id, td_api::toggleUsernameIsActive &request);
void on_request(uint64 id, td_api::reorderActiveUsernames &request);
2022-09-07 09:25:21 +02:00
void on_request(uint64 id, const td_api::setEmojiStatus &request);
2022-08-09 14:49:47 +02:00
2022-09-07 09:25:21 +02:00
void on_request(uint64 id, const td_api::getThemedEmojiStatuses &request);
2022-09-02 14:02:37 +02:00
2022-09-07 09:25:21 +02:00
void on_request(uint64 id, const td_api::getDefaultEmojiStatuses &request);
2022-08-30 17:03:57 +02:00
2022-09-07 09:25:21 +02:00
void on_request(uint64 id, const td_api::getRecentEmojiStatuses &request);
2022-08-31 14:47:51 +02:00
2022-09-07 09:25:21 +02:00
void on_request(uint64 id, const td_api::clearRecentEmojiStatuses &request);
void on_request(uint64 id, td_api::setCommands &request);
2021-06-22 03:17:44 +02:00
void on_request(uint64 id, td_api::deleteCommands &request);
2021-06-19 03:18:02 +02:00
void on_request(uint64 id, td_api::getCommands &request);
2022-04-07 17:15:58 +02:00
void on_request(uint64 id, td_api::setMenuButton &request);
2022-04-07 16:20:26 +02:00
void on_request(uint64 id, const td_api::getMenuButton &request);
void on_request(uint64 id, const td_api::setDefaultGroupAdministratorRights &request);
void on_request(uint64 id, const td_api::setDefaultChannelAdministratorRights &request);
2023-08-25 16:23:04 +02:00
void on_request(uint64 id, const td_api::canBotSendMessages &request);
2023-08-25 17:06:56 +02:00
void on_request(uint64 id, const td_api::allowBotToSendMessages &request);
2023-08-25 17:26:05 +02:00
void on_request(uint64 id, td_api::sendWebAppCustomRequest &request);
2023-03-28 17:42:54 +02:00
void on_request(uint64 id, td_api::setBotName &request);
void on_request(uint64 id, const td_api::getBotName &request);
2023-03-29 20:49:54 +02:00
void on_request(uint64 id, td_api::setBotProfilePhoto &request);
2023-03-30 14:34:27 +02:00
void on_request(uint64 id, td_api::toggleBotUsernameIsActive &request);
2023-04-29 21:27:31 +02:00
void on_request(uint64 id, td_api::reorderBotActiveUsernames &request);
2023-03-30 15:41:03 +02:00
2023-02-26 23:00:17 +01:00
void on_request(uint64 id, td_api::setBotInfoDescription &request);
2023-02-26 23:33:51 +01:00
void on_request(uint64 id, const td_api::getBotInfoDescription &request);
void on_request(uint64 id, td_api::setBotInfoShortDescription &request);
2023-02-26 23:41:46 +01:00
void on_request(uint64 id, const td_api::getBotInfoShortDescription &request);
2023-02-26 23:47:55 +01:00
void on_request(uint64 id, const td_api::setLocation &request);
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);
2023-10-18 16:56:45 +02:00
void on_request(uint64 id, const td_api::setAccentColor &request);
void on_request(uint64 id, td_api::setSupergroupUsername &request);
void on_request(uint64 id, td_api::toggleSupergroupUsernameIsActive &request);
2022-10-17 13:58:47 +02:00
void on_request(uint64 id, const td_api::disableAllSupergroupUsernames &request);
void on_request(uint64 id, td_api::reorderSupergroupActiveUsernames &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::toggleSupergroupJoinToSendMessages &request);
void on_request(uint64 id, const td_api::toggleSupergroupJoinByRequest &request);
void on_request(uint64 id, const td_api::toggleSupergroupIsAllHistoryAvailable &request);
2022-12-20 13:51:37 +01:00
void on_request(uint64 id, const td_api::toggleSupergroupHasHiddenMembers &request);
void on_request(uint64 id, const td_api::toggleSupergroupHasAggressiveAntiSpamEnabled &request);
2022-10-25 10:52:45 +02:00
void on_request(uint64 id, const td_api::toggleSupergroupIsForum &request);
void on_request(uint64 id, const td_api::toggleSupergroupIsBroadcastGroup &request);
void on_request(uint64 id, const td_api::reportSupergroupSpam &request);
void on_request(uint64 id, const td_api::reportSupergroupAntiSpamFalsePositive &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);
2023-09-04 15:17:36 +02:00
void on_request(uint64 id, td_api::getAllStickerEmojis &request);
void on_request(uint64 id, td_api::searchStickers &request);
2022-08-01 18:21:08 +02:00
void on_request(uint64 id, const td_api::getPremiumStickers &request);
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);
void on_request(uint64 id, td_api::searchInstalledStickerSets &request);
void on_request(uint64 id, td_api::searchStickerSets &request);
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::getSuggestedStickerSetName &request);
2021-06-17 20:29:07 +02:00
void on_request(uint64 id, td_api::checkStickerSetName &request);
void on_request(uint64 id, td_api::createNewStickerSet &request);
void on_request(uint64 id, td_api::addStickerToSet &request);
void on_request(uint64 id, td_api::setStickerSetThumbnail &request);
void on_request(uint64 id, td_api::setCustomEmojiStickerSetThumbnail &request);
2023-02-08 19:43:09 +01:00
void on_request(uint64 id, td_api::setStickerSetTitle &request);
2023-02-16 14:17:29 +01:00
void on_request(uint64 id, td_api::deleteStickerSet &request);
void on_request(uint64 id, td_api::setStickerPositionInSet &request);
2023-02-09 18:42:09 +01:00
void on_request(uint64 id, const td_api::removeStickerFromSet &request);
void on_request(uint64 id, td_api::setStickerEmojis &request);
2023-02-09 19:43:38 +01:00
void on_request(uint64 id, td_api::setStickerKeywords &request);
2023-02-10 13:52:25 +01:00
void on_request(uint64 id, td_api::setStickerMaskPosition &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);
void on_request(uint64 id, td_api::searchEmojis &request);
2023-01-24 16:11:02 +01:00
void on_request(uint64 id, const td_api::getEmojiCategories &request);
2021-10-26 16:59:15 +02:00
void on_request(uint64 id, td_api::getAnimatedEmoji &request);
void on_request(uint64 id, td_api::getEmojiSuggestionsUrl &request);
2022-10-03 00:26:32 +02:00
void on_request(uint64 id, const td_api::getCustomEmojiStickers &request);
2022-07-19 15:00:04 +02:00
void on_request(uint64 id, const td_api::getDefaultChatPhotoCustomEmojiStickers &request);
void on_request(uint64 id, const td_api::getDefaultProfilePhotoCustomEmojiStickers &request);
void on_request(uint64 id, const td_api::getDefaultBackgroundCustomEmojiStickers &request);
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);
2022-04-14 12:23:43 +02:00
void on_request(uint64 id, const td_api::getSavedNotificationSound &request);
void on_request(uint64 id, const td_api::getSavedNotificationSounds &request);
2022-04-14 21:39:25 +02:00
void on_request(uint64 id, td_api::addSavedNotificationSound &request);
void on_request(uint64 id, const td_api::removeSavedNotificationSound &request);
void on_request(uint64 id, const td_api::getChatNotificationSettingsExceptions &request);
void on_request(uint64 id, const td_api::getScopeNotificationSettings &request);
void on_request(uint64 id, td_api::setChatNotificationSettings &request);
2022-12-06 12:53:54 +01:00
void on_request(uint64 id, td_api::setForumTopicNotificationSettings &request);
void on_request(uint64 id, td_api::setScopeNotificationSettings &request);
void on_request(uint64 id, const td_api::resetAllNotificationSettings &request);
void on_request(uint64 id, const td_api::removeChatActionBar &request);
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);
2022-08-23 13:39:10 +02:00
void on_request(uint64 id, const td_api::reportMessageReactions &request);
void on_request(uint64 id, const td_api::getChatStatistics &request);
2020-04-02 15:06:05 +02:00
void on_request(uint64 id, const td_api::getMessageStatistics &request);
2023-11-17 12:26:51 +01:00
void on_request(uint64 id, const td_api::getStoryStatistics &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
void on_request(uint64 id, const td_api::getMapThumbnailFile &request);
void on_request(uint64 id, const td_api::getLocalizationTargetInfo &request);
void on_request(uint64 id, td_api::getLanguagePackInfo &request);
void on_request(uint64 id, td_api::getLanguagePackStrings &request);
void on_request(uint64 id, td_api::synchronizeLanguagePack &request);
void on_request(uint64 id, td_api::addCustomServerLanguagePack &request);
void on_request(uint64 id, td_api::setCustomLanguagePack &request);
void on_request(uint64 id, td_api::editCustomLanguagePackInfo &request);
void on_request(uint64 id, td_api::setCustomLanguagePackString &request);
void on_request(uint64 id, td_api::deleteLanguagePack &request);
void on_request(uint64 id, td_api::getOption &request);
void on_request(uint64 id, td_api::setOption &request);
void on_request(uint64 id, td_api::setPollAnswer &request);
void on_request(uint64 id, td_api::getPollVoters &request);
void on_request(uint64 id, td_api::stopPoll &request);
void on_request(uint64 id, const td_api::hideSuggestedAction &request);
void on_request(uint64 id, const td_api::getLoginUrlInfo &request);
void on_request(uint64 id, const td_api::getLoginUrl &request);
void on_request(uint64 id, const td_api::shareUserWithBot &request);
2023-01-13 15:03:35 +01:00
void on_request(uint64 id, const td_api::shareChatWithBot &request);
2023-01-13 15:16:16 +01:00
void on_request(uint64 id, td_api::getInlineQueryResults &request);
void on_request(uint64 id, td_api::answerInlineQuery &request);
2023-02-24 12:07:40 +01:00
void on_request(uint64 id, td_api::searchWebApp &request);
2023-02-24 13:08:16 +01:00
void on_request(uint64 id, td_api::getWebAppLinkUrl &request);
2022-03-31 15:42:59 +02:00
void on_request(uint64 id, td_api::getWebAppUrl &request);
2022-03-30 15:27:01 +02:00
2022-03-31 15:42:59 +02:00
void on_request(uint64 id, td_api::sendWebAppData &request);
2022-03-31 14:05:08 +02:00
2022-03-31 15:42:59 +02:00
void on_request(uint64 id, td_api::openWebApp &request);
2022-03-31 20:45:35 +02:00
void on_request(uint64 id, const td_api::closeWebApp &request);
2022-03-28 14:18:15 +02:00
2022-03-31 15:42:59 +02:00
void on_request(uint64 id, td_api::answerWebAppQuery &request);
2022-03-24 09:42:47 +01:00
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);
void on_request(uint64 id, td_api::getBankCardInfo &request);
2022-05-03 17:50:29 +02:00
void on_request(uint64 id, 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);
2022-05-06 15:37:11 +02:00
void on_request(uint64 id, td_api::createInvoiceLink &request);
void on_request(uint64 id, td_api::getPassportElement &request);
void on_request(uint64 id, td_api::getAllPassportElements &request);
void on_request(uint64 id, td_api::setPassportElement &request);
void on_request(uint64 id, const td_api::deletePassportElement &request);
void on_request(uint64 id, td_api::setPassportElementErrors &request);
void on_request(uint64 id, td_api::getPreferredCountryLanguage &request);
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);
void on_request(uint64 id, td_api::getPassportAuthorizationFormAvailableElements &request);
void on_request(uint64 id, td_api::sendPassportAuthorizationForm &request);
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);
void on_request(uint64 id, const td_api::getSupportUser &request);
void on_request(uint64 id, const td_api::getBackgrounds &request);
void on_request(uint64 id, td_api::getBackgroundUrl &request);
void on_request(uint64 id, td_api::searchBackground &request);
void on_request(uint64 id, td_api::setBackground &request);
void on_request(uint64 id, const td_api::removeBackground &request);
void on_request(uint64 id, const td_api::resetBackgrounds &request);
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);
2022-05-24 01:55:03 +02:00
void on_request(uint64 id, const td_api::getPremiumLimit &request);
2022-05-23 14:56:31 +02:00
void on_request(uint64 id, const td_api::getPremiumFeatures &request);
void on_request(uint64 id, const td_api::getPremiumStickerExamples &request);
2022-06-03 17:16:12 +02:00
2022-05-24 19:45:03 +02:00
void on_request(uint64 id, const td_api::viewPremiumFeature &request);
2022-05-25 14:34:36 +02:00
void on_request(uint64 id, const td_api::clickPremiumSubscriptionButton &request);
2022-06-01 14:14:09 +02:00
void on_request(uint64 id, const td_api::getPremiumState &request);
2022-06-24 16:07:10 +02:00
void on_request(uint64 id, const td_api::getPremiumGiftCodePaymentOptions &request);
2023-09-28 21:21:25 +02:00
void on_request(uint64 id, td_api::checkPremiumGiftCode &request);
2023-09-28 21:35:57 +02:00
void on_request(uint64 id, td_api::applyPremiumGiftCode &request);
void on_request(uint64 id, td_api::launchPrepaidPremiumGiveaway &request);
2023-10-06 17:28:02 +02:00
void on_request(uint64 id, const td_api::getPremiumGiveawayInfo &request);
2022-07-15 13:09:37 +02:00
void on_request(uint64 id, td_api::canPurchasePremium &request);
2022-07-01 18:27:59 +02:00
void on_request(uint64 id, td_api::assignAppStoreTransaction &request);
2022-06-24 17:14:00 +02:00
void on_request(uint64 id, td_api::assignGooglePlayTransaction &request);
2022-06-01 14:14:09 +02:00
void on_request(uint64 id, td_api::acceptTermsOfService &request);
void on_request(uint64 id, const td_api::getCountries &request);
void on_request(uint64 id, const td_api::getCountryCode &request);
void on_request(uint64 id, const td_api::getPhoneNumberInfo &request);
void on_request(uint64 id, const td_api::getApplicationDownloadLink &request);
void on_request(uint64 id, td_api::getDeepLinkInfo &request);
void on_request(uint64 id, const td_api::getApplicationConfig &request);
2023-02-21 10:08:55 +01:00
void on_request(uint64 id, td_api::addApplicationChangelog &request);
void on_request(uint64 id, td_api::saveApplicationLogEvent &request);
void on_request(uint64 id, td_api::addProxy &request);
void on_request(uint64 id, td_api::editProxy &request);
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);
void on_request(uint64 id, const td_api::getProxyLink &request);
void on_request(uint64 id, const td_api::pingProxy &request);
2022-08-15 13:32:35 +02:00
void on_request(uint64 id, const td_api::getUserSupportInfo &request);
2022-08-15 15:58:28 +02:00
void on_request(uint64 id, td_api::setUserSupportInfo &request);
2023-03-22 11:54:04 +01:00
void on_request(uint64 id, const td_api::getSupportName &request);
2023-11-03 11:51:38 +01:00
void on_request(uint64 id, const td_api::searchQuote &request);
void on_request(uint64 id, const td_api::getTextEntities &request);
void on_request(uint64 id, const td_api::parseTextEntities &request);
void on_request(uint64 id, const td_api::parseMarkdown &request);
void on_request(uint64 id, const td_api::getMarkdownText &request);
2023-08-16 12:39:59 +02:00
void on_request(uint64 id, const td_api::searchStringsByPrefix &request);
void on_request(uint64 id, const td_api::getFileMimeType &request);
void on_request(uint64 id, const td_api::getFileExtension &request);
void on_request(uint64 id, const td_api::cleanFileName &request);
void on_request(uint64 id, const td_api::getLanguagePackString &request);
2021-08-30 21:26:02 +02:00
void on_request(uint64 id, const td_api::getPhoneNumberInfoSync &request);
void on_request(uint64 id, const td_api::getPushReceiverId &request);
2023-04-03 16:28:51 +02:00
void on_request(uint64 id, const td_api::getChatFolderDefaultIconName &request);
void on_request(uint64 id, const td_api::getJsonValue &request);
void on_request(uint64 id, const td_api::getJsonString &request);
void on_request(uint64 id, const td_api::getThemeParametersJsonString &request);
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);
void on_request(uint64 id, const td_api::addLogMessage &request);
// test
void on_request(uint64 id, const td_api::testNetwork &request);
void on_request(uint64 id, td_api::testProxy &request);
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);
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>
static td_api::object_ptr<td_api::Object> do_static_request(const T &request) {
return td_api::make_object<td_api::error>(400, "The method can't be executed synchronously");
}
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getOption &request);
2023-11-03 11:51:38 +01:00
static td_api::object_ptr<td_api::Object> do_static_request(td_api::searchQuote &request);
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getTextEntities &request);
static td_api::object_ptr<td_api::Object> do_static_request(td_api::parseTextEntities &request);
static td_api::object_ptr<td_api::Object> do_static_request(td_api::parseMarkdown &request);
static td_api::object_ptr<td_api::Object> do_static_request(td_api::getMarkdownText &request);
2023-08-16 12:39:59 +02:00
static td_api::object_ptr<td_api::Object> do_static_request(td_api::searchStringsByPrefix &request);
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);
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::cleanFileName &request);
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getLanguagePackString &request);
2021-11-10 19:09:28 +01:00
static td_api::object_ptr<td_api::Object> do_static_request(td_api::getPhoneNumberInfoSync &request);
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getPushReceiverId &request);
2023-04-03 16:28:51 +02:00
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getChatFolderDefaultIconName &request);
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);
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::getThemeParametersJsonString &request);
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);
static td_api::object_ptr<td_api::Object> do_static_request(const td_api::addLogMessage &request);
static td_api::object_ptr<td_api::Object> do_static_request(td_api::testReturnError &request);
static DbKey as_db_key(string key);
2022-06-10 15:44:53 +02:00
2023-03-13 20:29:56 +01:00
struct Parameters {
int32 api_id_ = 0;
string api_hash_;
bool use_secret_chats_ = false;
// TODO move to options and remove
bool enable_storage_optimizer_ = false;
bool ignore_file_names_ = false;
};
void finish_set_parameters();
2023-03-13 20:29:56 +01:00
void init(Parameters parameters, Result<TdDb::OpenedDatabase> r_opened_database);
2022-06-10 15:44:53 +02:00
void init_options_and_network();
2022-06-10 15:44:53 +02:00
void init_file_manager();
2022-06-10 15:44:53 +02:00
void init_managers();
2022-06-10 15:44:53 +02:00
void clear();
2022-06-10 15:44:53 +02:00
void close_impl(bool destroy_flag);
2022-06-10 15:44:53 +02:00
2023-03-13 20:29:56 +01:00
Result<std::pair<Parameters, TdDb::Parameters>> get_parameters(
td_api::object_ptr<td_api::setTdlibParameters> parameters) TD_WARN_UNUSED_RESULT;
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());
}
// Actor
2021-07-03 22:51:36 +02:00
void start_up() final;
void tear_down() final;
void hangup_shared() final;
void hangup() final;
};
} // namespace td