|
1 /* |
|
2 * Copyright (c) 2005 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: Handler to synchronize contact list |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CPENGCONTACTLISTTRANSSYNC_H__ |
|
19 #define __CPENGCONTACTLISTTRANSSYNC_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include "CPEngContactListTransBase.h" |
|
23 |
|
24 |
|
25 // CLASS DECLARATION |
|
26 class MPEngXMLSerializer; |
|
27 class CPEngContactListModItemContainer; |
|
28 |
|
29 |
|
30 /** |
|
31 * Handler to synchronize contact list |
|
32 * |
|
33 * @lib PEngListLib2 |
|
34 * @since 3.0 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CPEngContactListTransSync ): |
|
37 public CPEngContactListTransBase |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CPEngContactListTransSync* NewLC( |
|
45 CPEngContactListModBase& aContactList, |
|
46 CPEngSessionSlotId& aSessionSlotId, |
|
47 MPEngContactListTransactionManager& aManager, |
|
48 TPEngWVCspVersion& aCSPVersion, |
|
49 TInt aOperationId ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CPEngContactListTransSync(); |
|
55 |
|
56 |
|
57 public: // From MPEngOutgoingTransactionHandler |
|
58 |
|
59 /** |
|
60 * Support for simultaneous transaction handling |
|
61 * @see <MPEngOutgoingTransactionHandler.h> |
|
62 */ |
|
63 void NewTransactionHandlersL( |
|
64 RPointerArray<MPEngOutgoingTransactionHandler>& aTransactionsArray ); |
|
65 |
|
66 |
|
67 protected: // From CPEngContactListTransBase |
|
68 |
|
69 /** |
|
70 * Create XML message to create contact list |
|
71 * @see <CPEngContactListTransBase.h> |
|
72 */ |
|
73 void DoGetXMLCreateCntListL( MPEngXMLSerializer& aXmlSerializer ); |
|
74 |
|
75 |
|
76 /** |
|
77 * Parse contact list create XML response |
|
78 * @see <CPEngContactListTransBase.h> |
|
79 */ |
|
80 void DoParseCreateCntListResponseL( const TDesC8& aResponse, |
|
81 MPEngXMLParser& aXMLparser ); |
|
82 |
|
83 /** |
|
84 * Create XML message to fetch contact list |
|
85 * @see <CPEngContactListTransBase.h> |
|
86 */ |
|
87 void DoGetXMLFetchCntListL( MPEngXMLSerializer& aXmlSerializer ); |
|
88 |
|
89 |
|
90 /** |
|
91 * Parse contact list fetch XML response |
|
92 * @see <CPEngContactListTransBase.h> |
|
93 */ |
|
94 void DoParseFetchCntListResponseL( const TDesC8& aResponse, |
|
95 MPEngXMLParser& aXMLparser ); |
|
96 |
|
97 |
|
98 private: |
|
99 |
|
100 /** |
|
101 * Parses contact list properties |
|
102 * |
|
103 * @since 3.0 |
|
104 * @param aResponse buffer with request response |
|
105 * @param aXMLparser1 XML parser |
|
106 * @param aXMLparser1 XML parser |
|
107 */ |
|
108 void ParsePropertiesL( const TDesC8& aResponse, |
|
109 MPEngXMLParser& aXMLparser1, |
|
110 MPEngXMLParser& aXMLparser2 ); |
|
111 |
|
112 /** |
|
113 * Create Master contact list update handlers |
|
114 * |
|
115 * @since 3.0 |
|
116 */ |
|
117 void CreateMasterCntListUpdateHandlersL(); |
|
118 |
|
119 |
|
120 |
|
121 private: // Constructors |
|
122 |
|
123 /** |
|
124 * C++ constructor. |
|
125 */ |
|
126 CPEngContactListTransSync( CPEngContactListModBase& aContactList, |
|
127 CPEngSessionSlotId& aSessionSlotId, |
|
128 MPEngContactListTransactionManager& aManager, |
|
129 TPEngWVCspVersion& aCSPVersion, |
|
130 TInt aOperationId ); |
|
131 |
|
132 /** |
|
133 * Symbian constructor. |
|
134 */ |
|
135 void ConstructL(); |
|
136 |
|
137 |
|
138 private: // Data |
|
139 |
|
140 /// OWN: Additional handlers |
|
141 RPointerArray<MPEngOutgoingTransactionHandler> iAdditionalHandlers; |
|
142 }; |
|
143 |
|
144 #endif // __CPENGCONTACTLISTTRANSSYNC_H__ |
|
145 |
|
146 // End of File |
|
147 |