Add empty DialogManager.
This commit is contained in:
parent
2bfe13f832
commit
7897ab1ada
@ -328,6 +328,7 @@ set(TDLIB_SOURCE
|
||||
td/telegram/DialogId.cpp
|
||||
td/telegram/DialogInviteLink.cpp
|
||||
td/telegram/DialogLocation.cpp
|
||||
td/telegram/DialogManager.cpp
|
||||
td/telegram/DialogNotificationSettings.cpp
|
||||
td/telegram/DialogParticipant.cpp
|
||||
td/telegram/DialogParticipantFilter.cpp
|
||||
@ -604,6 +605,7 @@ set(TDLIB_SOURCE
|
||||
td/telegram/DialogInviteLink.h
|
||||
td/telegram/DialogListId.h
|
||||
td/telegram/DialogLocation.h
|
||||
td/telegram/DialogManager.h
|
||||
td/telegram/DialogNotificationSettings.h
|
||||
td/telegram/DialogParticipant.h
|
||||
td/telegram/DialogParticipantFilter.h
|
||||
|
@ -288,6 +288,7 @@ function split_file($file, $chunks, $undo) {
|
||||
'contacts_manager[_(-][^.]|ContactsManager([^ ;.]| [^*])' => 'ContactsManager',
|
||||
'country_info_manager[_(-][^.]|CountryInfoManager' => 'CountryInfoManager',
|
||||
'dialog_filter_manager[_(-][^.]|DialogFilterManager' => "DialogFilterManager",
|
||||
'dialog_manager[_(-][^.]|DialogManager' => "DialogManager",
|
||||
'documents_manager[_(-][^.]|DocumentsManager' => "DocumentsManager",
|
||||
'download_manager[_(-][^.]|DownloadManager' => "DownloadManager",
|
||||
'file_reference_manager[_(-][^.]|FileReferenceManager|file_references[)]' => 'FileReferenceManager',
|
||||
|
18
td/telegram/DialogManager.cpp
Normal file
18
td/telegram/DialogManager.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
#include "td/telegram/DialogManager.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
DialogManager::DialogManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::move(parent)) {
|
||||
}
|
||||
|
||||
void DialogManager::tear_down() {
|
||||
parent_.reset();
|
||||
}
|
||||
|
||||
} // namespace td
|
28
td/telegram/DialogManager.h
Normal file
28
td/telegram/DialogManager.h
Normal file
@ -0,0 +1,28 @@
|
||||
//
|
||||
// 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/actor/actor.h"
|
||||
|
||||
#include "td/utils/common.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
class Td;
|
||||
|
||||
class DialogManager final : public Actor {
|
||||
public:
|
||||
DialogManager(Td *td, ActorShared<> parent);
|
||||
|
||||
private:
|
||||
void tear_down() final;
|
||||
|
||||
Td *td_;
|
||||
ActorShared<> parent_;
|
||||
};
|
||||
|
||||
} // namespace td
|
@ -42,6 +42,7 @@
|
||||
#include "td/telegram/DialogId.h"
|
||||
#include "td/telegram/DialogListId.h"
|
||||
#include "td/telegram/DialogLocation.h"
|
||||
#include "td/telegram/DialogManager.h"
|
||||
#include "td/telegram/DialogParticipant.h"
|
||||
#include "td/telegram/DialogParticipantFilter.h"
|
||||
#include "td/telegram/DialogSource.h"
|
||||
@ -3287,6 +3288,8 @@ void Td::dec_actor_refcnt() {
|
||||
LOG(DEBUG) << "CountryInfoManager was cleared" << timer;
|
||||
dialog_filter_manager_.reset();
|
||||
LOG(DEBUG) << "DialogFilterManager was cleared" << timer;
|
||||
dialog_manager_.reset();
|
||||
LOG(DEBUG) << "DialogManager was cleared" << timer;
|
||||
documents_manager_.reset();
|
||||
LOG(DEBUG) << "DocumentsManager was cleared" << timer;
|
||||
download_manager_.reset();
|
||||
@ -3498,6 +3501,8 @@ void Td::clear() {
|
||||
LOG(DEBUG) << "CountryInfoManager actor was cleared" << timer;
|
||||
dialog_filter_manager_actor_.reset();
|
||||
LOG(DEBUG) << "DialogFilterManager actor was cleared" << timer;
|
||||
dialog_manager_actor_.reset();
|
||||
LOG(DEBUG) << "DialogManager actor was cleared" << timer;
|
||||
download_manager_actor_.reset();
|
||||
LOG(DEBUG) << "DownloadManager actor was cleared" << timer;
|
||||
file_manager_actor_.reset();
|
||||
@ -3989,6 +3994,8 @@ void Td::init_managers() {
|
||||
country_info_manager_actor_ = register_actor("CountryInfoManager", country_info_manager_.get());
|
||||
dialog_filter_manager_ = make_unique<DialogFilterManager>(this, create_reference());
|
||||
dialog_filter_manager_actor_ = register_actor("DialogFilterManager", dialog_filter_manager_.get());
|
||||
dialog_manager_ = make_unique<DialogManager>(this, create_reference());
|
||||
dialog_manager_actor_ = register_actor("DialogManager", dialog_manager_.get());
|
||||
G()->set_download_manager(download_manager_actor_.get());
|
||||
download_manager_ = DownloadManager::create(td::make_unique<DownloadManagerCallback>(this, create_reference()));
|
||||
download_manager_actor_ = register_actor("DownloadManager", download_manager_.get());
|
||||
|
@ -53,6 +53,7 @@ class ContactsManager;
|
||||
class CountryInfoManager;
|
||||
class DeviceTokenManager;
|
||||
class DialogFilterManager;
|
||||
class DialogManager;
|
||||
class DocumentsManager;
|
||||
class DownloadManager;
|
||||
class FileManager;
|
||||
@ -174,6 +175,8 @@ class Td final : public Actor {
|
||||
ActorOwn<CountryInfoManager> country_info_manager_actor_;
|
||||
unique_ptr<DialogFilterManager> dialog_filter_manager_;
|
||||
ActorOwn<DialogFilterManager> dialog_filter_manager_actor_;
|
||||
unique_ptr<DialogManager> dialog_manager_;
|
||||
ActorOwn<DialogManager> dialog_manager_actor_;
|
||||
unique_ptr<DownloadManager> download_manager_;
|
||||
ActorOwn<DownloadManager> download_manager_actor_;
|
||||
unique_ptr<FileManager> file_manager_;
|
||||
|
Loading…
Reference in New Issue
Block a user