equal
deleted
inserted
replaced
14 * Description: Main server |
14 * Description: Main server |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 56 % |
19 * %version: 57 % |
20 */ |
20 */ |
21 |
21 |
22 #ifndef WLMSERVER_H |
22 #ifndef WLMSERVER_H |
23 #define WLMSERVER_H |
23 #define WLMSERVER_H |
24 |
24 |
41 #include "wlangenericplugin.h" |
41 #include "wlangenericplugin.h" |
42 |
42 |
43 class CWlmDriverIf; |
43 class CWlmDriverIf; |
44 class CWlanSsidListDb; |
44 class CWlanSsidListDb; |
45 class CWlanTimerServices; |
45 class CWlanTimerServices; |
|
46 class CWlanTickTimer; |
46 |
47 |
47 /** |
48 /** |
48 * Command Ids to be used un the asynchronous core service requests |
49 * Command Ids to be used un the asynchronous core service requests |
49 * External commands coming from clients get request id that is > KWlanExtCmdBase |
50 * External commands coming from clients get request id that is > KWlanExtCmdBase |
50 * Values 0-KWlanExtCmdBase are reserved for internal usage. |
51 * Values 0-KWlanExtCmdBase are reserved for internal usage. |
59 /** Timer interval value for disabling background scan. */ |
60 /** Timer interval value for disabling background scan. */ |
60 const TInt KBackgroundScanIntervalNever = 0; |
61 const TInt KBackgroundScanIntervalNever = 0; |
61 |
62 |
62 /** UID for WLAN Power Save Test Notifier */ |
63 /** UID for WLAN Power Save Test Notifier */ |
63 const TUid KUidWlanPowerSaveTestNote = { 0x101F6D4F }; |
64 const TUid KUidWlanPowerSaveTestNote = { 0x101F6D4F }; |
|
65 |
|
66 /** Multiplier for converting seconds into microseconds */ |
|
67 const TUint KWlanSecsToMicrosecsMultiplier( 1000000 ); |
64 |
68 |
65 /** |
69 /** |
66 * The server for WLAN services. Counterpart of RWLMServer. |
70 * The server for WLAN services. Counterpart of RWLMServer. |
67 * |
71 * |
68 * @lib wlmserversrv.lib |
72 * @lib wlmserversrv.lib |
88 TWLMCommands iFunction; |
92 TWLMCommands iFunction; |
89 TAny* iParam0; |
93 TAny* iParam0; |
90 TAny* iParam1; |
94 TAny* iParam1; |
91 TAny* iParam2; |
95 TAny* iParam2; |
92 TAny* iParam3; |
96 TAny* iParam3; |
93 TTime* iTime; |
97 TUint* iTime; |
94 |
98 |
95 SRequestMapEntry() : |
99 SRequestMapEntry() : |
96 iRequestId( 0 ), |
100 iRequestId( 0 ), |
97 iSessionId( 0 ), |
101 iSessionId( 0 ), |
98 iMessage(), |
102 iMessage(), |
905 * Method called by the scan scheduling timer when it expires. |
909 * Method called by the scan scheduling timer when it expires. |
906 * @param aThisPtr Pointer to the server instance. |
910 * @param aThisPtr Pointer to the server instance. |
907 * @return error code |
911 * @return error code |
908 */ |
912 */ |
909 static TInt ScanSchedulingTimerExpired( TAny* aThisPtr ); |
913 static TInt ScanSchedulingTimerExpired( TAny* aThisPtr ); |
910 |
914 |
|
915 /** |
|
916 * Method called by the scan scheduling timer when it expires. |
|
917 * @param aThisPtr Pointer to the server instance. |
|
918 * @return error code |
|
919 */ |
|
920 static TInt ScanSchedulingTimerCanceled( TAny* aThisPtr ); |
|
921 |
|
922 /** |
|
923 * A callback method that does absolutely nothing. |
|
924 * @param aThisPtr Pointer to the server instance. |
|
925 * @return error code |
|
926 */ |
|
927 static TInt EmptyCb( TAny* aThisPtr ); |
|
928 |
911 /** |
929 /** |
912 * Handles the conversion of IAP data list. |
930 * Handles the conversion of IAP data list. |
913 * @param aCoreIapDataList Converted IAP data list. |
931 * @param aCoreIapDataList Converted IAP data list. |
914 * @param aCoreIapSsidList Converted secondary SSID list. |
932 * @param aCoreIapSsidList Converted secondary SSID list. |
915 * @param aAmIapDataList IAP data list to be converted. |
933 * @param aAmIapDataList IAP data list to be converted. |
947 TUint32 aNewInterval, |
965 TUint32 aNewInterval, |
948 TUint32 aNextExpiration ); |
966 TUint32 aNextExpiration ); |
949 |
967 |
950 /** |
968 /** |
951 * Updates the scan scheduling timer. |
969 * Updates the scan scheduling timer. |
952 * @param aScanTime specifies when the scan should be started. |
970 * @param aScanTime specifies when the scan should be started in system ticks. |
953 * @param aTriggeringRequestId the id of that request which updates the timer. |
971 * @param aTriggeringRequestId the id of that request which updates the timer. |
954 */ |
972 */ |
955 void UpdateScanSchedulingTimer( |
973 void UpdateScanSchedulingTimer( |
956 TTime aScantime, |
974 TUint aScantime, |
957 TUint aTriggeringRequestId ); |
975 TUint aTriggeringRequestId ); |
958 |
976 |
959 /** |
977 /** |
960 * Finds the closest scan starting time from the pending scan requests in iPendingScanRequestMap. |
978 * Finds the closest scan starting time from the pending scan requests in iPendingScanRequestMap. |
961 * @param aTriggeringRequestIndex index of the scan request that should be handled next. |
979 * @param aTriggeringRequestIndex index of the scan request that should be handled next. |
1089 /** |
1107 /** |
1090 * Calculate when the scanning should be started (= current moment in time + aDelay). |
1108 * Calculate when the scanning should be started (= current moment in time + aDelay). |
1091 * @param aDelay Number of seconds to add to current moment in time. |
1109 * @param aDelay Number of seconds to add to current moment in time. |
1092 * @return Calculated time. |
1110 * @return Calculated time. |
1093 */ |
1111 */ |
1094 inline TTime CalculateScanStartTime( |
1112 inline TUint CalculateScanStartTime( |
1095 const TInt aDelay ) const; |
1113 const TInt aDelay ) const; |
1096 |
1114 |
1097 /** |
1115 /** |
1098 * Find the index of the entry that is related to aRequestId, returns count of entries |
1116 * Find the index of the entry that is related to aRequestId, returns count of entries |
1099 * in table if entry is not found. |
1117 * in table if entry is not found. |
1227 |
1245 |
1228 /** |
1246 /** |
1229 * Timer creating periodic expirations. |
1247 * Timer creating periodic expirations. |
1230 * Used for starting scheduled scans |
1248 * Used for starting scheduled scans |
1231 */ |
1249 */ |
1232 CPeriodic* iScanSchedulingTimer; |
1250 CWlanTickTimer* iScanSchedulingTimer; |
1233 |
1251 |
1234 /** |
1252 /** |
1235 * Cache for scanresults etc. |
1253 * Cache for scanresults etc. |
1236 */ |
1254 */ |
1237 CWlanScanResultCache* iCache; |
1255 CWlanScanResultCache* iCache; |
1330 |
1348 |
1331 /** |
1349 /** |
1332 * EAPOL callback handler in core. Not owned by this pointer. |
1350 * EAPOL callback handler in core. Not owned by this pointer. |
1333 */ |
1351 */ |
1334 abs_wlan_eapol_callback_c* iEapolHandler; |
1352 abs_wlan_eapol_callback_c* iEapolHandler; |
1335 |
1353 |
1336 /** |
1354 /** |
1337 * Time when the scan scheduling timer is set to expire. |
1355 * The amount of microseconds per a system tick. |
1338 */ |
1356 */ |
1339 TTime iScanSchedulingTimerExpiration; |
1357 TInt iSystemTickPeriod; |
1340 |
1358 |
|
1359 /** |
|
1360 * Time in system ticks when the scan scheduling timer is set to expire. |
|
1361 */ |
|
1362 TUint iScanSchedulingTimerExpiration; |
|
1363 |
1341 /** |
1364 /** |
1342 * Request id to that request in the iRequestMap which has set the scan scheduling timer. |
1365 * Request id to that request in the iRequestMap which has set the scan scheduling timer. |
1343 */ |
1366 */ |
1344 TUint iRequestTriggeringScanning; |
1367 TUint iRequestTriggeringScanning; |
1345 |
1368 |