AusweisApp2
WifiInfo.h
gehe zur Dokumentation dieser Datei
1 
8 #pragma once
9 
10 #include <QHostAddress>
11 #include <QObject>
12 
13 class test_WifiInfo;
14 
15 namespace governikus
16 {
17 
18 class WifiInfo
19  : public QObject
20 {
21  Q_OBJECT
22  friend class ::test_WifiInfo;
23 
24  private:
25  bool mWifiEnabled;
26 #if defined(Q_OS_ANDROID)
27  int mWifiCheckTimerId;
28 #endif
29 
30  static bool isPrivateIp(const QHostAddress& pAddress);
31  static bool hasPrivateIpAddress();
32 
33  [[nodiscard]] bool getCurrentWifiEnabled();
34 
35 #if defined(Q_OS_ANDROID)
36 
37  protected:
38  void timerEvent(QTimerEvent* pEvent) override;
39 #endif
40 
41  public:
42  WifiInfo();
43  ~WifiInfo() override = default;
44 
45  [[nodiscard]] bool isWifiEnabled();
46 
47  Q_SIGNALS:
48  void fireWifiEnabledChanged(bool pEnabled);
49 };
50 
51 
52 } // namespace governikus
Definition: WifiInfo.h:20
WifiInfo()
Definition: WifiInfo_android.cpp:19
void fireWifiEnabledChanged(bool pEnabled)
~WifiInfo() override=default
bool isWifiEnabled()
Definition: WifiInfo_android.cpp:71
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16