All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WindowsConnectivityService.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "IConnectivityService.h"
6 #include "Types.h"
7 #include "CallbackCollection.h"
8 #include "EegeoWindowsGuard.h"
9 #include <string>
10 
11 namespace Eegeo
12 {
13  namespace Windows
14  {
15  class WindowsConnectivityTimer;
16 
18  {
19  public:
22 
23  bool HasConnectivity();
24  Web::ConnectivityType GetConnectivityType();
25 
26  const std::string& GetSSIDForCurrentWifi();
27 
28  void RegisterConnectivityChangedCallback(Helpers::ICallback1<const bool&>& callback);
29  void UnregisterConnectivityChangedCallback(Helpers::ICallback1<const bool&>& callback);
30 
31  void HandleTimerExpired();
32 
33  private:
34  WindowsConnectivityTimer& m_timer;
36  INetworkListManager *m_pNetworkListManager;
37 
39  std::string m_currentSSID;
40 
41  Web::ConnectivityType m_connectivityType;
42 
43  void SetConnectivityType(Web::ConnectivityType connectivityType);
44  void UpdateConnectivity();
45  void ReleaseNetworkListManager();
46 
47  bool m_coInitialised;
48  };
49  }
50 }
51 
52