phonebookengines_old/contactsmodel/tsrc/CntClient.h
changeset 40 b46a585f6909
equal deleted inserted replaced
37:fd64c38c277d 40:b46a585f6909
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <cntitem.h>
       
    17 
       
    18 class RTest;
       
    19 class CCntClient : public CBase , public MContactDbObserver
       
    20 	{
       
    21 public:
       
    22 	CCntClient(RTest &aTest, const TDesC &aDatabaseName);
       
    23 	CContactDatabase* CreateDatabaseL();
       
    24 	CContactDatabase* OpenDatabaseL();
       
    25 	void CloseDatabase();
       
    26 	
       
    27 	~CCntClient();
       
    28 	CContactDatabase* Db() {return(iDb);}
       
    29 	void HandleDatabaseEventL(TContactDbObserverEvent aEvent);
       
    30 
       
    31 private:
       
    32 	CContactDatabase* iDb;
       
    33 	TFileName iDatabaseName;
       
    34 	RTest* iTest;
       
    35 	CContactChangeNotifier* iNotifier;
       
    36 	static TInt iObservers; //this variable tells how many CCntClient objects have registered for a database event notification
       
    37 	};