epoc32/include/app/mpbkcontactdbobserver.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 *       Interface class declaration for Phonebook contact database observers.
    16 *
    17 */
    18 
    19 
    20 #ifndef __MPbkContactDbObserver_H__
    21 #define __MPbkContactDbObserver_H__
    22 
    23 //  INCLUDES
    24 #include <cntdef.h>     // cntdbobs.h requires TContactItemId from this header
    25 #include <cntdbobs.h>   // MContactDbObserver
    26 
    27 // FORWARD DECLARATIONS
    28 class CPbkContactEngine;
    29 
    30 // CLASS DECLARATION
    31 
    32 /**
    33  * Interface class for Phonebook contact database observers.
    34  *
    35  * @see MContactDbObserver
    36  * @see CPbkContactChangeNotifier
    37  */
    38 class MPbkContactDbObserver : public MContactDbObserver
    39     {
    40     protected:  // Derived class interface
    41         /**
    42          * Called by CPbkContactEngine when it receives a database 
    43          * change event. From MContactDbObserver.
    44 		 * @param aEvent The database event.
    45          */
    46         virtual void HandleDatabaseEventL(TContactDbObserverEvent aEvent) = 0;
    47 
    48         /**
    49          * Called by CPbkContactEngine after HandleDatabaseEventL has been 
    50          * called for all observers.
    51          * In other words: CPbkContactEngine calls first HandleDatabaseEventL
    52          * for all its observers and then this function again for all 
    53          * observers. You can think of it as an "all observers have seen 
    54          * aEvent" -notification. This used in Phonebook view activation for 
    55          * now. Default implementation does nothing.
    56          *
    57          * @param aEvent The database event
    58          */
    59         virtual void DatabaseEventHandledL(TContactDbObserverEvent /*aEvent*/)
    60             {
    61             // Empty default implementation
    62             }
    63 
    64         /**
    65          * Protected destructor. 
    66          * Observers are not destroyed via this interface.
    67          */
    68         virtual ~MPbkContactDbObserver() { }
    69 
    70     private:  // friend declarations
    71         /// CPbkContactEngine calls protected functions of this class.
    72         friend class CPbkContactEngine;
    73     };
    74 
    75 
    76 #endif // __MPbkContactDbObserver_H__
    77 
    78 // End of File