PECengine/StorageManager2/ClientSrc/CPEngStorageManagerFactory.cpp
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Factory of Storage Manager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    <e32std.h>
       
    22 #include	<s32mem.h>
       
    23 #include	"CPEngStorageManagerFactory.h"
       
    24 #include	"CPEngSessionSlotId.h"
       
    25 #include	"CPEngStorageManagerWatcher.h"
       
    26 #include	"CPEngStorageManager.h"
       
    27 #include	"CPEngSessionSlotState.h"
       
    28 #include	"CPEngSessionSlotEvent.h"
       
    29 #include	"MPEngGlobalEventObserver.h"
       
    30 
       
    31 // PEC Engine internal constants
       
    32 #include "PEngPresenceEngineConsts2.h"
       
    33 
       
    34 
       
    35 // CONSTANTS
       
    36 // 50 is the number representing additional data size of global event
       
    37 const TInt KGlobalEventSize = (	KPEngMaxAppIdLength
       
    38                                 + KPEngMaxServiceAddressLength +
       
    39                                 + KPEngMaxUserIdLength + 50 );
       
    40 
       
    41 // application ID count , usually up to 20 IDs per Session Slot
       
    42 const TInt KAppIdCount = 20;
       
    43 
       
    44 // size of the applications IDs per one Session slot
       
    45 const TInt KSessionStateSize = KPEngMaxAppIdLength * KAppIdCount;
       
    46 
       
    47 // basic evaluation of the buffer for the global sessions slot states
       
    48 // 5 as some reasonable number of sessions, should be more than 130
       
    49 const TInt KGlobalSessionStatesSize =
       
    50     5 * ( KPEngMaxAppIdLength * KAppIdCount +
       
    51           KPEngMaxServiceAddressLength + KPEngMaxUserIdLength );
       
    52 
       
    53 // 30% reserve for incoming data buffer
       
    54 const TInt KBufferMultiplier = 13 / 10;
       
    55 
       
    56 // MACROS
       
    57 /**
       
    58  *  Reload Listener
       
    59  *  @since 3.0
       
    60  */
       
    61 #define RELOAD_LISTENER( aStatus )\
       
    62     if( !IsActive() \
       
    63         && \
       
    64         ( aStatus != KErrNoMemory )\
       
    65         &&\
       
    66         ( aStatus != KErrCancel )\
       
    67         &&\
       
    68         ( aStatus != KErrServerTerminated ) \
       
    69       )\
       
    70         {\
       
    71         iStoreManagerClient.ReloadGlobalEventListener( iGlobalEventDes, iStatus );\
       
    72         SetActive();\
       
    73         }
       
    74 
       
    75 /**
       
    76  *  Check scheduled deletion of the factory
       
    77  *  return TInt
       
    78  *  @since 3.0
       
    79  */
       
    80 #define CHECK_OBJECT_DELETION_TINT()\
       
    81     if( !alive )\
       
    82         {\
       
    83         return KErrNone;\
       
    84         }
       
    85 
       
    86 /**
       
    87  *  Check scheduled deletion of the factory
       
    88  *  Pop and destroy 1 item from clean up stack
       
    89  *  @since 3.0
       
    90  */
       
    91 #define CHECK_OBJECT_DELETION_POPADESX()\
       
    92     if( !alive )\
       
    93         {\
       
    94         CleanupStack::PopAndDestroy();\
       
    95         return;\
       
    96         }
       
    97 
       
    98 // ============================ MEMBER FUNCTIONS ===============================
       
    99 
       
   100 // -----------------------------------------------------------------------------
       
   101 // CPEngStorageManagerFactory::CPEngStorageManagerFactory
       
   102 // C++ default constructor can NOT contain any code, that might leave.
       
   103 // -----------------------------------------------------------------------------
       
   104 //
       
   105 CPEngStorageManagerFactory::CPEngStorageManagerFactory()
       
   106         : CActive( CActive::EPriorityStandard ),
       
   107         iGlobalEventDes( NULL, 1 ),
       
   108         // start with one session slot
       
   109         iAllStatesBuffSize( KGlobalSessionStatesSize )
       
   110     {
       
   111     iAccessCount++;
       
   112     }
       
   113 
       
   114 
       
   115 // -----------------------------------------------------------------------------
       
   116 // CPEngStorageManagerFactory::ConstructL
       
   117 // Symbian 2nd phase constructor can leave.
       
   118 // -----------------------------------------------------------------------------
       
   119 //
       
   120 void CPEngStorageManagerFactory::ConstructL()
       
   121     {
       
   122     User::LeaveIfError( iStoreManagerClient.Connect() );
       
   123     // add active object to the active scheduler
       
   124     CActiveScheduler::Add( this );
       
   125     }
       
   126 
       
   127 
       
   128 // -----------------------------------------------------------------------------
       
   129 // CPEngStorageManagerFactory::InstanceLC
       
   130 //
       
   131 // -----------------------------------------------------------------------------
       
   132 //
       
   133 CPEngStorageManagerFactory* CPEngStorageManagerFactory::InstanceLC()
       
   134     {
       
   135 
       
   136     CPEngStorageManagerFactory* storeFactory = NULL;
       
   137     storeFactory = Instance();
       
   138     if ( !storeFactory )
       
   139         {
       
   140         // create notify factory
       
   141         storeFactory = new( ELeave ) CPEngStorageManagerFactory();
       
   142         CleanupClosePushL( *storeFactory );
       
   143         storeFactory->ConstructL();
       
   144         User::LeaveIfError( Dll::SetTls( storeFactory ) );
       
   145         }
       
   146     else
       
   147         {
       
   148         storeFactory->Open();                  // CSI: 65 #
       
   149         CleanupClosePushL( *storeFactory );
       
   150         }
       
   151     return storeFactory;
       
   152     }
       
   153 
       
   154 
       
   155 // -----------------------------------------------------------------------------
       
   156 // CPEngStorageManagerFactory::InstanceLC
       
   157 //
       
   158 // -----------------------------------------------------------------------------
       
   159 //
       
   160 CPEngStorageManagerFactory* CPEngStorageManagerFactory::Instance()
       
   161     {
       
   162     return static_cast<CPEngStorageManagerFactory*> ( Dll::Tls() );
       
   163     }
       
   164 
       
   165 
       
   166 // Destructor
       
   167 CPEngStorageManagerFactory::~CPEngStorageManagerFactory()
       
   168     {
       
   169     // if we have not counter to zero, panic
       
   170     __ASSERT_ALWAYS( iAccessCount == 0,
       
   171                      User::Panic( KPEngSMEuserCBasePanic,
       
   172                                   KPEngSMEuserCBasePanicReason ) );
       
   173 
       
   174     Cancel();
       
   175     // check si scout was created and therefore needs to be stoped
       
   176     if ( iScoutCreated )
       
   177         {
       
   178         iStoreManagerClient.StopEventListening();
       
   179         }
       
   180 
       
   181     iObservers.Reset();
       
   182     iStorageWatchers.ResetAndDestroy();
       
   183     iStoreManagerClient.Close();
       
   184     Dll::SetTls( NULL );
       
   185     delete iGlobalEventBuff;
       
   186 
       
   187     if ( iAliveFlag )
       
   188         {
       
   189         ( *iAliveFlag ) = EFalse;
       
   190         }
       
   191 
       
   192 
       
   193 #if _BullseyeCoverage
       
   194     cov_write();
       
   195 #endif
       
   196     }
       
   197 
       
   198 
       
   199 // =============================================================================
       
   200 // =============== Reference Counting Support ==================================
       
   201 // =============================================================================
       
   202 
       
   203 // -----------------------------------------------------------------------------
       
   204 // CPEngStorageManagerFactory::Open()
       
   205 // -----------------------------------------------------------------------------
       
   206 //
       
   207 void CPEngStorageManagerFactory::Open()
       
   208     {
       
   209     iAccessCount++;
       
   210     }
       
   211 
       
   212 
       
   213 // -----------------------------------------------------------------------------
       
   214 // CPEngStorageManagerFactory::Close()
       
   215 // -----------------------------------------------------------------------------
       
   216 //
       
   217 void CPEngStorageManagerFactory::Close()
       
   218     {
       
   219     iAccessCount--;
       
   220     if ( iAccessCount == 0 ) // 0
       
   221         {
       
   222         // do not delete if we are still processing notifications
       
   223         delete this;
       
   224         }
       
   225     }
       
   226 
       
   227 
       
   228 // =============================================================================
       
   229 // ========= Implementation of Virtual functions of CActive ====================
       
   230 // =============================================================================
       
   231 
       
   232 // -----------------------------------------------------------------------------
       
   233 // CPEngStorageManagerFactory::RunL()
       
   234 // -----------------------------------------------------------------------------
       
   235 //
       
   236 void CPEngStorageManagerFactory::RunL()
       
   237     {
       
   238     // Check the state, if the Global event fit in the buffer
       
   239     TInt status ( iStatus.Int() );
       
   240     if ( status > KErrNone )
       
   241         {
       
   242         // buffer was not big enough, set the new size
       
   243         iGlobalEventBuff = iGlobalEventBuff->ReAllocL( status );
       
   244         iGlobalEventDes.Set( iGlobalEventBuff->Des() );
       
   245         RELOAD_LISTENER( iStatus.Int() );
       
   246         return;
       
   247         }
       
   248     User::LeaveIfError( status );
       
   249 
       
   250     // decode event from buffer
       
   251     CPEngSessionSlotEvent* newEvent = CPEngSessionSlotEvent::NewLC();
       
   252     // unpack the buffer into the Session Event
       
   253     newEvent->UnpackEventL( *iGlobalEventBuff );
       
   254 
       
   255     TBool alive( ETrue );
       
   256     iAliveFlag = &alive;
       
   257 
       
   258     // now notify all who is interested in the event
       
   259     TInt count ( iObservers.Count() );
       
   260     for ( TInt x( 0 ) ; x < count ; x++ )
       
   261         {
       
   262         TRAPD( e,
       
   263                iObservers[ x ]->HandleNewSessionSlotEventL( *newEvent ) );
       
   264         if ( e != KErrNone )
       
   265             {
       
   266             iObservers[ x ]->HandleObserverError( e );
       
   267             }
       
   268         }
       
   269 
       
   270     CHECK_OBJECT_DELETION_POPADESX();
       
   271 
       
   272     // now notify Watcher which is connected to this
       
   273     count = iStorageWatchers.Count();
       
   274     const CPEngSessionSlotId& slotId =
       
   275         newEvent->SessionSlotIndentification();
       
   276     for ( TInt i( 0 ) ; i < count ; i++ )
       
   277         {
       
   278         if (
       
   279             KErrNone == iStorageWatchers[ i ]->SessionSlotId().Match(
       
   280                 slotId )
       
   281         )
       
   282             {
       
   283             iStorageWatchers[ i ]->NotifyGlobalEvent( *newEvent );
       
   284             // leave loop, only one watcher can match
       
   285             break;
       
   286             }
       
   287         }
       
   288 
       
   289     CHECK_OBJECT_DELETION_POPADESX();
       
   290     iAliveFlag = NULL;
       
   291 
       
   292     CleanupStack::PopAndDestroy(); // newEvent
       
   293     // continue listening
       
   294     RELOAD_LISTENER( iStatus.Int() );
       
   295     }
       
   296 
       
   297 
       
   298 // -----------------------------------------------------------------------------
       
   299 // CPEngStorageManagerFactory::RunError()
       
   300 // -----------------------------------------------------------------------------
       
   301 //
       
   302 TInt CPEngStorageManagerFactory::RunError( TInt aError )
       
   303     {
       
   304     // notify error to the listeners
       
   305 
       
   306     TBool alive( ETrue );
       
   307     iAliveFlag = &alive;
       
   308 
       
   309     TInt count ( iObservers.Count() );
       
   310     for ( TInt x( 0 ) ; x < count ; x++ )
       
   311         {
       
   312         iObservers[ x ]->HandleObserverError( aError );
       
   313         TInt count ( iStorageWatchers.Count() );
       
   314         for ( TInt i ( 0 ) ; i < count ; i++ )
       
   315             {
       
   316             iStorageWatchers[ i ]->NotifyListenerError( aError );
       
   317             }
       
   318         }
       
   319 
       
   320     CHECK_OBJECT_DELETION_TINT();
       
   321     iAliveFlag = NULL;
       
   322 
       
   323     RELOAD_LISTENER( aError );
       
   324     return KErrNone;
       
   325     }
       
   326 
       
   327 
       
   328 // -----------------------------------------------------------------------------
       
   329 // CPEngStorageManagerFactory::DoCancel()
       
   330 // -----------------------------------------------------------------------------
       
   331 //
       
   332 void CPEngStorageManagerFactory::DoCancel()
       
   333     {
       
   334     iStoreManagerClient.StopEventListening();
       
   335     iScoutCreated = EFalse;
       
   336     }
       
   337 
       
   338 
       
   339 // =============================================================================
       
   340 // =============== Functions from MPEngStorageFactory class ====================
       
   341 // =============================================================================
       
   342 
       
   343 // -----------------------------------------------------------------------------
       
   344 // CPEngStorageManagerFactory::CloseStorageWatcher()
       
   345 // -----------------------------------------------------------------------------
       
   346 //
       
   347 void CPEngStorageManagerFactory::CloseStorageWatcher(
       
   348     CPEngStorageManagerWatcher* aStorageWatcher )
       
   349     {
       
   350     TInt index( iStorageWatchers.Find( aStorageWatcher ) );
       
   351     if ( index != KErrNotFound )
       
   352         {
       
   353         iStorageWatchers.Remove( index );
       
   354         }
       
   355     Close();
       
   356     }
       
   357 
       
   358 
       
   359 // -----------------------------------------------------------------------------
       
   360 // CPEngStorageManagerFactory::OpenWatcher()
       
   361 // -----------------------------------------------------------------------------
       
   362 //
       
   363 void CPEngStorageManagerFactory::OpenWatcher()
       
   364     {
       
   365     Open();
       
   366     }
       
   367 
       
   368 
       
   369 // -----------------------------------------------------------------------------
       
   370 // CPEngStorageManagerFactory::MainClient()
       
   371 // -----------------------------------------------------------------------------
       
   372 //
       
   373 RPEngStorageClient& CPEngStorageManagerFactory::MainClient()
       
   374     {
       
   375     return iStoreManagerClient;
       
   376     }
       
   377 
       
   378 
       
   379 // =============================================================================
       
   380 // =============== Functions from base  class ==================================
       
   381 // =============================================================================
       
   382 
       
   383 // -----------------------------------------------------------------------------
       
   384 // CPEngStorageManagerFactory::StorageManagerL()
       
   385 // -----------------------------------------------------------------------------
       
   386 //
       
   387 CPEngStorageManager* CPEngStorageManagerFactory::StorageManagerL(
       
   388     const CPEngSessionSlotId& aSessionSlot )
       
   389     {
       
   390     // get watcher first, handle of the watcher is increased by one there
       
   391     CPEngStorageManagerWatcher*  watcher =
       
   392         StorageManagerWatcherL( aSessionSlot );
       
   393     CleanupClosePushL( *watcher );
       
   394     // now create Storage Manager
       
   395     CPEngStorageManager* newStoreManager =
       
   396         CPEngStorageManager::NewL( *watcher,
       
   397                                    iStoreManagerClient );
       
   398 
       
   399     // handle count was increased in the CPEngStorageManager::NewL
       
   400     CleanupStack::PopAndDestroy( );  //
       
   401     return newStoreManager;
       
   402     }
       
   403 
       
   404 
       
   405 // -----------------------------------------------------------------------------
       
   406 // CPEngStorageManagerFactory::StorageManagerWatcherL()
       
   407 // -----------------------------------------------------------------------------
       
   408 //
       
   409 CPEngStorageManagerWatcher* CPEngStorageManagerFactory::
       
   410 StorageManagerWatcherL(
       
   411     const CPEngSessionSlotId& aSessionSlot )
       
   412     {
       
   413     TInt count ( iStorageWatchers.Count() );
       
   414     for ( TInt x( 0 ) ; x < count ; x++ )
       
   415         {
       
   416         if ( KErrNone ==
       
   417              iStorageWatchers[ x ]->SessionSlotId().Match(
       
   418                  aSessionSlot ) )
       
   419             {
       
   420             iStorageWatchers[ x ]->Open();
       
   421             return iStorageWatchers[ x ];
       
   422             }
       
   423         }
       
   424     // watcher does not exist yet, create it
       
   425     CPEngStorageManagerWatcher* newWatcher =
       
   426         CPEngStorageManagerWatcher::NewLC( aSessionSlot,
       
   427                                            iStoreManagerClient,
       
   428                                            *this );
       
   429     User::LeaveIfError( iStorageWatchers.Append( newWatcher ) );
       
   430     CleanupStack::Pop(); // newWatcher
       
   431     return newWatcher;
       
   432     }
       
   433 
       
   434 
       
   435 // -----------------------------------------------------------------------------
       
   436 // CPEngStorageManagerFactory::CreateSessionFolderL()
       
   437 // -----------------------------------------------------------------------------
       
   438 //
       
   439 void CPEngStorageManagerFactory::CreateSessionFolderL(
       
   440     const CPEngSessionSlotId& aSessionSlot,
       
   441     const TDesC& aApplicationId )
       
   442     {
       
   443     HBufC8* sessionName = aSessionSlot.PackLC();
       
   444     User::LeaveIfError( iStoreManagerClient.CreateSessionFolder(
       
   445                             *sessionName,
       
   446                             aApplicationId ) );
       
   447     CleanupStack::PopAndDestroy(); // sessionName
       
   448     }
       
   449 
       
   450 
       
   451 // -----------------------------------------------------------------------------
       
   452 // CPEngStorageManagerFactory::RemoveSessionFolderL()
       
   453 // -----------------------------------------------------------------------------
       
   454 //
       
   455 void CPEngStorageManagerFactory::RemoveSessionFolderL(
       
   456     const CPEngSessionSlotId& aSessionSlot,
       
   457     const TDesC& aApplicationId )
       
   458     {
       
   459     HBufC8* sessionName = aSessionSlot.PackLC();
       
   460     User::LeaveIfError( iStoreManagerClient.RemoveSessionFolder(
       
   461                             *sessionName,
       
   462                             aApplicationId ) );
       
   463     CleanupStack::PopAndDestroy(); // sessionName
       
   464     }
       
   465 
       
   466 
       
   467 // -----------------------------------------------------------------------------
       
   468 // CPEngStorageManagerFactory::SessionSlotStateL()
       
   469 // -----------------------------------------------------------------------------
       
   470 //
       
   471 void CPEngStorageManagerFactory::SessionSlotStateL(
       
   472     const CPEngSessionSlotId& aSessionSlot,
       
   473     CPEngSessionSlotState& aSessionSlotState )
       
   474     {
       
   475     CPEngSessionSlotId* id = aSessionSlot.CloneLC();
       
   476     aSessionSlotState.SetSessionSlotId( *id, ETrue );
       
   477     CleanupStack::Pop(); // id
       
   478 
       
   479     HBufC8* ssId = aSessionSlotState.SessionSlotId().PackLC();
       
   480     HBufC8* sessionStateBuf = NULL;
       
   481 
       
   482 
       
   483     User::LeaveIfError( iStoreManagerClient.SessionSlotState(
       
   484                             *ssId,
       
   485                             sessionStateBuf,
       
   486                             KSessionStateSize ) );
       
   487 
       
   488     CleanupStack::PushL( sessionStateBuf );
       
   489     aSessionSlotState.UnpackDataL( *sessionStateBuf, EPureState );
       
   490     CleanupStack::PopAndDestroy( 2 ); // sessionState, ssId
       
   491     }
       
   492 
       
   493 
       
   494 
       
   495 // -----------------------------------------------------------------------------
       
   496 // CPEngStorageManagerFactory::AllSessionSlotsStatesL()
       
   497 // -----------------------------------------------------------------------------
       
   498 //
       
   499 void CPEngStorageManagerFactory::AllSessionSlotsStatesL(
       
   500     RObjectArray<CPEngSessionSlotState>& aSessionSlots )
       
   501     {
       
   502     // clean passed array
       
   503     aSessionSlots.ResetAndDestroy();
       
   504     // try the size of the GLobal even, times session
       
   505     HBufC8* allSessionsBuff = NULL;
       
   506     // if there is error, des buffer will be cleaned
       
   507     User::LeaveIfError( iStoreManagerClient.AllSessionSlotsStates(
       
   508                             allSessionsBuff,
       
   509                             iAllStatesBuffSize * KBufferMultiplier ) );
       
   510 
       
   511     iAllStatesBuffSize = allSessionsBuff->Length();
       
   512     CleanupStack::PushL( allSessionsBuff );
       
   513     // unpack the buffer into the Session states
       
   514     RDesReadStream drs( allSessionsBuff->Des() );
       
   515     CleanupClosePushL( drs );
       
   516     // get count of the sessions
       
   517     TInt32 count ( drs.ReadInt32L() );
       
   518     for ( TInt x( 0 ) ; x < count ; x++ )
       
   519         {
       
   520         CPEngSessionSlotState* newState = CPEngSessionSlotState::NewLC();
       
   521         newState->InternalizeL( drs, EWholeState );
       
   522         aSessionSlots.AppendL( newState );
       
   523         CleanupStack::Pop( ); // newState
       
   524         }
       
   525     CleanupStack::PopAndDestroy( 2 ); // drs, allSessionsBuff
       
   526     }
       
   527 
       
   528 
       
   529 // -----------------------------------------------------------------------------
       
   530 // CPEngStorageManagerFactory::RegisterGlobalEventListenerL()
       
   531 // -----------------------------------------------------------------------------
       
   532 //
       
   533 void CPEngStorageManagerFactory::RegisterGlobalEventObserverL(
       
   534     MPEngGlobalEventObserver& aGlobalObserver )
       
   535     {
       
   536     // is it first observer, do we need to start observing
       
   537     if ( iObservers.Count() == 0 )
       
   538         {
       
   539         StartGlobalEventListenerL();
       
   540         }
       
   541     iObservers.InsertInAddressOrderL( &aGlobalObserver );
       
   542     Open();
       
   543     }
       
   544 
       
   545 
       
   546 // -----------------------------------------------------------------------------
       
   547 // CPEngStorageManagerFactory::UnregisterGlobalEventListener()
       
   548 // -----------------------------------------------------------------------------
       
   549 //
       
   550 void CPEngStorageManagerFactory::UnregisterGlobalObserver(
       
   551     MPEngGlobalEventObserver& aGlobalObserver )
       
   552     {
       
   553     TInt err ( iObservers.FindInAddressOrder( &aGlobalObserver ) );
       
   554     if ( err != KErrNotFound )
       
   555         {
       
   556         iObservers.Remove( err );
       
   557         if ( iObservers.Count() == 0 )
       
   558             {
       
   559             Cancel();
       
   560             }
       
   561         Close();
       
   562         }
       
   563     }
       
   564 
       
   565 
       
   566 // =============================================================================
       
   567 // =============== New Private Functions from main  class ======================
       
   568 // =============================================================================
       
   569 
       
   570 // -----------------------------------------------------------------------------
       
   571 // CPEngStorageManagerFactory::UnregisterGlobalEventListener()
       
   572 // Start global event listener
       
   573 // (other items were commented in a header).
       
   574 // -----------------------------------------------------------------------------
       
   575 //
       
   576 void CPEngStorageManagerFactory::StartGlobalEventListenerL()
       
   577     {
       
   578     if ( IsActive() )
       
   579         {
       
   580         User::Leave( KErrInUse );
       
   581         }
       
   582 
       
   583     if ( !iScoutCreated )
       
   584         {
       
   585         delete iGlobalEventBuff;
       
   586         iGlobalEventBuff = NULL;
       
   587         iGlobalEventBuff = HBufC8::NewL( KGlobalEventSize );
       
   588         iGlobalEventDes.Set( iGlobalEventBuff->Des() );
       
   589 
       
   590         TInt err ( iStoreManagerClient.ListenGlobalEvents() );
       
   591         if ( err < KErrNone )
       
   592             {
       
   593             User::Leave( err );
       
   594             }
       
   595         iScoutCreated = ETrue;
       
   596         }
       
   597     iStoreManagerClient.ReloadGlobalEventListener( iGlobalEventDes,
       
   598                                                    iStatus );
       
   599     SetActive();
       
   600     }
       
   601 
       
   602 //  End of File