21 #include <hbapplication.h> |
21 #include <hbapplication.h> |
22 #include <hbmessagebox.h> |
22 #include <hbmessagebox.h> |
23 |
23 |
24 // symbian |
24 // symbian |
25 #include <centralrepository.h> |
25 #include <centralrepository.h> |
26 #include <ProfileEngineSDKCRKeys.h> |
26 #include <coreapplicationuissdkcrkeys.h> |
27 |
27 |
28 #include "satappmainhandler.h" |
28 #include "satappmainhandler.h" |
29 #include "satappserverdispatcher.h" |
29 #include "satappserverdispatcher.h" |
30 #include "satappmenuprovider.h" |
30 #include "satappmenuprovider.h" |
31 #include "satappinputprovider.h" |
31 #include "satappinputprovider.h" |
264 { |
264 { |
265 //If current active profile is offline, show a warning and quit |
265 //If current active profile is offline, show a warning and quit |
266 qDebug("SATAPP: SatAppMainHandler::isOffline >"); |
266 qDebug("SATAPP: SatAppMainHandler::isOffline >"); |
267 TInt profileId(0); |
267 TInt profileId(0); |
268 CRepository* cr (NULL); |
268 CRepository* cr (NULL); |
269 TRAPD(err, cr = CRepository::NewL(KCRUidProfileEngine)); |
269 TRAPD(err, cr = CRepository::NewL(KCRUidCoreApplicationUIs)); |
270 if ( KErrNone == err ) |
270 if ( KErrNone == err ) |
271 { |
271 { |
272 // Get the ID of the currently active profile: |
272 // Get the ID of the currently active profile: |
273 const TInt error = cr->Get(KProEngActiveProfile, profileId); |
273 const TInt error = |
|
274 cr->Get(KCoreAppUIsNetworkConnectionAllowed, profileId); |
274 qDebug("SATAPP: SatAppMainHandler::isOffline get active \ |
275 qDebug("SATAPP: SatAppMainHandler::isOffline get active \ |
275 profile error=%d",error); |
276 profile error=%d",error); |
276 delete cr; |
277 delete cr; |
277 } |
278 } |
278 qDebug("SATAPP: SatAppMainHandler::isOffline< profileId = %d",profileId); |
279 qDebug("SATAPP: SatAppMainHandler::isOffline< profileId = %d",profileId); |
279 return ( KSatActiveProfileOffline == profileId ); |
280 return ( ECoreAppUIsNetworkConnectionNotAllowed == profileId ); |
280 } |
281 } |
281 |
282 |
282 // ---------------------------------------------------------------------------- |
283 // ---------------------------------------------------------------------------- |
283 // SatAppMainHandler::showOfflineWarning |
284 // SatAppMainHandler::showOfflineWarning |
284 // ---------------------------------------------------------------------------- |
285 // ---------------------------------------------------------------------------- |