diff -r 000000000000 -r e686773b3f54 pimprotocols/phonebooksync/plugin/phbksyncplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pimprotocols/phonebooksync/plugin/phbksyncplugin.h Tue Feb 02 10:12:17 2010 +0200 @@ -0,0 +1,70 @@ +// Copyright (c) 2002-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: +// Header file for the Phonebook Synchroniser Plug-in. +// +// + +/** + @file + @internalComponent +*/ + +#ifndef __PHBKSYNCPLUGIN_H__ +#define __PHBKSYNCPLUGIN_H__ + +#include +#include +#include + +#include "phbksync.h" + +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#endif +/** + * Concrete implementation of Contacts Phonebook Synchroniser. + * + * @internalComponent + */ +class CPhoneBookSyncPlugin : public CContactSynchroniser + { +public: //From CContactSynchroniser + TInt ValidateContact(TValidateOperation aOp, TContactItemId aId); + TInt ValidateWriteContact(CContactICCEntry& aContactItem); + TInt DeleteContact(TContactItemId aId); + void Release(); + void UpdatePostWriteL(const CContactICCEntry& aContactItem); + TContactItemId ICCTemplateIdL(TUid aPhonebookUid); + TContactItemId GroupIdL(TUid aPhonebookUid); + void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid); + void CancelNotifyRequest(TUid aPhonebookUid); + TBool IsSynchronisedL(TUid aPhonebookUid); + TInt PhonebookList(RArray& aPhonebookList); + + static CPhoneBookSyncPlugin* New(); + static CPhoneBookSyncPlugin* NewL(); +private: + void ConstructL(); + TInt ICCSlotNumber(const CContactICCEntry& aContactItem) const; + TUid ICCPhonebookL(CContactICCEntry& aContactItem) const; + void AddFieldValueL(CContactICCEntry& aContactItem, TFieldType aFieldType, TDesC& aField); + + RPhoneBookSession iSession; + +#ifndef SYMBIAN_CNTMODEL_V2 + TBool iInServerThread; +#endif // SYMBIAN_CNTMODEL_V2 + }; + +#endif // __PHBKSYNCPLUGIN_H__