epoc32/include/app/cpbkcontactchangenotifier.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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: 
    15 *       Class for registering CPbkContactEngine observers.
    16 *
    17 */
    18 
    19 
    20 #ifndef __CPbkContactChangeNotifier_H__
    21 #define __CPbkContactChangeNotifier_H__
    22 
    23 //  INCLUDES
    24 #include <e32base.h>  // CBase
    25 
    26 // FORWARD DECLARATIONS
    27 class CPbkContactEngine;
    28 class MPbkContactDbObserver;
    29 
    30 
    31 // CLASS DECLARATION
    32 
    33 /**
    34  * A class used for registering as an observer for contact database
    35  * change events. 
    36  */
    37 class CPbkContactChangeNotifier : public CBase
    38     {
    39     public:  // Constructors and destructor
    40         /**
    41          * Creates a new instance of this class and registers aObserver as an
    42          * observer of aEngine.
    43          *
    44          * @param aEngine   The observed object.
    45          * @param aObserver The observer to call when database changes occur.
    46          * @return  A contact change notifier instance.
    47          */
    48         IMPORT_C static CPbkContactChangeNotifier* NewL
    49             (CPbkContactEngine& aEngine, MPbkContactDbObserver* aObserver);
    50 
    51         /**
    52          * Removes the aObserver from aEngine given as paramters to NewL and
    53          * destructs this object.
    54          */
    55         ~CPbkContactChangeNotifier();
    56 
    57     private:  // Implementation
    58         CPbkContactChangeNotifier
    59             (MPbkContactDbObserver* aObserver);
    60         void ConstructL(CPbkContactEngine& aEngine);
    61 
    62     private:  // data
    63         /// Ref: Phonebook engine
    64         CPbkContactEngine* iEngine;
    65         /// Ref: the observer
    66         MPbkContactDbObserver* iObserver;
    67     };
    68 
    69 
    70 #endif // __CPbkContactChangeNotifier_H__
    71 
    72 // End of File