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: 14 % |
19 * %version: 12 % |
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" |
|
30 |
29 |
31 /** |
30 /** |
32 * Interface class to PubSub and CenRep. |
31 * Interface class to PubSub and CenRep. |
33 */ |
32 */ |
34 NONSHARABLE_CLASS( CWlmPlatformData ) : |
33 NONSHARABLE_CLASS( CWlmPlatformData ) : |
98 * @param aInterval WLAN BG scan interval in seconds. |
97 * @param aInterval WLAN BG scan interval in seconds. |
99 * @return Symbian error code |
98 * @return Symbian error code |
100 */ |
99 */ |
101 TInt PublishBgScanInterval( |
100 TInt PublishBgScanInterval( |
102 TUint32& aInterval ); |
101 TUint32& aInterval ); |
103 |
|
104 /** |
|
105 * Method for reading WLAN on/off state. |
|
106 * @return WLAN on/off state |
|
107 */ |
|
108 TWlanOnOffState GetWlanOnOffState(); |
|
109 |
102 |
110 private: // Methods |
103 private: // Methods |
111 |
104 |
112 /** |
105 /** |
113 * C++ default constructor. |
106 * C++ default constructor. |
117 |
110 |
118 /** |
111 /** |
119 * Symbian 2nd phase constructor. |
112 * Symbian 2nd phase constructor. |
120 */ |
113 */ |
121 void ConstructL(); |
114 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 }; |
|
145 |
115 |
146 private: // Data |
116 private: // Data |
147 |
117 |
148 /** Subscriber for watching KPSGlobalSystemState via P&S. */ |
118 /** Subscriber for watching KPSGlobalSystemState via P&S. */ |
149 CWlmPlatformSubscriber* iPropertySystemState; |
119 CWlmPlatformSubscriber* iPropertySystemState; |
152 CWlmPlatformSubscriber* iBtConnections; |
122 CWlmPlatformSubscriber* iBtConnections; |
153 |
123 |
154 /** Subscriber for watching KCTSYEmergencyCallInfo via P&S. */ |
124 /** Subscriber for watching KCTSYEmergencyCallInfo via P&S. */ |
155 CWlmPlatformSubscriber* iEmergencyCall; |
125 CWlmPlatformSubscriber* iEmergencyCall; |
156 |
126 |
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 |
|
163 /** Handle to KPropertyWlanMacAddress property via P&S. */ |
127 /** Handle to KPropertyWlanMacAddress property via P&S. */ |
164 RProperty iPsMacAddress; |
128 RProperty iPsMacAddress; |
165 |
129 |
166 /** Handle to KPropertyWlanIndicator property via P&S. */ |
130 /** Handle to KPropertyWlanIndicator property via P&S. */ |
167 RProperty iPsIndicator; |
131 RProperty iPsIndicator; |
168 |
132 |
169 /** Handle to KPropertyWlanBgScanInterval property via P&S. */ |
133 /** Handle to KPropertyWlanBgScanInterval property via P&S. */ |
170 RProperty iPsBgScanInterval; |
134 RProperty iPsBgScanInterval; |
171 |
|
172 /** Handle to KPropertyWlanOnOffState property via P&S. */ |
|
173 RProperty iPsOnOffState; |
|
174 |
135 |
175 /** Callback for notifications. */ |
136 /** Callback for notifications. */ |
176 MWlmSystemNotify& iCallback; |
137 MWlmSystemNotify& iCallback; |
177 |
138 |
178 /** Stores the current System Mode */ |
139 /** Stores the current System Mode */ |
190 /** Whether system is in offline. */ |
151 /** Whether system is in offline. */ |
191 TBool iIsInOffline; |
152 TBool iIsInOffline; |
192 |
153 |
193 /** Whether Emergency Call is active. */ |
154 /** Whether Emergency Call is active. */ |
194 TBool iIsEmergencyCall; |
155 TBool iIsEmergencyCall; |
195 |
|
196 /** Last WLAN on/off state notified to the observer. */ |
|
197 TWlanNotifiedState iNotifiedWlanState; |
|
198 |
156 |
199 }; |
157 }; |
200 |
158 |
201 #endif // WLMPLATFORMDATA_H |
159 #endif // WLMPLATFORMDATA_H |