|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: this class handles the operation for performing contact list base synhronization |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPENGCNTLSTBASESYNCOP_H |
|
19 #define CPENGCNTLSTBASESYNCOP_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32Base.h> |
|
23 #include <badesca.h> |
|
24 #include "CPEngAsyncOperation.h" |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MPEngContactListTransactionObserver2; |
|
29 class MPEngAdvTransactionStatus2; |
|
30 class CPEngContactListTransaction2; |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 |
|
38 /** |
|
39 * Operation handler for performing contact list |
|
40 * base synhronization. |
|
41 * |
|
42 * @lib |
|
43 * @since 3.0 |
|
44 */ |
|
45 NONSHARABLE_CLASS( CPEngCntLstBaseSyncOp ) : public CPEngAsyncOperation |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CPEngCntLstBaseSyncOp* NewL( TInt aPriority, |
|
53 CPEngContactListTransaction2& aInterface, |
|
54 CPEngNWSessionSlotStorageProxy& aUsedSlot, |
|
55 MPEngContactListTransactionObserver2& aObserver, |
|
56 RPEngManagerClient& aServer, |
|
57 TBool aNeedToUnsubscribe ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CPEngCntLstBaseSyncOp(); |
|
63 |
|
64 private: |
|
65 |
|
66 /** |
|
67 * C++ default constructor. |
|
68 */ |
|
69 CPEngCntLstBaseSyncOp( TInt aPriority, |
|
70 CPEngContactListTransaction2& aInterface, |
|
71 MPEngContactListTransactionObserver2& aObserver, |
|
72 RPEngManagerClient& aServer, |
|
73 TBool aNeedToUnsubscribe ); |
|
74 |
|
75 /** |
|
76 * Symbian OS constructor. |
|
77 */ |
|
78 void ConstructL( CPEngNWSessionSlotStorageProxy& aUsedSlot ); |
|
79 |
|
80 |
|
81 public: //New services |
|
82 |
|
83 |
|
84 /** |
|
85 * |
|
86 * |
|
87 * |
|
88 * |
|
89 * @since 3.0 |
|
90 */ |
|
91 void BaseSync(); |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 private: //Template method from base |
|
97 |
|
98 /** |
|
99 * Notifies from operation complete. |
|
100 */ |
|
101 void DoHandleOpSuccessL( MPEngAdvTransactionStatus2& aStatus, |
|
102 TInt aTransactionOperation ); |
|
103 |
|
104 void DoHandleOpFailure( MPEngAdvTransactionStatus2& aStatus, |
|
105 TInt aTransactionOperation ); |
|
106 |
|
107 TPEngAsyncOpResult DoNotifyObserver( MPEngAdvTransactionStatus2& aStatus, |
|
108 TInt aTransactionOperation ); |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 private: |
|
114 |
|
115 //REF: The implemented interface |
|
116 CPEngContactListTransaction2& iInterface; |
|
117 |
|
118 //REF: The observer |
|
119 MPEngContactListTransactionObserver2& iObserver; |
|
120 |
|
121 // Does lists need to be subscribed during sync |
|
122 TBool iUnsubscribe; |
|
123 |
|
124 }; |
|
125 |
|
126 #endif //CPENGCNTLSTBASESYNCOP_H |
|
127 |
|
128 |
|
129 |