16 #ifndef ALEXA_CLIENT_SDK_ACL_INCLUDE_ACL_AVSCONNECTIONMANAGER_H_ 17 #define ALEXA_CLIENT_SDK_ACL_INCLUDE_ACL_AVSCONNECTIONMANAGER_H_ 23 #include <unordered_set> 74 ,
public std::enable_shared_from_this<AVSConnectionManager> {
83 const std::shared_ptr<AVSConnectionManagerInterface>& connectionManager);
94 const std::shared_ptr<acsdkShutdownManagerInterfaces::ShutdownNotifierInterface>& shutdownNotifier,
95 const std::shared_ptr<MessageRouterInterface>& messageRouter,
96 const std::shared_ptr<avsCommon::sdkInterfaces::InternetConnectionMonitorInterface>& internetConnectionMonitor);
111 static std::shared_ptr<AVSConnectionManager>
create(
112 std::shared_ptr<MessageRouterInterface> messageRouter,
114 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::ConnectionStatusObserverInterface>>
115 connectionStatusObservers =
116 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::ConnectionStatusObserverInterface>>(),
117 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface>> messageObservers =
118 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface>>(),
119 std::shared_ptr<avsCommon::sdkInterfaces::InternetConnectionMonitorInterface> internetConnectionMonitor =
130 void addMessageObserver(std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface> observer)
override;
131 void removeMessageObserver(std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface> observer)
override;
136 void sendMessage(std::shared_ptr<avsCommon::avs::MessageRequest> request)
override;
161 std::shared_ptr<MessageRouterInterface> messageRouter,
162 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::ConnectionStatusObserverInterface>>
163 connectionStatusObservers =
164 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::ConnectionStatusObserverInterface>>(),
165 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface>> messageObserver =
166 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface>>(),
167 std::shared_ptr<avsCommon::sdkInterfaces::InternetConnectionMonitorInterface> internetConnectionMonitor =
170 void doShutdown()
override;
174 const std::vector<ConnectionStatusObserverInterface::EngineConnectionStatus>& engineConnectionStatuses)
179 std::shared_ptr<MessageRouterInterface> getMessageRouter()
const;
182 std::mutex m_isEnabledMutex;
185 mutable std::mutex m_messageRouterMutex;
191 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface>> m_messageObservers;
194 std::mutex m_messageObserverMutex;
197 std::shared_ptr<MessageRouterInterface> m_messageRouter;
200 std::shared_ptr<avsCommon::sdkInterfaces::InternetConnectionMonitorInterface> m_internetConnectionMonitor;
206 #endif // ALEXA_CLIENT_SDK_ACL_INCLUDE_ACL_AVSCONNECTIONMANAGER_H_ static std::shared_ptr< MessageSenderInterface > createMessageSenderInterface(const std::shared_ptr< AVSConnectionManagerInterface > &connectionManager)
bool isEnabled() override
Definition: MessageRouterObserverInterface.h:31
void onConnectionStatusChanged(bool connected) override
::std::string string
Definition: gtest-port.h:1097
Definition: RequiresShutdown.h:32
Definition: AbstractAVSConnectionManager.h:33
void addMessageObserver(std::shared_ptr< avsCommon::sdkInterfaces::MessageObserverInterface > observer) override
void reconnect() override
void removeMessageObserver(std::shared_ptr< avsCommon::sdkInterfaces::MessageObserverInterface > observer) override
Definition: AVSConnectionManager.h:69
void sendMessage(std::shared_ptr< avsCommon::avs::MessageRequest > request) override
void setAVSGateway(const std::string &avsGateway) override
std::string getAVSGateway() const override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
static std::shared_ptr< AVSConnectionManager > create(std::shared_ptr< MessageRouterInterface > messageRouter, bool isEnabled=true, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::ConnectionStatusObserverInterface >> connectionStatusObservers=std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::ConnectionStatusObserverInterface >>(), std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::MessageObserverInterface >> messageObservers=std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::MessageObserverInterface >>(), std::shared_ptr< avsCommon::sdkInterfaces::InternetConnectionMonitorInterface > internetConnectionMonitor=nullptr)
static std::shared_ptr< AVSConnectionManagerInterface > createAVSConnectionManagerInterface(const std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > &shutdownNotifier, const std::shared_ptr< MessageRouterInterface > &messageRouter, const std::shared_ptr< avsCommon::sdkInterfaces::InternetConnectionMonitorInterface > &internetConnectionMonitor)
void onWakeConnectionRetry() override
bool isConnected() const override
Definition: InternetConnectionObserverInterface.h:26
tuple message
Definition: gtest_output_test.py:331
Status
Definition: ConnectionStatusObserverInterface.h:36