equal
deleted
inserted
replaced
346 void CPbk2ContactRelocator::StoreReady |
346 void CPbk2ContactRelocator::StoreReady |
347 ( MVPbkContactStore& /*aContactStore*/ ) |
347 ( MVPbkContactStore& /*aContactStore*/ ) |
348 { |
348 { |
349 iTargetStoreOpen = ETrue; |
349 iTargetStoreOpen = ETrue; |
350 // Safe to ignore error |
350 // Safe to ignore error |
351 TRAP_IGNORE( DoRelocateContactL() ); |
351 TRAPD( err, DoRelocateContactL() ); |
|
352 if ( err == KErrDiskFull ) |
|
353 { |
|
354 IssueRequest(); |
|
355 } |
|
356 } |
|
357 |
|
358 // -------------------------------------------------------------------------- |
|
359 // CPbk2ContactRelocator::IssueRequest |
|
360 // Inform failure asynchronously |
|
361 // -------------------------------------------------------------------------- |
|
362 // |
|
363 void CPbk2ContactRelocator::IssueRequest() |
|
364 { |
|
365 TRequestStatus* status = &iStatus; |
|
366 User::RequestComplete( status, KErrNone ); |
|
367 SetActive(); |
352 } |
368 } |
353 |
369 |
354 // -------------------------------------------------------------------------- |
370 // -------------------------------------------------------------------------- |
355 // CPbk2ContactRelocator::StoreUnavailable |
371 // CPbk2ContactRelocator::StoreUnavailable |
356 // -------------------------------------------------------------------------- |
372 // -------------------------------------------------------------------------- |
483 else if ( &aOperation == iContactRetriever ) |
499 else if ( &aOperation == iContactRetriever ) |
484 { |
500 { |
485 // One contact from given link array was retrieved, now it has |
501 // One contact from given link array was retrieved, now it has |
486 // to be stored and then relocated |
502 // to be stored and then relocated |
487 iSourceContact = aContact; |
503 iSourceContact = aContact; |
488 TRAP_IGNORE( DoRelocateContactL() ); |
504 DoRelocateContactL(); |
489 } |
505 } |
490 } |
506 } |
491 |
507 |
492 // -------------------------------------------------------------------------- |
508 // -------------------------------------------------------------------------- |
493 // CPbk2ContactRelocator::VPbkSingleContactOperationFailed |
509 // CPbk2ContactRelocator::VPbkSingleContactOperationFailed |
495 // -------------------------------------------------------------------------- |
511 // -------------------------------------------------------------------------- |
496 // |
512 // |
497 void CPbk2ContactRelocator::VPbkSingleContactOperationFailed |
513 void CPbk2ContactRelocator::VPbkSingleContactOperationFailed |
498 ( MVPbkContactOperationBase& /*aOperation*/, TInt aError ) |
514 ( MVPbkContactOperationBase& /*aOperation*/, TInt aError ) |
499 { |
515 { |
500 iObserver->ContactRelocationFailed( aError, iSourceContact ); |
516 if ( aError != KErrDiskFull ) |
501 iSourceContact = NULL; // ownership was given away |
517 { |
502 |
518 iObserver->ContactRelocationFailed( aError, iSourceContact ); |
503 // Move to next request, if any |
519 iSourceContact = NULL; // ownership was given away |
504 TRAP_IGNORE( DoRelocateContactL() ); |
520 |
|
521 // Move to next request, if any |
|
522 TRAP_IGNORE( DoRelocateContactL() ); |
|
523 } |
|
524 else |
|
525 { |
|
526 IssueRequest(); |
|
527 } |
505 } |
528 } |
506 |
529 |
507 // -------------------------------------------------------------------------- |
530 // -------------------------------------------------------------------------- |
508 // CPbk2ContactRelocator::ContactOperationCompleted |
531 // CPbk2ContactRelocator::ContactOperationCompleted |
509 // -------------------------------------------------------------------------- |
532 // -------------------------------------------------------------------------- |
887 iErrorCode = KErrCancel; |
910 iErrorCode = KErrCancel; |
888 } |
911 } |
889 |
912 |
890 if ( iErrorCode != KErrNone ) |
913 if ( iErrorCode != KErrNone ) |
891 { |
914 { |
892 // Inform failure asynchronously |
915 IssueRequest(); |
893 TRequestStatus* status = &iStatus; |
|
894 User::RequestComplete( status, KErrNone ); |
|
895 SetActive(); |
|
896 } |
916 } |
897 else |
917 else |
898 { |
918 { |
899 if ( !iTargetStoreOpen ) |
919 if ( !iTargetStoreOpen ) |
900 { |
920 { |