16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_NETWORK_INTERNETCONNECTIONMONITOR_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_NETWORK_INTERNETCONNECTIONMONITOR_H_ 22 #include <unordered_set> 48 const std::shared_ptr<sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface>& contentFetcherFactory);
57 static std::unique_ptr<InternetConnectionMonitor>
create(
58 std::shared_ptr<sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface> contentFetcherFactory);
68 std::shared_ptr<avsCommon::sdkInterfaces::InternetConnectionObserverInterface> observer)
override;
70 std::shared_ptr<avsCommon::sdkInterfaces::InternetConnectionObserverInterface> observer)
override;
80 std::shared_ptr<sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface> contentFetcherFactory);
85 void startMonitoring();
90 void stopMonitoring();
99 void testConnection();
106 void updateConnectionStatus(
bool connected);
109 std::unordered_set<std::shared_ptr<sdkInterfaces::InternetConnectionObserverInterface>> m_observers;
115 std::chrono::seconds m_period;
121 std::atomic<bool> m_isShuttingDown;
124 std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface> m_contentFetcherFactory;
135 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_NETWORK_INTERNETCONNECTIONMONITOR_H_
void addInternetConnectionObserver(std::shared_ptr< avsCommon::sdkInterfaces::InternetConnectionObserverInterface > observer) override
Timer to schedule task for delayed and periodic execution.
Definition: Timer.h:39
static std::shared_ptr< sdkInterfaces::InternetConnectionMonitorInterface > createInternetConnectionMonitorInterface(const std::shared_ptr< sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface > &contentFetcherFactory)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
void removeInternetConnectionObserver(std::shared_ptr< avsCommon::sdkInterfaces::InternetConnectionObserverInterface > observer) override
static std::unique_ptr< InternetConnectionMonitor > create(std::shared_ptr< sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface > contentFetcherFactory)
virtual ~InternetConnectionMonitor()
Definition: InternetConnectionMonitor.h:39
Definition: InternetConnectionMonitorInterface.h:30