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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
23 class CContactICCEntry;
24 class MContactSynchroniser
26 Abstract interface for a contacts phonebook synchroniser.
28 It should be inherited by classes which implement the phonebook
29 synchroniser API. The plug-in should have a second UID of
30 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();
101 /** The UID for the default phone book synchroniser ECom plugin interface
103 const TUid KUidEcomCntPhBkSyncInterface = {0x102035FD};
105 class CContactSynchroniser : public CBase, public MContactSynchroniser
107 Abstract interface for a ECom contacts phonebook synchroniser plugin
109 It should be inherited by classes which implement the phonebook
110 synchroniser API in a platform secured environment. The ECom plug-in interface uid is
111 KUidEcomCntPhBkSyncInterface
116 // From MContactSynchroniser
117 virtual TInt ValidateContact(TValidateOperation aOp, TContactItemId aId) = 0;
118 virtual TInt ValidateWriteContact(CContactICCEntry& aContactItem) = 0;
119 virtual TInt DeleteContact(TContactItemId aId) = 0;
120 virtual void Release() = 0;
121 virtual void UpdatePostWriteL(const CContactICCEntry& aContactItem) = 0;
122 virtual TContactItemId ICCTemplateIdL(TUid aPhonebookUid) = 0;
123 virtual TContactItemId GroupIdL(TUid aPhonebookUid) = 0;
124 virtual void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid) = 0;
125 virtual void CancelNotifyRequest(TUid aPhonebookUid) = 0;
126 virtual TBool IsSynchronisedL(TUid aPhonebookUid) = 0;
127 virtual TInt PhonebookList(RArray<TUid>& aPhonebookList) = 0;
129 static CContactSynchroniser* NewL();
130 IMPORT_C virtual ~CContactSynchroniser();