equal
deleted
inserted
replaced
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 #include <mmtsy_names.h> |
20 #include <mmtsy_names.h> |
|
21 #include <cmgenconnsettings.h> |
21 |
22 |
22 #include "caoserver.h" |
23 #include "caoserver.h" |
23 #include "caoconnectionmanager.h" |
24 #include "caoconnectionmanager.h" |
24 #include "caotimer.h" |
25 #include "caotimer.h" |
25 #include "caoraumanager.h" |
26 #include "caoraumanager.h" |
177 { |
178 { |
178 iPointerStatePool->ResetAndDestroy(); |
179 iPointerStatePool->ResetAndDestroy(); |
179 delete iPointerStatePool; |
180 delete iPointerStatePool; |
180 } |
181 } |
181 |
182 |
|
183 delete iCenRepObserver; |
182 delete iGpds; |
184 delete iGpds; |
183 delete iRAUManager; |
185 delete iRAUManager; |
184 delete iTimer; |
186 delete iTimer; |
185 delete iConnectionManager; |
187 delete iConnectionManager; |
186 delete iSettings; |
188 delete iSettings; |
225 iRAUManager = CAORAUManager::NewL( *this ); |
227 iRAUManager = CAORAUManager::NewL( *this ); |
226 |
228 |
227 #endif // __ALWAYS_ON_CUSTOM_API |
229 #endif // __ALWAYS_ON_CUSTOM_API |
228 |
230 |
229 iGpds = CAOGpds::NewL( iCustomAPI ); |
231 iGpds = CAOGpds::NewL( iCustomAPI ); |
|
232 |
|
233 iCenRepObserver = CAOCenRepObserver::NewL( *this ); |
230 |
234 |
231 InitStatePoolL(); |
235 InitStatePoolL(); |
232 |
236 |
233 // Set current state to 'init' |
237 // Set current state to 'init' |
234 iCurrentState = ChangeState( TAOState::EStateInit ); |
238 iCurrentState = ChangeState( TAOState::EStateInit ); |
933 { |
937 { |
934 iCurrentState = newState; |
938 iCurrentState = newState; |
935 } |
939 } |
936 } |
940 } |
937 |
941 |
|
942 // --------------------------------------------------------------------------- |
|
943 // CAOServer::CurrentCellularDataUsageChanged |
|
944 // --------------------------------------------------------------------------- |
|
945 // |
|
946 void CAOServer::CurrentCellularDataUsageChangedL( const TInt aValue ) |
|
947 { |
|
948 LOG_1( _L("CAOServer::CurrentCellularDataUsageChanged") ); |
|
949 LOG_2( _L("> Current state: %S"), |
|
950 &StateToDesC( CurrentState()->StateName() ) ); |
|
951 |
|
952 if ( aValue != ECmCellularDataUsageDisabled ) |
|
953 { |
|
954 TAOState* newState = NULL; |
|
955 |
|
956 if ( CurrentState()->StateName() == TAOState::EStateDisabled ) |
|
957 { |
|
958 newState = iCurrentState->HandleEnableAlwaysOnL(); |
|
959 } |
|
960 else |
|
961 { |
|
962 // Behaviour is the same as if unconnect timer had expired |
|
963 iTimer->StopUnconnectTimer(); |
|
964 newState = iCurrentState->HandleUnconnectTimerExpiredL(); |
|
965 |
|
966 if( newState ) |
|
967 { |
|
968 iCurrentState = newState; |
|
969 } |
|
970 } |
|
971 } |
|
972 } |
938 |
973 |
939 // --------------------------------------------------------------------------- |
974 // --------------------------------------------------------------------------- |
940 // CAOServer::InitStatePoolL |
975 // CAOServer::InitStatePoolL |
941 // --------------------------------------------------------------------------- |
976 // --------------------------------------------------------------------------- |
942 // |
977 // |