|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 server application server message |
|
15 * : data retriever. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef TPBK2SERVERMESSAGEDATARETRIEVER_H |
|
21 #define TPBK2SERVERMESSAGEDATARETRIEVER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <coehelp.h> |
|
26 #include <Pbk2ServerAppIPC.h> |
|
27 #include <RVPbkContactFieldDefaultPriorities.h> |
|
28 #include <AiwContactSelectionDataTypes.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class RMessage2; |
|
32 class CVPbkContactStoreUriArray; |
|
33 class CVPbkContactLinkArray; |
|
34 class CPbk2StoreConfiguration; |
|
35 class CVPbkContactManager; |
|
36 class MVPbkFieldTypeList; |
|
37 class CVPbkFieldTypeSelector; |
|
38 class MVPbkContactLinkArray; |
|
39 |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * Phonebook 2 server application server message data retriever. |
|
45 * Responsible for: |
|
46 * - reading client-server messages |
|
47 * - constructing externalized objects from the message |
|
48 */ |
|
49 class TPbk2ServerMessageDataRetriever |
|
50 { |
|
51 public: // Construction |
|
52 |
|
53 /** |
|
54 * Constructor. |
|
55 */ |
|
56 TPbk2ServerMessageDataRetriever(); |
|
57 |
|
58 public: // Interface |
|
59 |
|
60 /** |
|
61 * Gets URI array of the contact stores to from the given message. |
|
62 * If the message does not contain it, the current configuration |
|
63 * of Phonebook is used. |
|
64 * |
|
65 * @param aMessage The message to retrieve data from. |
|
66 * @param aStoreConfiguration Phonebook store configuration. |
|
67 * @param aPreselectedLinks Preselected contact links, if any. |
|
68 * @param aCurrentConfiguration On return contains information if |
|
69 * returned array is equal to current |
|
70 * configuration. |
|
71 * @return Contact store URI array. |
|
72 */ |
|
73 CVPbkContactStoreUriArray* GetContactStoreUriArrayL( |
|
74 const RMessage2& aMessage, |
|
75 const CPbk2StoreConfiguration& aStoreConfiguration, |
|
76 MVPbkContactLinkArray* aPreselectedLinks, |
|
77 TBool& aCurrentConfiguration ) const; |
|
78 |
|
79 /** |
|
80 * Gets preselected contact links. |
|
81 * |
|
82 * @param aMessage The message to retrieve data from. |
|
83 * @param aContactStoreList Contact store list. |
|
84 * @return Preselected contact links. |
|
85 */ |
|
86 MVPbkContactLinkArray* GetPreselectedContactLinksL( |
|
87 const RMessage2& aMessage, |
|
88 const CVPbkContactManager& aContactManager ) const; |
|
89 |
|
90 /** |
|
91 * Gets address select filter. |
|
92 * |
|
93 * @param aMessage The message to retrieve data from. |
|
94 * @param aFieldTypeList Virtual Phonebook field type list. |
|
95 * @return Address select filter or NULL if it was not sent. |
|
96 */ |
|
97 CVPbkFieldTypeSelector* GetAddressSelectFilterL( |
|
98 const RMessage2& aMessage, |
|
99 const MVPbkFieldTypeList& aFieldTypeList ) const; |
|
100 |
|
101 /** |
|
102 * Gets address select filter buffer. |
|
103 * |
|
104 * @param aMessage The message to retrieve data from. |
|
105 * @return Address select filter buffer or NULL if it was not sent. |
|
106 */ |
|
107 HBufC8* GetAddressSelectFilterBufferL( |
|
108 const RMessage2& aMessage ) const; |
|
109 |
|
110 /** |
|
111 * Gets address select type. |
|
112 * |
|
113 * @param aMessage The message to retrieve data from. |
|
114 * @return Address select type. |
|
115 */ |
|
116 TAiwAddressSelectType GetAddressSelectTypeL( |
|
117 const RMessage2& aMessage ) const; |
|
118 |
|
119 /** |
|
120 * Gets communication address select type. |
|
121 * |
|
122 * @param aMessage The message to retrieve data from. |
|
123 * @return Communication address select type. |
|
124 */ |
|
125 TAiwCommAddressSelectType GetCommAddressSelectTypeL( |
|
126 const RMessage2& aMessage ) const; |
|
127 |
|
128 /** |
|
129 * Gets contact view filter. |
|
130 * |
|
131 * @param aMessage The message to retrieve data from. |
|
132 * @param aFieldTypeList Virtual Phonebook field type list. |
|
133 * @return Contact view filter or NULL if it was not sent. |
|
134 */ |
|
135 CVPbkFieldTypeSelector* GetContactViewFilterL( |
|
136 const RMessage2& aMessage, |
|
137 const MVPbkFieldTypeList& aFieldTypeList ) const; |
|
138 |
|
139 /** |
|
140 * Gets contact view filter for attribute assign. |
|
141 * |
|
142 * @param aMessage The message to retrieve data from. |
|
143 * @param aFieldTypeList Virtual Phonebook field type list. |
|
144 * @return Contact view filter or NULL if it was not sent. |
|
145 */ |
|
146 CVPbkFieldTypeSelector* GetContactViewFilterForAttributeAssignL( |
|
147 const RMessage2& aMessage, |
|
148 const MVPbkFieldTypeList& aFieldTypeList ) const; |
|
149 |
|
150 /** |
|
151 * Gets title pane text. |
|
152 * |
|
153 * @param aMessage The message to retrieve data from. |
|
154 * @return Title pane text or NULL if it was not sent. |
|
155 */ |
|
156 HBufC* GetTitlePaneTextL( |
|
157 const RMessage2& aMessage ) const; |
|
158 |
|
159 /** |
|
160 * Gets contact attribute data from the given message. |
|
161 * |
|
162 * @param aMessage The message to retrieve data from. |
|
163 * @return Contact attribute data. |
|
164 */ |
|
165 TPbk2AttributeAssignData GetAttributeDataL( |
|
166 const RMessage2& aMessage ) const; |
|
167 |
|
168 /** |
|
169 * Gets the data buffer to assign to a contact. |
|
170 * |
|
171 * @param aMessage The message to retrieve data from. |
|
172 * @return Data buffer. |
|
173 */ |
|
174 HBufC* GetDataBufferL( |
|
175 const RMessage2& aMessage ) const; |
|
176 |
|
177 /** |
|
178 * Gets the focus index for assigning a contact. |
|
179 * |
|
180 * @param aMessage The message to retrieve data from. |
|
181 * @return Focus index. |
|
182 */ |
|
183 TInt GetFocusIndexL( |
|
184 const RMessage2& aMessage ) const; |
|
185 |
|
186 /** |
|
187 * Gets the MIME type of the data to assign. |
|
188 * |
|
189 * @param aMessage The message to retrieve data from. |
|
190 * @return MIME type. |
|
191 */ |
|
192 TInt GetMimeTypeL( |
|
193 const RMessage2& aMessage ) const; |
|
194 |
|
195 /** |
|
196 * Gets single contact assign flags. |
|
197 * |
|
198 * @param aMessage The message to retrieve data from. |
|
199 * @return Flags. |
|
200 */ |
|
201 TUint SingleContactAssignFlagsL( |
|
202 const RMessage2& aMessage ) const; |
|
203 |
|
204 /** |
|
205 * Gets multiple contact assign flags. |
|
206 * |
|
207 * @param aMessage The message to retrieve data from. |
|
208 * @return Flags. |
|
209 */ |
|
210 TUint MultipleContactAssignFlagsL( |
|
211 const RMessage2& aMessage ) const; |
|
212 |
|
213 /** |
|
214 * Gets fetch flags. |
|
215 * |
|
216 * @param aMessage The message to retrieve data from. |
|
217 * @return Flags. |
|
218 */ |
|
219 TUint FetchFlagsL( |
|
220 const RMessage2& aMessage ) const; |
|
221 |
|
222 /** |
|
223 * Gets attribute assign remove information. |
|
224 * |
|
225 * @param aMessage The message to retrieve data from. |
|
226 * @return ETrue if the attribute is to be removed, |
|
227 * EFalse if the attribute is to be added. |
|
228 */ |
|
229 TBool GetAttributeRemovalIndicatorValueL( |
|
230 const RMessage2& aMessage ) const; |
|
231 |
|
232 /** |
|
233 * Gets editor help context. |
|
234 * |
|
235 * @param aMessage The message to retrieve data from. |
|
236 * @return Editor help context. |
|
237 */ |
|
238 TCoeHelpContext GetEditorHelpContextL( |
|
239 const RMessage2& aMessage ) const; |
|
240 |
|
241 /** |
|
242 * Gets the fetch dialog resource id. |
|
243 * |
|
244 * @param aMessage The message to retrieve data from. |
|
245 * @return Dialog resource id. |
|
246 */ |
|
247 TInt GetFetchDialogResourceL( |
|
248 const RMessage2& aMessage ) const; |
|
249 |
|
250 /** |
|
251 * Gets the default priorities. |
|
252 * |
|
253 * @param aMessage The message to retrieve data from. |
|
254 * @return Default priorities or NULL if not set. |
|
255 */ |
|
256 RVPbkContactFieldDefaultPriorities FetchDefaultPrioritiesL( |
|
257 const RMessage2& aMessage ) const; |
|
258 |
|
259 /** |
|
260 * Gets the client orientation settings. |
|
261 * |
|
262 * @param aMessage The message to retrieve data from. |
|
263 * @return The client orientation settings. |
|
264 */ |
|
265 TInt GetOrietationTypeL(const RMessage2& aMessage ) const; |
|
266 |
|
267 |
|
268 /** |
|
269 * Gets StatusPane ID that should be used by the ServerApplication |
|
270 * |
|
271 * @param aMessage The message to retrieve data from. |
|
272 * @return valid StatusPane ID or 0 if it was not sent. |
|
273 */ |
|
274 TInt TPbk2ServerMessageDataRetriever::GetStatusPaneIdL |
|
275 ( const RMessage2& aMessage ) const; |
|
276 }; |
|
277 |
|
278 #endif // TPBK2SERVERMESSAGEDATARETRIEVER_H |
|
279 |
|
280 // End of File |