--- a/profilesservices/ProfileEngine/WrapperSrc/CProEngNotifyHandlerImpl.cpp Fri Apr 16 15:15:08 2010 +0300
+++ b/profilesservices/ProfileEngine/WrapperSrc/CProEngNotifyHandlerImpl.cpp Mon May 03 12:46:45 2010 +0300
@@ -30,7 +30,8 @@
#include <MProEngProfileNameArrayObserver.h>
#include <ProfileEngineConstants.h>
#include <ProfileEnginePrivatePSKeys.h>
-
+#include "CProEngActiveSettingsEventDelegate.h"
+#include "CProEngMasterSettingsEventDelegate.h"
// ============================= LOCAL FUNCTIONS ===============================
@@ -53,7 +54,12 @@
// CProEngNotifyHandlerImpl::CProEngNotifyHandlerImpl
// -----------------------------------------------------------------------------
//
-CProEngNotifyHandlerImpl::CProEngNotifyHandlerImpl()
+CProEngNotifyHandlerImpl::CProEngNotifyHandlerImpl() :
+ iActiveIdEventDelegate( NULL ),
+ iActiveProfileEventDelegate( NULL ),
+ iNameArrayEventDelegate( NULL ),
+ iActiveSettingEventDelegate( NULL ),
+ iMasterSettingEventDelegate( NULL )
{
}
@@ -194,6 +200,60 @@
return result;
}
+
+// -----------------------------------------------------------------------------
+// CProEngNotifyHandlerImpl::RequestActiveSettingsNotificationsL
+// -----------------------------------------------------------------------------
+//
+TInt CProEngNotifyHandlerImpl::RequestActiveSettingsNotificationsL(
+ MProEngActiveSettingsObserver &aObserver )
+ {
+ if( iActiveSettingEventDelegate )
+ {
+ return KErrAlreadyExists;
+ }
+
+ iActiveSettingEventDelegate = CProEngActiveSettingsEventDelegate::NewL(
+ aObserver );
+
+ // make the actual request to the Central Repository:
+ TInt result( iActiveSettingEventDelegate->RequestNotification() );
+ if( result != KErrNone )
+ {
+ delete iActiveSettingEventDelegate;
+ iActiveSettingEventDelegate = NULL;
+ }
+
+ return result;
+ }
+
+// -----------------------------------------------------------------------------
+// CProEngNotifyHandlerImpl::RequestMasterSettingsNotificationsL
+// -----------------------------------------------------------------------------
+//
+TInt CProEngNotifyHandlerImpl::RequestMasterSettingsNotificationsL(
+ MProEngMasterSettingsObserver &aObserver )
+ {
+ if( iMasterSettingEventDelegate )
+ {
+ return KErrAlreadyExists;
+ }
+
+ iMasterSettingEventDelegate = CProEngMasterSettingsEventDelegate::NewL(
+ aObserver );
+
+ // make the actual request to the Central Repository:
+ TInt result( iMasterSettingEventDelegate->RequestNotification() );
+ if( result != KErrNone )
+ {
+ delete iMasterSettingEventDelegate;
+ iMasterSettingEventDelegate = NULL;
+ }
+
+ return result;
+ }
+
+
// -----------------------------------------------------------------------------
// CProEngNotifyHandlerImpl::CancelProfileActivationNotifications
// -----------------------------------------------------------------------------
@@ -256,6 +316,35 @@
}
}
+
+// -----------------------------------------------------------------------------
+// CProEngNotifyHandlerImpl::CancelActiveSettingsNotificationsL
+// -----------------------------------------------------------------------------
+//
+void CProEngNotifyHandlerImpl::CancelActiveSettingsNotificationsL()
+ {
+ if( iActiveSettingEventDelegate )
+ {
+ iActiveSettingEventDelegate->Cancel();
+ delete iActiveSettingEventDelegate;
+ iActiveSettingEventDelegate = NULL;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CProEngNotifyHandlerImpl::CancelMasterSettingsNotificationsL
+// -----------------------------------------------------------------------------
+//
+void CProEngNotifyHandlerImpl::CancelMasterSettingsNotificationsL()
+ {
+ if( iMasterSettingEventDelegate )
+ {
+ iMasterSettingEventDelegate->Cancel();
+ delete iMasterSettingEventDelegate;
+ iMasterSettingEventDelegate = NULL;
+ }
+ }
+
// -----------------------------------------------------------------------------
// CProEngNotifyHandlerImpl::CancelAll
// -----------------------------------------------------------------------------
@@ -265,6 +354,9 @@
CancelProfileActivationNotifications();
CancelActiveProfileNotifications();
CancelProfileNameArrayNotifications();
+ CancelActiveSettingsNotificationsL();
+ CancelMasterSettingsNotificationsL();
+
TInt count = iProfileEventDelegates.Count();
for( TInt i( 0 ); i<count; ++i )
{