cmmanager/cmmgr/cmmserver/inc/cmmlistenermanager.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
child 62 bb1f80fb7db2
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
     1 /*
       
     2 * Copyright (c) 2009-2010 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:
       
    15 * Manages all CommsDat table specific CenRep listeners.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CMMLISTENERMANAGER_H_
       
    21 #define CMMLISTENERMANAGER_H_
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "cmmdbchangelistener.h"
       
    26 
       
    27 class CCmmCache;
       
    28 
       
    29 // Repository for CommsDat
       
    30 const TUid KCDCommsRepositoryId = { 0xCCCCCC00 };
       
    31 
       
    32 
       
    33 NONSHARABLE_CLASS( CCmmListenerManager ) : public CBase
       
    34     {
       
    35 public:
       
    36     /**
       
    37      * NewL.
       
    38      */
       
    39     static CCmmListenerManager* NewL( CCmmCache* aCache );
       
    40 
       
    41     /**
       
    42      * NewLC.
       
    43      */
       
    44     static CCmmListenerManager* NewLC( CCmmCache* aCache );
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     ~CCmmListenerManager();
       
    50 
       
    51 private:
       
    52     /**
       
    53      * Constructor.
       
    54      */
       
    55     CCmmListenerManager( CCmmCache* aCache );
       
    56 
       
    57     /**
       
    58      * Second phase constructor.
       
    59      */
       
    60     void ConstructL();
       
    61 
       
    62 public:
       
    63     void AddListenerL( TUint32 aIdentifier );
       
    64     TInt RemoveListener( TUint32 aIdentifier );
       
    65     void DbChangeDetectedL( TUint32 aIdentifier );
       
    66     void DbChangeError( TUint32 aIdentifier );
       
    67 
       
    68 private:
       
    69     // The database cache.
       
    70     CCmmCache* iCache; // Not owned
       
    71 
       
    72     // Array for listener active objects.
       
    73     RPointerArray<CCmmDbChangeListener> iListeners;
       
    74     };
       
    75 
       
    76 #endif // CMMLISTENERMANAGER_H_
       
    77 
       
    78 // End of file