Add GroupCallManager.

This commit is contained in:
levlam 2020-11-24 18:22:00 +03:00
parent 3c9cd41776
commit bd75c4b062
3 changed files with 13 additions and 0 deletions

View File

@ -319,6 +319,7 @@ set(TDLIB_SOURCE
td/telegram/files/ResourceManager.cpp td/telegram/files/ResourceManager.cpp
td/telegram/Game.cpp td/telegram/Game.cpp
td/telegram/Global.cpp td/telegram/Global.cpp
td/telegram/GroupCallManager.cpp
td/telegram/HashtagHints.cpp td/telegram/HashtagHints.cpp
td/telegram/InlineQueriesManager.cpp td/telegram/InlineQueriesManager.cpp
td/telegram/InputDialogId.cpp td/telegram/InputDialogId.cpp
@ -492,6 +493,7 @@ set(TDLIB_SOURCE
td/telegram/FullMessageId.h td/telegram/FullMessageId.h
td/telegram/Game.h td/telegram/Game.h
td/telegram/Global.h td/telegram/Global.h
td/telegram/GroupCallManager.h
td/telegram/HashtagHints.h td/telegram/HashtagHints.h
td/telegram/InlineQueriesManager.h td/telegram/InlineQueriesManager.h
td/telegram/InputDialogId.h td/telegram/InputDialogId.h

View File

@ -43,6 +43,7 @@
#include "td/telegram/FolderId.h" #include "td/telegram/FolderId.h"
#include "td/telegram/FullMessageId.h" #include "td/telegram/FullMessageId.h"
#include "td/telegram/Global.h" #include "td/telegram/Global.h"
#include "td/telegram/GroupCallManager.h"
#include "td/telegram/HashtagHints.h" #include "td/telegram/HashtagHints.h"
#include "td/telegram/InlineQueriesManager.h" #include "td/telegram/InlineQueriesManager.h"
#include "td/telegram/JsonValue.h" #include "td/telegram/JsonValue.h"
@ -3893,6 +3894,8 @@ void Td::dec_actor_refcnt() {
LOG(DEBUG) << "FileManager was cleared" << timer; LOG(DEBUG) << "FileManager was cleared" << timer;
file_reference_manager_.reset(); file_reference_manager_.reset();
LOG(DEBUG) << "FileReferenceManager was cleared" << timer; LOG(DEBUG) << "FileReferenceManager was cleared" << timer;
group_call_manager_.reset();
LOG(DEBUG) << "GroupCallManager was cleared" << timer;
inline_queries_manager_.reset(); inline_queries_manager_.reset();
LOG(DEBUG) << "InlineQueriesManager was cleared" << timer; LOG(DEBUG) << "InlineQueriesManager was cleared" << timer;
messages_manager_.reset(); messages_manager_.reset();
@ -4077,6 +4080,8 @@ void Td::clear() {
LOG(DEBUG) << "FileManager actor was cleared" << timer; LOG(DEBUG) << "FileManager actor was cleared" << timer;
file_reference_manager_actor_.reset(); file_reference_manager_actor_.reset();
LOG(DEBUG) << "FileReferenceManager actor was cleared" << timer; LOG(DEBUG) << "FileReferenceManager actor was cleared" << timer;
group_call_manager_actor_.reset();
LOG(DEBUG) << "GroupCallManager actor was cleared" << timer;
inline_queries_manager_actor_.reset(); inline_queries_manager_actor_.reset();
LOG(DEBUG) << "InlineQueriesManager actor was cleared" << timer; LOG(DEBUG) << "InlineQueriesManager actor was cleared" << timer;
messages_manager_actor_.reset(); // TODO: Stop silent messages_manager_actor_.reset(); // TODO: Stop silent
@ -4510,6 +4515,8 @@ void Td::init_managers() {
G()->set_contacts_manager(contacts_manager_actor_.get()); G()->set_contacts_manager(contacts_manager_actor_.get());
country_info_manager_ = make_unique<CountryInfoManager>(this, create_reference()); country_info_manager_ = make_unique<CountryInfoManager>(this, create_reference());
country_info_manager_actor_ = register_actor("CountryInfoManager", country_info_manager_.get()); country_info_manager_actor_ = register_actor("CountryInfoManager", country_info_manager_.get());
group_call_manager_ = make_unique<GroupCallManager>(this, create_reference());
group_call_manager_actor_ = register_actor("GroupCallManager", group_call_manager_.get());
inline_queries_manager_ = make_unique<InlineQueriesManager>(this, create_reference()); inline_queries_manager_ = make_unique<InlineQueriesManager>(this, create_reference());
inline_queries_manager_actor_ = register_actor("InlineQueriesManager", inline_queries_manager_.get()); inline_queries_manager_actor_ = register_actor("InlineQueriesManager", inline_queries_manager_.get());
messages_manager_ = make_unique<MessagesManager>(this, create_reference()); messages_manager_ = make_unique<MessagesManager>(this, create_reference());
@ -4925,6 +4932,7 @@ void Td::on_request(uint64 id, const td_api::getCurrentState &request) {
// TODO updateFileGenerationStart generation_id:int64 original_path:string destination_path:string conversion:string = Update; // TODO updateFileGenerationStart generation_id:int64 original_path:string destination_path:string conversion:string = Update;
// TODO updateCall call:call = Update; // TODO updateCall call:call = Update;
// TODO updateGroupCall call:groupCall = Update;
} }
auto update_terms_of_service = get_update_terms_of_service_object(); auto update_terms_of_service = get_update_terms_of_service_object();

View File

@ -51,6 +51,7 @@ class DeviceTokenManager;
class DocumentsManager; class DocumentsManager;
class FileManager; class FileManager;
class FileReferenceManager; class FileReferenceManager;
class GroupCallManager;
class InlineQueriesManager; class InlineQueriesManager;
class HashtagHints; class HashtagHints;
class LanguagePackManager; class LanguagePackManager;
@ -157,6 +158,8 @@ class Td final : public NetQueryCallback {
ActorOwn<FileManager> file_manager_actor_; ActorOwn<FileManager> file_manager_actor_;
unique_ptr<FileReferenceManager> file_reference_manager_; unique_ptr<FileReferenceManager> file_reference_manager_;
ActorOwn<FileReferenceManager> file_reference_manager_actor_; ActorOwn<FileReferenceManager> file_reference_manager_actor_;
unique_ptr<GroupCallManager> group_call_manager_;
ActorOwn<GroupCallManager> group_call_manager_actor_;
unique_ptr<InlineQueriesManager> inline_queries_manager_; unique_ptr<InlineQueriesManager> inline_queries_manager_;
ActorOwn<InlineQueriesManager> inline_queries_manager_actor_; ActorOwn<InlineQueriesManager> inline_queries_manager_actor_;
unique_ptr<MessagesManager> messages_manager_; unique_ptr<MessagesManager> messages_manager_;