author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 27 Aug 2009 07:43:07 +0300 | |
changeset 22 | fc9cf246af83 |
parent 19 | 989d2f495d90 |
child 33 | 50974a8b132e |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 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 the License "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: Store list observer implementation for getlist service api. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#include "contactservice.h" |
|
20 |
#include <CVPbkContactManager.h> |
|
21 |
#include <MVPbkContactStore.h> |
|
22 |
#include <barsread.h>//resource reader |
|
23 |
#include "contactiter.h" |
|
24 |
#include <MVPbkContactViewBase.h> |
|
25 |
#include <MVPbkContactViewFiltering.h> |
|
26 |
#include <cvpbkcontactviewdefinition.h> |
|
27 |
#include <MVPbkContactLink.h> |
|
28 |
#include <mvpbkcontactstoreproperties.h> |
|
29 |
#include <MVPbkContactOperationBase.h> |
|
30 |
#include "contactviewobserver.h" |
|
31 |
#include "getliststorelistobserver.h" |
|
32 |
#include "contactiter.h" |
|
33 |
||
34 |
||
35 |
/* |
|
36 |
------------------------------------------------------------------------------------- |
|
37 |
CGetListStoreListObserver::Cancel() |
|
38 |
Description : Cancel implementation relevant to GetListObserver |
|
39 |
Return values : KErrorNone on Success and KErrGeneral on Failure |
|
40 |
------------------------------------------------------------------------------------- |
|
41 |
*/ |
|
42 |
||
43 |
void CGetListStoreListObserver::Cancel() |
|
44 |
{ |
|
45 |
if(iIter) |
|
46 |
{ |
|
47 |
delete iIter; |
|
48 |
iIter = NULL; |
|
49 |
} |
|
50 |
if(iRetOp) |
|
51 |
{ |
|
52 |
delete iRetOp; |
|
53 |
iRetOp = NULL; |
|
54 |
} |
|
55 |
iCallback->HandleReturnValue(EOpCancel, KErrNone, iTransId); |
|
56 |
delete this; |
|
57 |
} |
|
58 |
||
59 |
// --------------------------------------------------------------------------- |
|
60 |
// Called By MVPbkContactStoreListObserver indicate the |
|
61 |
// the store is ready |
|
62 |
// --------------------------------------------------------------------------- |
|
63 |
// |
|
64 |
void CGetListStoreListObserver::StoreReady( MVPbkContactStore& aContactStore ) |
|
65 |
{ |
|
66 |
iContactStore = &aContactStore; |
|
67 |
TRAPD(error,CreateAndFilterViewL(*iContactStore)); |
|
68 |
||
69 |
if(error !=KErrNone) |
|
70 |
{ |
|
71 |
iContactService->RequestComplete(iTransId); |
|
72 |
iCallback->HandleReturnValue(EOpComplete, error, iTransId); |
|
73 |
} |
|
74 |
iContactService->RequestComplete(iTransId); |
|
75 |
if(iType != EOthers) |
|
76 |
delete this; |
|
77 |
} |
|
78 |
||
79 |
||
80 |
//---------------------------------------------------------------------------- |
|
81 |
// First creates the default view of the database, then creates a filtered view for it. |
|
82 |
// The fields to be searched in are made a part of the default view. |
|
83 |
// And the string to be searched for is used for filtering the view to obtain the results. |
|
84 |
// Sorting is taken into consideration for contacts alone. |
|
85 |
//---------------------------------------------------------------------------- |
|
86 |
void CGetListStoreListObserver::CreateAndFilterViewL( MVPbkContactStore& aContactStore) |
|
87 |
{ |
|
88 |
||
89 |
CVPbkContactManager* contactManager =&(iContactService->GetContactManager()); |
|
90 |
||
91 |
if(iContactId && iContactId->Compare(KNullDesC8)) |
|
92 |
{ |
|
93 |
CActiveSchedulerWait* schedulerWait = new (ELeave) CActiveSchedulerWait; |
|
94 |
CleanupStack::PushL(schedulerWait); |
|
95 |
||
96 |
//Extract the contactlink from the contactid |
|
97 |
MVPbkContactLinkArray* linkArray = (contactManager)->CreateLinksLC(*iContactId); |
|
98 |
||
99 |
||
100 |
//Set the params for iterator |
|
101 |
iIter->SetParams(linkArray, iUri, EAsc, iTransId, iType, iContactService); |
|
102 |
||
103 |
CContactRetrieveObserver* retrieveObserver = CContactRetrieveObserver::NewL(iIter, |
|
104 |
iCallback, |
|
105 |
iContactService, |
|
106 |
iType, |
|
107 |
iTransId, |
|
108 |
schedulerWait); |
|
109 |
||
110 |
CleanupStack::PushL(retrieveObserver); |
|
111 |
//Retrieve contact |
|
112 |
iRetOp = (contactManager)->RetrieveContactL((*linkArray)[0],*retrieveObserver ); |
|
113 |
iContactService->AddAsyncObjL(iTransId, retrieveObserver); |
|
114 |
||
115 |
CleanupStack::Pop(retrieveObserver); |
|
116 |
||
117 |
schedulerWait->Start(); |
|
118 |
||
119 |
iRetOp = NULL; |
|
120 |
CleanupStack::Pop(); |
|
121 |
CleanupStack::PopAndDestroy(schedulerWait); |
|
122 |
} |
|
123 |
else if(iType == EContacts) |
|
124 |
{ |
|
125 |
if(!iSearchFields) |
|
126 |
{ |
|
127 |
iFieldsList = CVPbkFieldTypeRefsList::NewL(); |
|
128 |
iFieldsList->AppendL(*(contactManager)->FieldTypes().Find(R_VPBK_FIELD_TYPE_LASTNAME)); |
|
129 |
iFieldsList->AppendL(*(contactManager)->FieldTypes().Find(R_VPBK_FIELD_TYPE_FIRSTNAME)); |
|
130 |
} |
|
131 |
||
132 |
CVPbkContactViewDefinition* viewdef = |
|
133 |
CVPbkContactViewDefinition::NewL(); |
|
134 |
CleanupStack::PushL(viewdef); |
|
135 |
||
136 |
//Set the Uri on which the view is to be built |
|
137 |
viewdef->SetUriL(iUri); |
|
138 |
||
139 |
CActiveSchedulerWait* schedulerWait = |
|
140 |
new (ELeave) CActiveSchedulerWait; |
|
141 |
||
142 |
CleanupStack::PushL(schedulerWait); |
|
143 |
||
144 |
||
145 |
CContactViewObserver* defaultView = |
|
146 |
CContactViewObserver::NewL(iCallback, |
|
147 |
EContactDefaultView, |
|
148 |
iIter, |
|
149 |
iContactService, |
|
150 |
iUri, |
|
151 |
iSortOrder, |
|
152 |
iTransId, |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
153 |
schedulerWait, iVal); |
19 | 154 |
CleanupStack::PushL(defaultView); |
155 |
if(iSearchVal->Length() <= 0) |
|
156 |
{ |
|
157 |
defaultView->ReturnDefaultView(); |
|
158 |
} |
|
159 |
MVPbkContactViewBase* contactView = NULL; |
|
160 |
||
161 |
if(iFieldsList) |
|
162 |
{ |
|
163 |
//Create the default view for the database |
|
164 |
contactView = |
|
165 |
contactManager->CreateContactViewLC(*defaultView, |
|
166 |
*viewdef, |
|
167 |
*iFieldsList); |
|
168 |
} |
|
169 |
else |
|
170 |
{ |
|
171 |
CVPbkFieldTypeRefsList* fieldList = iSearchFields->GetFieldListL(); |
|
172 |
//Create the default view for the database |
|
173 |
if(fieldList) |
|
174 |
{ |
|
175 |
contactView = |
|
176 |
contactManager->CreateContactViewLC(*defaultView, |
|
177 |
*viewdef, |
|
178 |
*fieldList); |
|
179 |
} |
|
180 |
else |
|
181 |
{ |
|
182 |
User::Leave(KErrArgument); |
|
183 |
} |
|
184 |
||
185 |
} |
|
186 |
iContactService->AddAsyncObjL(iTransId, defaultView); |
|
187 |
||
188 |
schedulerWait->Start(); |
|
189 |
||
190 |
if(iSearchVal->Length() > 0) //Filter the view only if searchVal is given |
|
191 |
{ |
|
192 |
// Initialise the Search Strings |
|
193 |
CDesCArrayFlat* findStrings; |
|
194 |
findStrings = new(ELeave)CDesCArrayFlat( 10 ); |
|
195 |
CleanupStack::PushL(findStrings); |
|
196 |
||
197 |
findStrings->AppendL(*iSearchVal); |
|
198 |
||
199 |
//Create filtered view of the database |
|
200 |
CContactViewObserver* filteredView = |
|
201 |
CContactViewObserver::NewL(iCallback, |
|
202 |
EContactFilteredView, |
|
203 |
iIter, |
|
204 |
iContactService, |
|
205 |
iUri, |
|
206 |
iSortOrder, |
|
207 |
iTransId, |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
208 |
schedulerWait,iVal); |
19 | 209 |
|
210 |
CleanupStack::PushL(filteredView); |
|
211 |
//Filtering the view to find the iFindStrings |
|
212 |
MVPbkContactViewBase* findView = |
|
213 |
contactView->ViewFiltering()->CreateFilteredViewLC(*filteredView, |
|
214 |
*findStrings, |
|
215 |
NULL); |
|
216 |
iContactService->AddAsyncObjL(iTransId, filteredView); |
|
217 |
schedulerWait->Start(); |
|
218 |
CleanupStack::PopAndDestroy(); |
|
219 |
CleanupStack::PopAndDestroy(filteredView); |
|
220 |
CleanupStack::PopAndDestroy(findStrings); |
|
221 |
} |
|
222 |
CleanupStack::PopAndDestroy(); |
|
223 |
CleanupStack::PopAndDestroy(defaultView); |
|
224 |
CleanupStack::PopAndDestroy(schedulerWait); |
|
225 |
CleanupStack::PopAndDestroy(viewdef); |
|
226 |
} |
|
227 |
else if(iType == EGroups) |
|
228 |
{ |
|
229 |
//Get the linkarray of the groups in the database |
|
230 |
MVPbkContactLinkArray* array = aContactStore.ContactGroupsLC(); |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
231 |
TInt count = array->Count(); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
232 |
if(count) |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
233 |
{ |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
234 |
if(iVal == EGetList) |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
235 |
{ |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
236 |
//Set the iterator with the result |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
237 |
iIter->SetParams(array, iUri, EAsc, iTransId, EGroups, iContactService); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
238 |
|
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
239 |
iContactService->RequestComplete(iTransId); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
240 |
//Notify the user |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
241 |
iCallback->HandleReturnIter(KErrNone, iIter, iTransId); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
242 |
} |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
243 |
else |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
244 |
{ |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
245 |
RPointerArray<HBufC8> idArray(count); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
246 |
MVPbkContactLink *link = NULL; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
247 |
//Set the array with the ids |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
248 |
for(TInt index(0); index < count; index++) |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
249 |
{ |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
250 |
link = const_cast<MVPbkContactLink*>(&((*array)[index])); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
251 |
idArray.AppendL(link->PackLC()); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
252 |
CleanupStack::Pop(); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
253 |
} |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
254 |
//iIter->SetIdsPtr(idArray, count); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
255 |
iContactService->RequestComplete(iTransId); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
256 |
//Notify the user |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
257 |
iCallback->HandleReturnArray(KErrNone , idArray , iTransId); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
258 |
idArray.Reset(); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
259 |
//CleanupStack::PopAndDestroy(link); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
260 |
delete link; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
261 |
link = NULL; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
262 |
//CleanupStack::Pop(); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
263 |
//delete array; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
264 |
//array = NULL; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
265 |
//iCallback->HandleReturnIter(KErrNone, iIter, iTransId); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
266 |
} |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
267 |
} |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
268 |
else |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
269 |
{ |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
270 |
iContactService->RequestComplete(iTransId); |
19 | 271 |
//Notify the user |
272 |
iCallback->HandleReturnValue(EOpComplete, KErrNotFound, iTransId); |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
273 |
delete iIter; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
274 |
iIter = NULL; |
19 | 275 |
} |
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
276 |
CleanupStack::Pop(); |
19 | 277 |
} |
278 |
else if(iType == EOthers) |
|
279 |
{ |
|
280 |
TRequestStatus* status = &(iIter->iSyncIter->iStatus); |
|
281 |
User::RequestComplete(status, KErrNone); |
|
282 |
} |
|
283 |
} |
|
284 |
||
285 |
||
286 |
// --------------------------------------------------------------------------- |
|
287 |
// For a possibility that store might be unavailable. |
|
288 |
// Appropriate error code is returned |
|
289 |
// --------------------------------------------------------------------------- |
|
290 |
void CGetListStoreListObserver::StoreUnavailable( |
|
291 |
MVPbkContactStore& aContactStore, |
|
292 |
TInt aReason ) |
|
293 |
{ |
|
294 |
if(iType == EOthers) |
|
295 |
{ |
|
296 |
TRequestStatus* status = &(iIter->iSyncIter->iStatus); |
|
297 |
User::RequestComplete(status, KErrNone); |
|
298 |
} |
|
299 |
else |
|
300 |
{ |
|
301 |
iContactService->RequestComplete(iTransId); |
|
302 |
//Notify User |
|
303 |
iCallback->HandleReturnValue(EOpError, aReason, iTransId); |
|
304 |
} |
|
305 |
aContactStore.Close(*this); |
|
306 |
delete iIter; |
|
307 |
iIter = NULL; |
|
308 |
delete this; |
|
309 |
} |
|
310 |
||
311 |
// --------------------------------------------------------------------------- |
|
312 |
// NewL() method |
|
313 |
// --------------------------------------------------------------------------- |
|
314 |
||
315 |
CGetListStoreListObserver* CGetListStoreListObserver:: |
|
316 |
NewL(const TDesC& aUri, |
|
317 |
const TDesC8& aContactId, |
|
318 |
const TDesC& aSearchVal, |
|
319 |
CSearchFields* aSearchFields, |
|
320 |
TOrder aSortOrder, |
|
321 |
MContactCallback *aCallback, |
|
322 |
CContactService *aContactService, |
|
323 |
CContactIter* aIter, |
|
324 |
enum Ttype aType, TInt aTransId, |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
325 |
MVPbkContactStore* aContactStore, TCmdType val) |
19 | 326 |
|
327 |
{ |
|
328 |
CGetListStoreListObserver* self = |
|
329 |
new( ELeave ) CGetListStoreListObserver(aUri, |
|
330 |
aContactId, |
|
331 |
aSearchVal, |
|
332 |
aSearchFields, |
|
333 |
aSortOrder, |
|
334 |
aCallback, |
|
335 |
aContactService, |
|
336 |
aIter, |
|
337 |
aType, |
|
338 |
aTransId, |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
339 |
aContactStore, val); |
19 | 340 |
self->ConstructL(aContactId, aSearchVal); |
341 |
return self; |
|
342 |
} |
|
343 |
||
344 |
||
345 |
void CGetListStoreListObserver::ConstructL( const TDesC8& aContactId, |
|
346 |
const TDesC& aSearchVal ) |
|
347 |
{ |
|
348 |
if(&aContactId) |
|
349 |
{ |
|
350 |
iContactId = HBufC8 :: NewL(aContactId.Length()); |
|
351 |
*iContactId = aContactId; |
|
352 |
} |
|
353 |
if(&aSearchVal) |
|
354 |
{ |
|
355 |
iSearchVal = HBufC :: NewL(aSearchVal.Length()); |
|
356 |
*iSearchVal = aSearchVal; |
|
357 |
} |
|
358 |
} |
|
359 |
||
360 |
CGetListStoreListObserver:: |
|
361 |
CGetListStoreListObserver(const TDesC& aUri,const TDesC8& /*aContactId*/, |
|
362 |
const TDesC& /*aSearchVal*/, |
|
363 |
CSearchFields* aSearchFields, |
|
364 |
TOrder aSortOrder, |
|
365 |
MContactCallback *aCallback, |
|
366 |
CContactService *aContactService, |
|
367 |
CContactIter* aIter, |
|
368 |
enum Ttype aType, TInt aTransId, |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
369 |
MVPbkContactStore* aContactStore, TCmdType val) |
19 | 370 |
{ |
371 |
iUri = aUri; |
|
372 |
iSearchFields = aSearchFields; |
|
373 |
iSortOrder = aSortOrder; |
|
374 |
iCallback=aCallback; |
|
375 |
iContactService = aContactService; |
|
376 |
iIter = aIter; |
|
377 |
iType = aType; |
|
378 |
iTransId = aTransId; |
|
379 |
iFieldsList = NULL; |
|
380 |
iRetOp = NULL; |
|
381 |
iContactStore = aContactStore; |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
382 |
iVal = val; |
19 | 383 |
} |
384 |
||
385 |
||
386 |
CGetListStoreListObserver::~CGetListStoreListObserver() |
|
387 |
{ |
|
388 |
if(iSearchFields) |
|
389 |
{ |
|
390 |
delete iSearchFields; |
|
391 |
iSearchFields =NULL; |
|
392 |
} |
|
393 |
delete iFieldsList; |
|
394 |
delete iContactId; |
|
395 |
delete iSearchVal; |
|
396 |
if(iContactStore) |
|
397 |
{ |
|
398 |
iContactStore->Close(*this); |
|
399 |
iContactStore = NULL; |
|
400 |
} |
|
401 |
} |
|
402 |
||
403 |
||
404 |
void CGetListStoreListObserver::HandleStoreEventL( |
|
405 |
MVPbkContactStore& /*aContactStore*/, |
|
406 |
TVPbkContactStoreEvent /*aStoreEvent*/ ) |
|
407 |
{ |
|
408 |
} |
|
409 |
||
410 |
void CGetListStoreListObserver::OpenComplete() |
|
411 |
{ |
|
412 |
} |