|
1 // Copyright (c) 2002-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 // Header file for the Phonebook Synchroniser Plug-in. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef __PHBKSYNCPLUGIN_H__ |
|
24 #define __PHBKSYNCPLUGIN_H__ |
|
25 |
|
26 #include <e32std.h> |
|
27 #include <cntsync.h> |
|
28 #include <cntitem.h> |
|
29 |
|
30 #include "phbksync.h" |
|
31 |
|
32 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
33 #include <cntsyncecom.h> |
|
34 #endif |
|
35 /** |
|
36 * Concrete implementation of Contacts Phonebook Synchroniser. |
|
37 * |
|
38 * @internalComponent |
|
39 */ |
|
40 class CPhoneBookSyncPlugin : public CContactSynchroniser |
|
41 { |
|
42 public: //From CContactSynchroniser |
|
43 TInt ValidateContact(TValidateOperation aOp, TContactItemId aId); |
|
44 TInt ValidateWriteContact(CContactICCEntry& aContactItem); |
|
45 TInt DeleteContact(TContactItemId aId); |
|
46 void Release(); |
|
47 void UpdatePostWriteL(const CContactICCEntry& aContactItem); |
|
48 TContactItemId ICCTemplateIdL(TUid aPhonebookUid); |
|
49 TContactItemId GroupIdL(TUid aPhonebookUid); |
|
50 void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid); |
|
51 void CancelNotifyRequest(TUid aPhonebookUid); |
|
52 TBool IsSynchronisedL(TUid aPhonebookUid); |
|
53 TInt PhonebookList(RArray<TUid>& aPhonebookList); |
|
54 |
|
55 static CPhoneBookSyncPlugin* New(); |
|
56 static CPhoneBookSyncPlugin* NewL(); |
|
57 private: |
|
58 void ConstructL(); |
|
59 TInt ICCSlotNumber(const CContactICCEntry& aContactItem) const; |
|
60 TUid ICCPhonebookL(CContactICCEntry& aContactItem) const; |
|
61 void AddFieldValueL(CContactICCEntry& aContactItem, TFieldType aFieldType, TDesC& aField); |
|
62 |
|
63 RPhoneBookSession iSession; |
|
64 |
|
65 #ifndef SYMBIAN_CNTMODEL_V2 |
|
66 TBool iInServerThread; |
|
67 #endif // SYMBIAN_CNTMODEL_V2 |
|
68 }; |
|
69 |
|
70 #endif // __PHBKSYNCPLUGIN_H__ |