Add empty PeopleNearbyManager.
This commit is contained in:
parent
1fba0f0c84
commit
1e6c1dbb12
@ -459,6 +459,7 @@ set(TDLIB_SOURCE
|
||||
td/telegram/PasswordManager.cpp
|
||||
td/telegram/Payments.cpp
|
||||
td/telegram/PeerColor.cpp
|
||||
td/telegram/PeopleNearbyManager.cpp
|
||||
td/telegram/PhoneNumberManager.cpp
|
||||
td/telegram/Photo.cpp
|
||||
td/telegram/PhotoSize.cpp
|
||||
@ -790,6 +791,7 @@ set(TDLIB_SOURCE
|
||||
td/telegram/PasswordManager.h
|
||||
td/telegram/Payments.h
|
||||
td/telegram/PeerColor.h
|
||||
td/telegram/PeopleNearbyManager.h
|
||||
td/telegram/PhoneNumberManager.h
|
||||
td/telegram/Photo.h
|
||||
td/telegram/PhotoFormat.h
|
||||
|
@ -374,6 +374,7 @@ function split_file($file, $chunks, $undo) {
|
||||
'notification_settings_manager[_(-](?![.]get[(][)])|NotificationSettingsManager' => 'NotificationSettingsManager',
|
||||
'option_manager[_(-](?![.]get[(][)])|OptionManager' => 'OptionManager',
|
||||
'password_manager[_(-](?![.]get[(][)])|PasswordManager' => 'PasswordManager',
|
||||
'people_nearby_manager[_(-](?![.]get[(][)])|PeopleNearbyManager' => 'PeopleNearbyManager',
|
||||
'[a-z_]*phone_number_manager[_(-](?![.]get[(][)])|PhoneNumberManager' => 'PhoneNumberManager',
|
||||
'PhotoSizeSource' => 'PhotoSizeSource',
|
||||
'poll_manager[_(-](?![.]get[(][)])|PollManager' => 'PollManager',
|
||||
|
@ -62,6 +62,7 @@ class NotificationManager;
|
||||
class NotificationSettingsManager;
|
||||
class OptionManager;
|
||||
class PasswordManager;
|
||||
class PeopleNearbyManager;
|
||||
class QuickReplyManager;
|
||||
class ReactionManager;
|
||||
class SavedMessagesManager;
|
||||
@ -391,6 +392,13 @@ class Global final : public ActorContext {
|
||||
password_manager_ = password_manager;
|
||||
}
|
||||
|
||||
ActorId<PeopleNearbyManager> people_nearby_manager() const {
|
||||
return people_nearby_manager_;
|
||||
}
|
||||
void set_people_nearby_manager(ActorId<PeopleNearbyManager> people_nearby_manager) {
|
||||
people_nearby_manager_ = people_nearby_manager;
|
||||
}
|
||||
|
||||
ActorId<QuickReplyManager> quick_reply_manager() const {
|
||||
return quick_reply_manager_;
|
||||
}
|
||||
@ -637,6 +645,7 @@ class Global final : public ActorContext {
|
||||
ActorId<NotificationManager> notification_manager_;
|
||||
ActorId<NotificationSettingsManager> notification_settings_manager_;
|
||||
ActorId<PasswordManager> password_manager_;
|
||||
ActorId<PeopleNearbyManager> people_nearby_manager_;
|
||||
ActorId<QuickReplyManager> quick_reply_manager_;
|
||||
ActorId<ReactionManager> reaction_manager_;
|
||||
ActorId<SavedMessagesManager> saved_messages_manager_;
|
||||
|
18
td/telegram/PeopleNearbyManager.cpp
Normal file
18
td/telegram/PeopleNearbyManager.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/PeopleNearbyManager.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
PeopleNearbyManager::PeopleNearbyManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::move(parent)) {
|
||||
}
|
||||
|
||||
void PeopleNearbyManager::tear_down() {
|
||||
parent_.reset();
|
||||
}
|
||||
|
||||
} // namespace td
|
28
td/telegram/PeopleNearbyManager.h
Normal file
28
td/telegram/PeopleNearbyManager.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 PeopleNearbyManager final : public Actor {
|
||||
public:
|
||||
PeopleNearbyManager(Td *td, ActorShared<> parent);
|
||||
|
||||
private:
|
||||
void tear_down() final;
|
||||
|
||||
Td *td_;
|
||||
ActorShared<> parent_;
|
||||
};
|
||||
|
||||
} // namespace td
|
@ -114,6 +114,7 @@
|
||||
#include "td/telegram/OptionManager.h"
|
||||
#include "td/telegram/PasswordManager.h"
|
||||
#include "td/telegram/Payments.h"
|
||||
#include "td/telegram/PeopleNearbyManager.h"
|
||||
#include "td/telegram/PhoneNumberManager.h"
|
||||
#include "td/telegram/PhotoSizeSource.h"
|
||||
#include "td/telegram/PollManager.h"
|
||||
@ -3229,6 +3230,7 @@ void Td::dec_actor_refcnt() {
|
||||
reset_manager(messages_manager_, "MessagesManager");
|
||||
reset_manager(notification_manager_, "NotificationManager");
|
||||
reset_manager(notification_settings_manager_, "NotificationSettingsManager");
|
||||
reset_manager(people_nearby_manager_, "PeopleNearbyManager");
|
||||
reset_manager(poll_manager_, "PollManager");
|
||||
reset_manager(privacy_manager_, "PrivacyManager");
|
||||
reset_manager(quick_reply_manager_, "QuickReplyManager");
|
||||
@ -3401,6 +3403,7 @@ void Td::clear() {
|
||||
reset_actor(ActorOwn<Actor>(std::move(messages_manager_actor_)));
|
||||
reset_actor(ActorOwn<Actor>(std::move(notification_manager_actor_)));
|
||||
reset_actor(ActorOwn<Actor>(std::move(notification_settings_manager_actor_)));
|
||||
reset_actor(ActorOwn<Actor>(std::move(people_nearby_manager_actor_)));
|
||||
reset_actor(ActorOwn<Actor>(std::move(poll_manager_actor_)));
|
||||
reset_actor(ActorOwn<Actor>(std::move(privacy_manager_actor_)));
|
||||
reset_actor(ActorOwn<Actor>(std::move(quick_reply_manager_actor_)));
|
||||
@ -3926,6 +3929,9 @@ void Td::init_managers() {
|
||||
notification_settings_manager_actor_ =
|
||||
register_actor("NotificationSettingsManager", notification_settings_manager_.get());
|
||||
G()->set_notification_settings_manager(notification_settings_manager_actor_.get());
|
||||
people_nearby_manager_ = make_unique<PeopleNearbyManager>(this, create_reference());
|
||||
people_nearby_manager_actor_ = register_actor("PeopleNearbyManager", people_nearby_manager_.get());
|
||||
G()->set_people_nearby_manager(people_nearby_manager_actor_.get());
|
||||
poll_manager_ = make_unique<PollManager>(this, create_reference());
|
||||
poll_manager_actor_ = register_actor("PollManager", poll_manager_.get());
|
||||
privacy_manager_ = make_unique<PrivacyManager>(this, create_reference());
|
||||
|
@ -77,6 +77,7 @@ class NotificationManager;
|
||||
class NotificationSettingsManager;
|
||||
class OptionManager;
|
||||
class PasswordManager;
|
||||
class PeopleNearbyManager;
|
||||
class PhoneNumberManager;
|
||||
class PollManager;
|
||||
class PrivacyManager;
|
||||
@ -224,6 +225,8 @@ class Td final : public Actor {
|
||||
ActorOwn<PollManager> poll_manager_actor_;
|
||||
unique_ptr<PrivacyManager> privacy_manager_;
|
||||
ActorOwn<PrivacyManager> privacy_manager_actor_;
|
||||
unique_ptr<PeopleNearbyManager> people_nearby_manager_;
|
||||
ActorOwn<PeopleNearbyManager> people_nearby_manager_actor_;
|
||||
unique_ptr<QuickReplyManager> quick_reply_manager_;
|
||||
ActorOwn<QuickReplyManager> quick_reply_manager_actor_;
|
||||
unique_ptr<ReactionManager> reaction_manager_;
|
||||
|
Loading…
Reference in New Issue
Block a user