|
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 CNTSYNCDATA_H |
|
18 #define CNTSYNCDATA_H |
|
19 |
|
20 #include "cntsyncchecker.h" |
|
21 #include <cntdef.h> |
|
22 #include <cntdb.h> |
|
23 #include "cntsyncphonedata.h" |
|
24 |
|
25 #include <centralrepository.h> // CRepository. |
|
26 #include <e32property.h> |
|
27 #include <phbksync.h> |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 class CContactSyncData : public CBase |
|
33 { |
|
34 |
|
35 public: |
|
36 static CContactSyncData* NewL(); |
|
37 ~CContactSyncData(); |
|
38 |
|
39 CContactSyncData& DataL(); |
|
40 void ReadConfigurationDataL(); |
|
41 void WriteConfigurationDataL(); |
|
42 void ConstructL(); |
|
43 RPointerArray<CContactSyncPhonebookData>& PerPhonebookData(); |
|
44 CContactSyncPhonebookData* PhonebookData(TUid aPhonebookUid); |
|
45 CContactSyncPhonebookData* PhonebookDataFromTemplateId(TContactItemId aTemplateId); |
|
46 |
|
47 void AllocPhonebookDataL(TUid aPhonebookUid); |
|
48 |
|
49 void ResetCallCountAndValidateResponsesL(); |
|
50 void DeleteAllPhonebooks(); |
|
51 |
|
52 public: |
|
53 TUid iLastCommitedPhonebookUid; |
|
54 enum TRepositoryKeys |
|
55 { |
|
56 ERefCount = 0x00000001, |
|
57 EValidateCallCount, |
|
58 EValidateSyncCallCount, |
|
59 EValidateWriteResponse, |
|
60 EValidateDeleteResponse, |
|
61 EValidateReadResponse, |
|
62 EValidateEditResponse, |
|
63 EValidateSearchResponse, |
|
64 EVerboseLoggingEnabled |
|
65 }; |
|
66 |
|
67 public: |
|
68 // reference count - number of open connections |
|
69 TInt iRefCount; |
|
70 // general data |
|
71 TInt iValidateCallCount; |
|
72 TInt iSyncCallCount; |
|
73 TInt iPluginCallCount; |
|
74 TInt iValidateWriteResponse; |
|
75 TInt iDeleteContactResponse; |
|
76 TInt iReadValidateResponse; |
|
77 TInt iEditValidateResponse; |
|
78 TInt iSearchValidateResponse; |
|
79 TBool iVerboseLoggingEnabled; |
|
80 private: |
|
81 RPointerArray<CContactSyncPhonebookData> iPerPhonebookData; |
|
82 CRepository* iRepository; |
|
83 }; |
|
84 #endif |
|
85 |