|
1 // Copyright (c) 2003-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 #include "cntsyncchecker.h" |
|
17 #include <cntsync.h> |
|
18 |
|
19 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
20 #include "cntsyncecom.h" |
|
21 #endif |
|
22 |
|
23 class CContactActiveTestSync : public CActive |
|
24 { |
|
25 public: |
|
26 CContactActiveTestSync(CContactSyncChecker& aSyncChecker, TUid aPhoneBookUid); |
|
27 //static CContactActiveTestSync* NewL(TRequestStatus& aStatus); |
|
28 ~CContactActiveTestSync(); |
|
29 void StartL(TRequestStatus& aStatus); |
|
30 TUid PhoneBookUid(); |
|
31 |
|
32 private: |
|
33 //CContactActiveTestSync(TRequestStatus& aStatus); |
|
34 void RunL(); |
|
35 TInt RunError(TInt aError); |
|
36 void DoCancel(); |
|
37 private: |
|
38 //TRequestStatus* iTheStatus; |
|
39 CArrayPtrFlat<TRequestStatus> iStatusArray; |
|
40 CContactSyncChecker& iSyncChecker; |
|
41 TUid iPhoneBookUid; |
|
42 }; |
|
43 |
|
44 |
|
45 class CContactTestSynchroniser : public CContactSynchroniser |
|
46 { |
|
47 public: |
|
48 static CContactTestSynchroniser* NewL(); |
|
49 void ConstructL(); |
|
50 //from MContactSynchroniser |
|
51 virtual ~CContactTestSynchroniser(); |
|
52 TInt ValidateContact(MContactSynchroniser::TValidateOperation aOp, TContactItemId aId); |
|
53 TInt ValidateWriteContact(CContactICCEntry& aContactItem); |
|
54 TInt DeleteContact(TContactItemId aId); |
|
55 void Release(); |
|
56 void UpdatePostWriteL(const CContactICCEntry& aContactItem); |
|
57 TContactItemId ICCTemplateIdL(TUid aPhonebookUid); |
|
58 TContactItemId GroupIdL(TUid aPhonebookUid); |
|
59 void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid); |
|
60 void CancelNotifyRequest(TUid aPhonebookUid); |
|
61 TBool IsSynchronisedL(TUid aPhonebookUid); |
|
62 TInt PhonebookList(RArray<TUid>& aPhonebookList); |
|
63 |
|
64 CContactSyncChecker* iContactSyncChecker; |
|
65 |
|
66 RPointerArray<CContactActiveTestSync> iActiveTestSync; |
|
67 }; |
|
68 |
|
69 |
|
70 |