Add empty BusinessConnectionManager.
This commit is contained in:
parent
bce17cb5d8
commit
bb683c2988
@ -304,6 +304,7 @@ set(TDLIB_SOURCE
|
|||||||
td/telegram/BusinessAwayMessage.cpp
|
td/telegram/BusinessAwayMessage.cpp
|
||||||
td/telegram/BusinessAwayMessageSchedule.cpp
|
td/telegram/BusinessAwayMessageSchedule.cpp
|
||||||
td/telegram/BusinessConnectedBot.cpp
|
td/telegram/BusinessConnectedBot.cpp
|
||||||
|
td/telegram/BusinessConnectionManager.cpp
|
||||||
td/telegram/BusinessGreetingMessage.cpp
|
td/telegram/BusinessGreetingMessage.cpp
|
||||||
td/telegram/BusinessInfo.cpp
|
td/telegram/BusinessInfo.cpp
|
||||||
td/telegram/BusinessManager.cpp
|
td/telegram/BusinessManager.cpp
|
||||||
@ -592,6 +593,7 @@ set(TDLIB_SOURCE
|
|||||||
td/telegram/BusinessAwayMessage.h
|
td/telegram/BusinessAwayMessage.h
|
||||||
td/telegram/BusinessAwayMessageSchedule.h
|
td/telegram/BusinessAwayMessageSchedule.h
|
||||||
td/telegram/BusinessConnectedBot.h
|
td/telegram/BusinessConnectedBot.h
|
||||||
|
td/telegram/BusinessConnectionManager.h
|
||||||
td/telegram/BusinessGreetingMessage.h
|
td/telegram/BusinessGreetingMessage.h
|
||||||
td/telegram/BusinessInfo.h
|
td/telegram/BusinessInfo.h
|
||||||
td/telegram/BusinessManager.h
|
td/telegram/BusinessManager.h
|
||||||
|
@ -311,6 +311,7 @@ function split_file($file, $chunks, $undo) {
|
|||||||
'bot_info_manager[_(-](?![.]get[(][)])|BotInfoManager' => 'BotInfoManager',
|
'bot_info_manager[_(-](?![.]get[(][)])|BotInfoManager' => 'BotInfoManager',
|
||||||
'BusinessAwayMessage' => 'BusinessAwayMessage',
|
'BusinessAwayMessage' => 'BusinessAwayMessage',
|
||||||
'BusinessConnectedBot' => 'BusinessConnectedBot',
|
'BusinessConnectedBot' => 'BusinessConnectedBot',
|
||||||
|
'business_connection_manager[_(-](?![.]get[(][)])|BusinessConnectionManager' => 'BusinessConnectionManager',
|
||||||
'BusinessGreetingMessage' => 'BusinessGreetingMessage',
|
'BusinessGreetingMessage' => 'BusinessGreetingMessage',
|
||||||
'BusinessInfo|business_info' => 'BusinessInfo',
|
'BusinessInfo|business_info' => 'BusinessInfo',
|
||||||
'business_manager[_(-](?![.]get[(][)])|BusinessManager' => 'BusinessManager',
|
'business_manager[_(-](?![.]get[(][)])|BusinessManager' => 'BusinessManager',
|
||||||
|
18
td/telegram/BusinessConnectionManager.cpp
Normal file
18
td/telegram/BusinessConnectionManager.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/BusinessConnectionManager.h"
|
||||||
|
|
||||||
|
namespace td {
|
||||||
|
|
||||||
|
BusinessConnectionManager::BusinessConnectionManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::move(parent)) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void BusinessConnectionManager::tear_down() {
|
||||||
|
parent_.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace td
|
28
td/telegram/BusinessConnectionManager.h
Normal file
28
td/telegram/BusinessConnectionManager.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 BusinessConnectionManager final : public Actor {
|
||||||
|
public:
|
||||||
|
BusinessConnectionManager(Td *td, ActorShared<> parent);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void tear_down() final;
|
||||||
|
|
||||||
|
Td *td_;
|
||||||
|
ActorShared<> parent_;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace td
|
@ -37,6 +37,7 @@ class AuthManager;
|
|||||||
class AutosaveManager;
|
class AutosaveManager;
|
||||||
class BackgroundManager;
|
class BackgroundManager;
|
||||||
class BoostManager;
|
class BoostManager;
|
||||||
|
class BusinessConnectionManager;
|
||||||
class BusinessManager;
|
class BusinessManager;
|
||||||
class CallManager;
|
class CallManager;
|
||||||
class ConfigManager;
|
class ConfigManager;
|
||||||
@ -233,6 +234,13 @@ class Global final : public ActorContext {
|
|||||||
boost_manager_ = boost_manager;
|
boost_manager_ = boost_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ActorId<BusinessConnectionManager> business_connection_manager() const {
|
||||||
|
return business_connection_manager_;
|
||||||
|
}
|
||||||
|
void set_business_connection_manager(ActorId<BusinessConnectionManager> business_connection_manager) {
|
||||||
|
business_connection_manager_ = business_connection_manager;
|
||||||
|
}
|
||||||
|
|
||||||
ActorId<BusinessManager> business_manager() const {
|
ActorId<BusinessManager> business_manager() const {
|
||||||
return business_manager_;
|
return business_manager_;
|
||||||
}
|
}
|
||||||
@ -623,6 +631,7 @@ class Global final : public ActorContext {
|
|||||||
ActorId<AutosaveManager> autosave_manager_;
|
ActorId<AutosaveManager> autosave_manager_;
|
||||||
ActorId<BackgroundManager> background_manager_;
|
ActorId<BackgroundManager> background_manager_;
|
||||||
ActorId<BoostManager> boost_manager_;
|
ActorId<BoostManager> boost_manager_;
|
||||||
|
ActorId<BusinessConnectionManager> business_connection_manager_;
|
||||||
ActorId<BusinessManager> business_manager_;
|
ActorId<BusinessManager> business_manager_;
|
||||||
ActorId<CallManager> call_manager_;
|
ActorId<CallManager> call_manager_;
|
||||||
ActorId<ConfigManager> config_manager_;
|
ActorId<ConfigManager> config_manager_;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "td/telegram/BotInfoManager.h"
|
#include "td/telegram/BotInfoManager.h"
|
||||||
#include "td/telegram/BotMenuButton.h"
|
#include "td/telegram/BotMenuButton.h"
|
||||||
#include "td/telegram/BusinessAwayMessage.h"
|
#include "td/telegram/BusinessAwayMessage.h"
|
||||||
|
#include "td/telegram/BusinessConnectionManager.h"
|
||||||
#include "td/telegram/BusinessGreetingMessage.h"
|
#include "td/telegram/BusinessGreetingMessage.h"
|
||||||
#include "td/telegram/BusinessManager.h"
|
#include "td/telegram/BusinessManager.h"
|
||||||
#include "td/telegram/BusinessWorkHours.h"
|
#include "td/telegram/BusinessWorkHours.h"
|
||||||
@ -3208,6 +3209,7 @@ void Td::dec_actor_refcnt() {
|
|||||||
reset_manager(background_manager_, "BackgroundManager");
|
reset_manager(background_manager_, "BackgroundManager");
|
||||||
reset_manager(boost_manager_, "BoostManager");
|
reset_manager(boost_manager_, "BoostManager");
|
||||||
reset_manager(bot_info_manager_, "BotInfoManager");
|
reset_manager(bot_info_manager_, "BotInfoManager");
|
||||||
|
reset_manager(business_connection_manager_, "BusinessConnectionManager");
|
||||||
reset_manager(business_manager_, "BusinessManager");
|
reset_manager(business_manager_, "BusinessManager");
|
||||||
reset_manager(callback_queries_manager_, "CallbackQueriesManager");
|
reset_manager(callback_queries_manager_, "CallbackQueriesManager");
|
||||||
reset_manager(channel_recommendation_manager_, "ChannelRecommendationManager");
|
reset_manager(channel_recommendation_manager_, "ChannelRecommendationManager");
|
||||||
@ -3384,6 +3386,7 @@ void Td::clear() {
|
|||||||
reset_actor(ActorOwn<Actor>(std::move(background_manager_actor_)));
|
reset_actor(ActorOwn<Actor>(std::move(background_manager_actor_)));
|
||||||
reset_actor(ActorOwn<Actor>(std::move(boost_manager_actor_)));
|
reset_actor(ActorOwn<Actor>(std::move(boost_manager_actor_)));
|
||||||
reset_actor(ActorOwn<Actor>(std::move(bot_info_manager_actor_)));
|
reset_actor(ActorOwn<Actor>(std::move(bot_info_manager_actor_)));
|
||||||
|
reset_actor(ActorOwn<Actor>(std::move(business_connection_manager_actor_)));
|
||||||
reset_actor(ActorOwn<Actor>(std::move(business_manager_actor_)));
|
reset_actor(ActorOwn<Actor>(std::move(business_manager_actor_)));
|
||||||
reset_actor(ActorOwn<Actor>(std::move(channel_recommendation_manager_actor_)));
|
reset_actor(ActorOwn<Actor>(std::move(channel_recommendation_manager_actor_)));
|
||||||
reset_actor(ActorOwn<Actor>(std::move(common_dialog_manager_actor_)));
|
reset_actor(ActorOwn<Actor>(std::move(common_dialog_manager_actor_)));
|
||||||
@ -3877,6 +3880,9 @@ void Td::init_managers() {
|
|||||||
G()->set_boost_manager(boost_manager_actor_.get());
|
G()->set_boost_manager(boost_manager_actor_.get());
|
||||||
bot_info_manager_ = make_unique<BotInfoManager>(this, create_reference());
|
bot_info_manager_ = make_unique<BotInfoManager>(this, create_reference());
|
||||||
bot_info_manager_actor_ = register_actor("BotInfoManager", bot_info_manager_.get());
|
bot_info_manager_actor_ = register_actor("BotInfoManager", bot_info_manager_.get());
|
||||||
|
business_connection_manager_ = make_unique<BusinessConnectionManager>(this, create_reference());
|
||||||
|
business_connection_manager_actor_ = register_actor("BusinessConnectionManager", business_connection_manager_.get());
|
||||||
|
G()->set_business_connection_manager(business_connection_manager_actor_.get());
|
||||||
business_manager_ = make_unique<BusinessManager>(this, create_reference());
|
business_manager_ = make_unique<BusinessManager>(this, create_reference());
|
||||||
business_manager_actor_ = register_actor("BusinessManager", business_manager_.get());
|
business_manager_actor_ = register_actor("BusinessManager", business_manager_.get());
|
||||||
G()->set_business_manager(business_manager_actor_.get());
|
G()->set_business_manager(business_manager_actor_.get());
|
||||||
|
@ -46,6 +46,7 @@ class AutosaveManager;
|
|||||||
class BackgroundManager;
|
class BackgroundManager;
|
||||||
class BoostManager;
|
class BoostManager;
|
||||||
class BotInfoManager;
|
class BotInfoManager;
|
||||||
|
class BusinessConnectionManager;
|
||||||
class BusinessManager;
|
class BusinessManager;
|
||||||
class CallManager;
|
class CallManager;
|
||||||
class CallbackQueriesManager;
|
class CallbackQueriesManager;
|
||||||
@ -180,6 +181,8 @@ class Td final : public Actor {
|
|||||||
ActorOwn<BoostManager> boost_manager_actor_;
|
ActorOwn<BoostManager> boost_manager_actor_;
|
||||||
unique_ptr<BotInfoManager> bot_info_manager_;
|
unique_ptr<BotInfoManager> bot_info_manager_;
|
||||||
ActorOwn<BotInfoManager> bot_info_manager_actor_;
|
ActorOwn<BotInfoManager> bot_info_manager_actor_;
|
||||||
|
unique_ptr<BusinessConnectionManager> business_connection_manager_;
|
||||||
|
ActorOwn<BusinessConnectionManager> business_connection_manager_actor_;
|
||||||
unique_ptr<BusinessManager> business_manager_;
|
unique_ptr<BusinessManager> business_manager_;
|
||||||
ActorOwn<BusinessManager> business_manager_actor_;
|
ActorOwn<BusinessManager> business_manager_actor_;
|
||||||
unique_ptr<ChannelRecommendationManager> channel_recommendation_manager_;
|
unique_ptr<ChannelRecommendationManager> channel_recommendation_manager_;
|
||||||
|
Loading…
Reference in New Issue
Block a user