epoc32/include/app/mpbkcontactdbobserver.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 mpbkcontactdbobserver.h
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.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