equal
deleted
inserted
replaced
76 Cancel(); |
76 Cancel(); |
77 TInt count = iRequestQueue.Count(); |
77 TInt count = iRequestQueue.Count(); |
78 for (TInt i = 0; i < count; i++) |
78 for (TInt i = 0; i < count; i++) |
79 { |
79 { |
80 DoCompleteRequest(0, KErrServerTerminated); |
80 DoCompleteRequest(0, KErrServerTerminated); |
|
81 // Delete the pointer items |
|
82 delete iRequestQueue[i].iRequestInfo; |
81 } |
83 } |
82 |
84 |
83 iNotifier.Close(); |
85 iNotifier.Close(); |
84 iRequestQueue.Close(); |
86 iRequestQueue.Close(); |
85 } |
87 } |
275 // |
277 // |
276 void CPosDialogCtrl::DoCompleteRequest( |
278 void CPosDialogCtrl::DoCompleteRequest( |
277 TInt aIndex, |
279 TInt aIndex, |
278 TInt aCompletionCode) |
280 TInt aCompletionCode) |
279 { |
281 { |
280 TRequest request = iRequestQueue[aIndex]; |
282 TRequestStatus* status = iRequestQueue[aIndex].iStatus; |
281 if (request.iType == TPosQNInputData::ENotification) |
283 User::RequestComplete(status, aCompletionCode); |
282 { |
|
283 delete request.iRequestInfo; |
|
284 } |
|
285 else |
|
286 { |
|
287 TRequestStatus* status = request.iStatus; |
|
288 User::RequestComplete(status, aCompletionCode); |
|
289 } |
|
290 iRequestQueue.Remove(aIndex); |
284 iRequestQueue.Remove(aIndex); |
291 iRequestQueue.Compress(); |
285 iRequestQueue.Compress(); |
292 } |
286 } |
293 |
287 |
294 // --------------------------------------------------------- |
288 // --------------------------------------------------------- |
369 buffer->Des().Append(*reqStackBuf); |
363 buffer->Des().Append(*reqStackBuf); |
370 |
364 |
371 delete reqStackBuf; |
365 delete reqStackBuf; |
372 reqStackBuf = NULL; |
366 reqStackBuf = NULL; |
373 |
367 |
374 iNotifier.StartNotifierAndGetResponse( |
368 if (data.iType == TPosQNInputData::ENotification) // We dont expect a resonse from a notfication |
375 iStatus, KNotifierUid, nullPtr, nullPtr); |
369 { |
376 SetActive(); |
370 iNotifier.StartNotifier(KNotifierUid, nullPtr, nullPtr); |
377 |
371 |
|
372 // As we wont be getting a response remove from the notification list |
|
373 delete iRequestQueue[0].iRequestInfo; |
|
374 iRequestQueue.Remove(0); |
|
375 iRequestQueue.Compress(); |
|
376 } |
|
377 else |
|
378 { |
|
379 iNotifier.StartNotifierAndGetResponse( |
|
380 iStatus, KNotifierUid, nullPtr, nullPtr); |
|
381 SetActive(); |
|
382 } |
|
383 |
378 err = iNotifier.UpdateNotifier(KNotifierUid, *buffer, nullPtr); |
384 err = iNotifier.UpdateNotifier(KNotifierUid, *buffer, nullPtr); |
379 if (err != KErrNone) |
385 if (err != KErrNone) |
380 { |
386 { |
381 Cancel(); |
387 Cancel(); |
382 } |
388 } |