|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * WLAN Status Info wrapper for WLAN entry plugin. |
|
16 */ |
|
17 |
|
18 #ifndef WLANSTATUSINFO_H |
|
19 #define WLANSTATUSINFO_H |
|
20 |
|
21 // System includes |
|
22 |
|
23 #include <QObject> |
|
24 |
|
25 // User includes |
|
26 |
|
27 // Forward declarations |
|
28 |
|
29 class WlanQtUtils; |
|
30 class XQSettingsManager; |
|
31 |
|
32 // External data types |
|
33 |
|
34 // Constants |
|
35 |
|
36 // Class declaration |
|
37 |
|
38 class WlanStatusInfo : public QObject |
|
39 { |
|
40 Q_OBJECT |
|
41 |
|
42 public: |
|
43 |
|
44 // Data types |
|
45 |
|
46 /*! |
|
47 * WLAN Status value. |
|
48 */ |
|
49 enum { |
|
50 //! WLAN is configured OFF. |
|
51 WlanStatusOff = 0, |
|
52 //! No WLAN connections. |
|
53 WlanStatusIdle, |
|
54 //! WLAN IAP is connected. |
|
55 WlanStatusConnected, |
|
56 }; |
|
57 |
|
58 explicit WlanStatusInfo(QObject *parent = 0); |
|
59 |
|
60 ~WlanStatusInfo(); |
|
61 |
|
62 int status() const; |
|
63 |
|
64 QString statusText() const; |
|
65 |
|
66 signals: |
|
67 |
|
68 /** |
|
69 * Signal that informs that the WLAN status has changed. |
|
70 */ |
|
71 void statusUpdated(); |
|
72 |
|
73 public slots: |
|
74 |
|
75 protected: |
|
76 |
|
77 protected slots: |
|
78 |
|
79 private: |
|
80 |
|
81 Q_DISABLE_COPY(WlanStatusInfo) |
|
82 |
|
83 bool isWlanOn() const; |
|
84 |
|
85 private slots: |
|
86 |
|
87 void updateStatus(); |
|
88 |
|
89 private: // data |
|
90 |
|
91 //! WlanQtUtils instance. |
|
92 WlanQtUtils *mWlanQtUtils; |
|
93 |
|
94 //! Settings manager for platform settings reading, writing & status changes. |
|
95 XQSettingsManager *mSettingsManager; |
|
96 |
|
97 //! WLAN status text. |
|
98 QString mStatusText; |
|
99 |
|
100 //! WLAN status value WlanStatus*. |
|
101 int mStatus; |
|
102 |
|
103 // Friend classes |
|
104 }; |
|
105 |
|
106 #endif // WLANSTATUSINFO_H |