14 * Description: Interface class to CenRep and PubSub |
14 * Description: Interface class to CenRep and PubSub |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 12 % |
19 * %version: 14 % |
20 */ |
20 */ |
21 |
21 |
22 #ifndef WLMPLATFORMDATA_H |
22 #ifndef WLMPLATFORMDATA_H |
23 #define WLMPLATFORMDATA_H |
23 #define WLMPLATFORMDATA_H |
24 |
24 |
25 #include <e32property.h> |
25 #include <e32property.h> |
26 #include "802dot11.h" |
26 #include "802dot11.h" |
27 #include "wlmsystemnotify.h" |
27 #include "wlmsystemnotify.h" |
28 #include "wlmplatformsubscriber.h" |
28 #include "wlmplatformsubscriber.h" |
|
29 #include "wlaninternalpskeys.h" |
29 |
30 |
30 /** |
31 /** |
31 * Interface class to PubSub and CenRep. |
32 * Interface class to PubSub and CenRep. |
32 */ |
33 */ |
33 NONSHARABLE_CLASS( CWlmPlatformData ) : |
34 NONSHARABLE_CLASS( CWlmPlatformData ) : |
97 * @param aInterval WLAN BG scan interval in seconds. |
98 * @param aInterval WLAN BG scan interval in seconds. |
98 * @return Symbian error code |
99 * @return Symbian error code |
99 */ |
100 */ |
100 TInt PublishBgScanInterval( |
101 TInt PublishBgScanInterval( |
101 TUint32& aInterval ); |
102 TUint32& aInterval ); |
|
103 |
|
104 /** |
|
105 * Method for reading WLAN on/off state. |
|
106 * @return WLAN on/off state |
|
107 */ |
|
108 TWlanOnOffState GetWlanOnOffState(); |
102 |
109 |
103 private: // Methods |
110 private: // Methods |
104 |
111 |
105 /** |
112 /** |
106 * C++ default constructor. |
113 * C++ default constructor. |
110 |
117 |
111 /** |
118 /** |
112 * Symbian 2nd phase constructor. |
119 * Symbian 2nd phase constructor. |
113 */ |
120 */ |
114 void ConstructL(); |
121 void ConstructL(); |
|
122 |
|
123 /** |
|
124 * Notifies WLAN on/off observer of the changes |
|
125 */ |
|
126 void NotifyWlanOnOffObserver(); |
|
127 |
|
128 /** |
|
129 * Method for publishing WLAN on/off state. |
|
130 * @param aWlanState WLAN state to be published. |
|
131 */ |
|
132 void PublishWlanOnOff( TPSWlanOnOff aWlanState ); |
|
133 |
|
134 private: // Definitions |
|
135 |
|
136 /** |
|
137 * Last WLAN on/off state notified to the observer. |
|
138 */ |
|
139 enum TWlanNotifiedState |
|
140 { |
|
141 EWlanNotifiedNone, // Initial value, Observer not yet notified anything |
|
142 EWlanNotifiedOff, // Observer notified that WLAN is set OFF |
|
143 EWlanNotifiedOn // Observer notified that WLAN is set ON |
|
144 }; |
115 |
145 |
116 private: // Data |
146 private: // Data |
117 |
147 |
118 /** Subscriber for watching KPSGlobalSystemState via P&S. */ |
148 /** Subscriber for watching KPSGlobalSystemState via P&S. */ |
119 CWlmPlatformSubscriber* iPropertySystemState; |
149 CWlmPlatformSubscriber* iPropertySystemState; |
122 CWlmPlatformSubscriber* iBtConnections; |
152 CWlmPlatformSubscriber* iBtConnections; |
123 |
153 |
124 /** Subscriber for watching KCTSYEmergencyCallInfo via P&S. */ |
154 /** Subscriber for watching KCTSYEmergencyCallInfo via P&S. */ |
125 CWlmPlatformSubscriber* iEmergencyCall; |
155 CWlmPlatformSubscriber* iEmergencyCall; |
126 |
156 |
|
157 /** Subscriber for watching WLAN master switch via CenRep. */ |
|
158 CWlmPlatformSubscriber* iWlanOnOff; |
|
159 |
|
160 /** Subscriber for watching WLAN force disable switch via CenRep. */ |
|
161 CWlmPlatformSubscriber* iWlanForceDisable; |
|
162 |
127 /** Handle to KPropertyWlanMacAddress property via P&S. */ |
163 /** Handle to KPropertyWlanMacAddress property via P&S. */ |
128 RProperty iPsMacAddress; |
164 RProperty iPsMacAddress; |
129 |
165 |
130 /** Handle to KPropertyWlanIndicator property via P&S. */ |
166 /** Handle to KPropertyWlanIndicator property via P&S. */ |
131 RProperty iPsIndicator; |
167 RProperty iPsIndicator; |
132 |
168 |
133 /** Handle to KPropertyWlanBgScanInterval property via P&S. */ |
169 /** Handle to KPropertyWlanBgScanInterval property via P&S. */ |
134 RProperty iPsBgScanInterval; |
170 RProperty iPsBgScanInterval; |
135 |
171 |
|
172 /** Handle to KPropertyWlanOnOffState property via P&S. */ |
|
173 RProperty iPsOnOffState; |
|
174 |
136 /** Callback for notifications. */ |
175 /** Callback for notifications. */ |
137 MWlmSystemNotify& iCallback; |
176 MWlmSystemNotify& iCallback; |
138 |
177 |
139 /** Stores the current System Mode */ |
178 /** Stores the current System Mode */ |
140 TWlanSystemMode iSystemMode; |
179 TWlanSystemMode iSystemMode; |
151 /** Whether system is in offline. */ |
190 /** Whether system is in offline. */ |
152 TBool iIsInOffline; |
191 TBool iIsInOffline; |
153 |
192 |
154 /** Whether Emergency Call is active. */ |
193 /** Whether Emergency Call is active. */ |
155 TBool iIsEmergencyCall; |
194 TBool iIsEmergencyCall; |
|
195 |
|
196 /** Last WLAN on/off state notified to the observer. */ |
|
197 TWlanNotifiedState iNotifiedWlanState; |
156 |
198 |
157 }; |
199 }; |
158 |
200 |
159 #endif // WLMPLATFORMDATA_H |
201 #endif // WLMPLATFORMDATA_H |