1 // Copyright (c) 2001-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 class CContactICCEntry;
23 class MContactSynchroniser
25 Abstract interface for a contacts phonebook synchroniser.
27 It should be inherited by classes which implement the phonebook
28 synchroniser API. The plug-in should have a second UID of
29 0x101F4A6E (KUidContactSynchroniserDll).
39 enum TValidateOperation
41 ERead, /** Check a cached ICC contact can be read */
42 ESearch, /** Check a cached ICC contact can be searched */
43 EEdit /** Check a cached ICC contact can be edited */
47 A CContactICCEntry is wanted for read/search or edit.
49 virtual TInt ValidateContact(TValidateOperation aOp, TContactItemId aId) = 0;
51 A CContactICCEntry has being added/edited.
53 virtual TInt ValidateWriteContact(CContactICCEntry& aContactItem) = 0;
55 A CContactICCEntry is being deleted from the database.
57 virtual TInt DeleteContact(TContactItemId aId) = 0;
59 Release resources used by Phonebook Synchroniser. Called prior to unloading plug-in.
61 virtual void Release() = 0;
63 A new CContactICCEntry has been added to the database.
64 (Called after ValidateWriteContact() and database write has completed.)
66 virtual void UpdatePostWriteL(const CContactICCEntry& aContactItem) = 0;
69 Id of template contact for specified phonebook
71 virtual TContactItemId ICCTemplateIdL(TUid aPhonebookUid) = 0;
74 Id of contact group for specified phonebook
76 virtual TContactItemId GroupIdL(TUid aPhonebookUid) = 0;
79 Request notifiction of Synchronisation state changes for specified phonebook
81 virtual void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid) = 0;
83 Cancel notification of Synchronisation state changes for specified phonebook
85 virtual void CancelNotifyRequest(TUid aPhonebookUid) = 0;
87 Test Synchronisation state changes for specified phonebook
89 virtual TBool IsSynchronisedL(TUid aPhonebookUid) = 0;
92 List of Phonebooks supported by Phonebook Synchroniser that may be present on the ICC.
94 virtual TInt PhonebookList(RArray<TUid>& aPhonebookList) = 0;
97 IMPORT_C virtual void MContactSynchroniser_Reserved_1();
100 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
102 /** The UID for the default phone book synchroniser ECom plugin interface.
105 const TUid KUidEcomCntPhBkSyncInterface = {0x102035FD};
107 class CContactSynchroniser : public CBase, public MContactSynchroniser
109 Abstract interface for a ECom contacts phonebook synchroniser plugin
111 It should be inherited by classes which implement the phonebook
112 synchroniser API in a platform secured environment. The ECom plug-in interface uid is
113 KUidEcomCntPhBkSyncInterface
118 // From MContactSynchroniser
119 virtual TInt ValidateContact(TValidateOperation aOp, TContactItemId aId) = 0;
120 virtual TInt ValidateWriteContact(CContactICCEntry& aContactItem) = 0;
121 virtual TInt DeleteContact(TContactItemId aId) = 0;
122 virtual void Release() = 0;
123 virtual void UpdatePostWriteL(const CContactICCEntry& aContactItem) = 0;
124 virtual TContactItemId ICCTemplateIdL(TUid aPhonebookUid) = 0;
125 virtual TContactItemId GroupIdL(TUid aPhonebookUid) = 0;
126 virtual void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid) = 0;
127 virtual void CancelNotifyRequest(TUid aPhonebookUid) = 0;
128 virtual TBool IsSynchronisedL(TUid aPhonebookUid) = 0;
129 virtual TInt PhonebookList(RArray<TUid>& aPhonebookList) = 0;
131 static CContactSynchroniser* NewL();
132 IMPORT_C virtual ~CContactSynchroniser();