gsprofilesrv_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/src/ProEngWrapAPIBlocks.cpp
--- a/gsprofilesrv_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/src/ProEngWrapAPIBlocks.cpp Fri Jun 25 17:09:30 2010 +0800
+++ b/gsprofilesrv_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/src/ProEngWrapAPIBlocks.cpp Thu Nov 04 13:38:47 2010 +0800
@@ -64,7 +64,7 @@
ENTRY( "ReqProfActNotificationsL", CProEngWrapAPI::RequestProfileActivationNotificationsL ),
ENTRY( "CanProfActNotificationsL", CProEngWrapAPI::CancelProfileActivationNotificationsL ),
ENTRY( "ReqActProfNotificationsL", CProEngWrapAPI::RequestActiveProfileNotificationsL ),
- ENTRY( "CanActProfNotificationsL", CProEngWrapAPI::CancelProfileActivationNotificationsL ),
+ ENTRY( "CanActProfNotificationsL", CProEngWrapAPI::CancelActiveProfileNotificationsL ),
ENTRY( "ReqProfNotificationsL", CProEngWrapAPI::RequestProfileNotificationsL ),
ENTRY( "CanProfNotificationsL", CProEngWrapAPI::CancelProfileNotificationsL ),
ENTRY( "ReqProfNameArrayNotL", CProEngWrapAPI::RequestProfileNameArrayNotificationsL ),
@@ -222,8 +222,22 @@
CleanupStack::PushL( observer );
TRAP_IGNORE(nh->RequestProfileActivationNotificationsL ( *observer ) );
- engine->SetActiveProfileL( EProfileMeetingId );
- iSchedulerUtility->Start();
+
+ TInt previousid( engine->ActiveProfileId() );
+ if ( previousid == EProfileMeetingId ) //example for active profile change
+ {
+ engine->SetActiveProfileL( EProfileOutdoorId );
+ }
+ else
+ {
+ engine->SetActiveProfileL( EProfileMeetingId );
+ }
+ TInt activeid( engine->ActiveProfileId() );
+ if ( previousid!=activeid )
+ {
+ iSchedulerUtility->Start();
+ }
+
CleanupStack::PopAndDestroy( observer );
CleanupStack::PopAndDestroy( wrapper );
CleanupStack::PopAndDestroy(); // engine
@@ -253,8 +267,21 @@
CleanupStack::PushL( observer );
TRAP_IGNORE(nh->RequestProfileActivationNotificationsL ( *observer ) );
- engine->SetActiveProfileL( EProfileMeetingId );
- iSchedulerUtility->Start();
+ TInt previousid( engine->ActiveProfileId() );
+ if ( previousid == EProfileMeetingId ) //example for active profile change
+ {
+ engine->SetActiveProfileL( EProfileOutdoorId );
+ }
+ else
+ {
+ engine->SetActiveProfileL( EProfileMeetingId );
+ }
+ TInt activeid( engine->ActiveProfileId() );
+ if ( previousid!=activeid )
+ {
+ iSchedulerUtility->Start();
+ }
+
nh->CancelProfileActivationNotifications();
CleanupStack::PopAndDestroy( observer );
CleanupStack::PopAndDestroy( wrapper );