phonebookengines/contactsmodel/tsrc/TestSyncPlugIn/cntphonecontact.h
changeset 0 e686773b3f54
child 24 0ba2181d7c28
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 // Copyright (c) 2005-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 
       
    17 #ifndef CNTPHONECONTACT_H
       
    18 #define CNTPHONECONTACT_H
       
    19 
       
    20 
       
    21 #include <centralrepository.h>  // CRepository.
       
    22 #include <e32property.h>
       
    23 #include <phbksync.h>
       
    24 
       
    25 class CContactSyncStaticRepository 
       
    26 	{
       
    27 public:
       
    28 	static void WriteIntToCentralRepositoryL(TUint32& aKey, const TInt aValue, CRepository& iRepository);
       
    29 	static void ReadIntFromCentralRepositoryL(TUint32& aKey, TInt& aValue, CRepository& iRepository);
       
    30 	static void WriteStringToCentralRepositoryL(TUint32& aKey, TPtr aString, CRepository& iRepository);
       
    31 	static void ReadStringFromCentralRepositoryL(TUint32& aKey, TPtr& aString, CRepository& iRepository);
       
    32 	};
       
    33 
       
    34 class CPhonebookContact : public CBase
       
    35 	{
       
    36 
       
    37 public:
       
    38 	static CPhonebookContact* NewLC(const TDesC& aName, const TDesC& aNumber, CRepository* aRepository);
       
    39 	static CPhonebookContact* NewL(TUint32& aCRKey, CRepository* aRepository);
       
    40 	~CPhonebookContact();
       
    41 	const HBufC* Name();
       
    42 	const HBufC* Number();
       
    43 	void WriteToCRL(TUint32& aCRKey) const;	
       
    44 	CPhonebookContact(CRepository* aRepository);
       
    45 private:
       
    46 	void ConstructL(const TDesC& aName, const TDesC& aNumber);
       
    47 	void ConstructL(TUint32& aCRKey);
       
    48 
       
    49 private:
       
    50 	HBufC*	iName;
       
    51 	HBufC*	iNumber;
       
    52 	CRepository* iRepository;
       
    53 	};
       
    54 
       
    55 #endif
       
    56