2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Interface class declaration for Phonebook contact database observers.
20 #ifndef __MPbkContactDbObserver_H__
21 #define __MPbkContactDbObserver_H__
24 #include <cntdef.h> // cntdbobs.h requires TContactItemId from this header
25 #include <cntdbobs.h> // MContactDbObserver
27 // FORWARD DECLARATIONS
28 class CPbkContactEngine;
33 * Interface class for Phonebook contact database observers.
35 * @see MContactDbObserver
36 * @see CPbkContactChangeNotifier
38 class MPbkContactDbObserver : public MContactDbObserver
40 protected: // Derived class interface
42 * Called by CPbkContactEngine when it receives a database
43 * change event. From MContactDbObserver.
44 * @param aEvent The database event.
46 virtual void HandleDatabaseEventL(TContactDbObserverEvent aEvent) = 0;
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.
57 * @param aEvent The database event
59 virtual void DatabaseEventHandledL(TContactDbObserverEvent /*aEvent*/)
61 // Empty default implementation
65 * Protected destructor.
66 * Observers are not destroyed via this interface.
68 virtual ~MPbkContactDbObserver() { }
70 private: // friend declarations
71 /// CPbkContactEngine calls protected functions of this class.
72 friend class CPbkContactEngine;
76 #endif // __MPbkContactDbObserver_H__