epoc32/include/app/mpbkcontactdbobserver.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/app/mpbkcontactdbobserver.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/app/mpbkcontactdbobserver.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,78 @@
     1.4 -mpbkcontactdbobserver.h
     1.5 +/*
     1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: 
    1.19 +*       Interface class declaration for Phonebook contact database observers.
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#ifndef __MPbkContactDbObserver_H__
    1.25 +#define __MPbkContactDbObserver_H__
    1.26 +
    1.27 +//  INCLUDES
    1.28 +#include <cntdef.h>     // cntdbobs.h requires TContactItemId from this header
    1.29 +#include <cntdbobs.h>   // MContactDbObserver
    1.30 +
    1.31 +// FORWARD DECLARATIONS
    1.32 +class CPbkContactEngine;
    1.33 +
    1.34 +// CLASS DECLARATION
    1.35 +
    1.36 +/**
    1.37 + * Interface class for Phonebook contact database observers.
    1.38 + *
    1.39 + * @see MContactDbObserver
    1.40 + * @see CPbkContactChangeNotifier
    1.41 + */
    1.42 +class MPbkContactDbObserver : public MContactDbObserver
    1.43 +    {
    1.44 +    protected:  // Derived class interface
    1.45 +        /**
    1.46 +         * Called by CPbkContactEngine when it receives a database 
    1.47 +         * change event. From MContactDbObserver.
    1.48 +		 * @param aEvent The database event.
    1.49 +         */
    1.50 +        virtual void HandleDatabaseEventL(TContactDbObserverEvent aEvent) = 0;
    1.51 +
    1.52 +        /**
    1.53 +         * Called by CPbkContactEngine after HandleDatabaseEventL has been 
    1.54 +         * called for all observers.
    1.55 +         * In other words: CPbkContactEngine calls first HandleDatabaseEventL
    1.56 +         * for all its observers and then this function again for all 
    1.57 +         * observers. You can think of it as an "all observers have seen 
    1.58 +         * aEvent" -notification. This used in Phonebook view activation for 
    1.59 +         * now. Default implementation does nothing.
    1.60 +         *
    1.61 +         * @param aEvent The database event
    1.62 +         */
    1.63 +        virtual void DatabaseEventHandledL(TContactDbObserverEvent /*aEvent*/)
    1.64 +            {
    1.65 +            // Empty default implementation
    1.66 +            }
    1.67 +
    1.68 +        /**
    1.69 +         * Protected destructor. 
    1.70 +         * Observers are not destroyed via this interface.
    1.71 +         */
    1.72 +        virtual ~MPbkContactDbObserver() { }
    1.73 +
    1.74 +    private:  // friend declarations
    1.75 +        /// CPbkContactEngine calls protected functions of this class.
    1.76 +        friend class CPbkContactEngine;
    1.77 +    };
    1.78 +
    1.79 +
    1.80 +#endif // __MPbkContactDbObserver_H__
    1.81 +
    1.82 +// End of File