diff -r 000000000000 -r e686773b3f54 phonebookengines/contactsmodel/tsrc/TestSyncPlugIn/cntphonecontact.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonebookengines/contactsmodel/tsrc/TestSyncPlugIn/cntphonecontact.h Tue Feb 02 10:12:17 2010 +0200 @@ -0,0 +1,56 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#ifndef CNTPHONECONTACT_H +#define CNTPHONECONTACT_H + + +#include // CRepository. +#include +#include + +class CContactSyncStaticRepository + { +public: + static void WriteIntToCentralRepositoryL(TUint32& aKey, const TInt aValue, CRepository& iRepository); + static void ReadIntFromCentralRepositoryL(TUint32& aKey, TInt& aValue, CRepository& iRepository); + static void WriteStringToCentralRepositoryL(TUint32& aKey, TPtr aString, CRepository& iRepository); + static void ReadStringFromCentralRepositoryL(TUint32& aKey, TPtr& aString, CRepository& iRepository); + }; + +class CPhonebookContact : public CBase + { + +public: + static CPhonebookContact* NewLC(const TDesC& aName, const TDesC& aNumber, CRepository* aRepository); + static CPhonebookContact* NewL(TUint32& aCRKey, CRepository* aRepository); + ~CPhonebookContact(); + const HBufC* Name(); + const HBufC* Number(); + void WriteToCRL(TUint32& aCRKey) const; + CPhonebookContact(CRepository* aRepository); +private: + void ConstructL(const TDesC& aName, const TDesC& aNumber); + void ConstructL(TUint32& aCRKey); + +private: + HBufC* iName; + HBufC* iNumber; + CRepository* iRepository; + }; + +#endif +