phonebookui/Phonebook2/NamesListExtension/src/NamesListUiExtensionPlugin.cpp
branchRCL_3
changeset 32 2828b4d142c0
parent 15 e8e3147d53eb
child 35 4ae315f230bc
equal deleted inserted replaced
26:0d28c1c5b6dd 32:2828b4d142c0
   732 // --------------------------------------------------------------------------
   732 // --------------------------------------------------------------------------
   733 // CNamesListUIExtensionPlugin::StoreUnavailable
   733 // CNamesListUIExtensionPlugin::StoreUnavailable
   734 // --------------------------------------------------------------------------
   734 // --------------------------------------------------------------------------
   735 //
   735 //
   736 void CNamesListUIExtensionPlugin::StoreUnavailable
   736 void CNamesListUIExtensionPlugin::StoreUnavailable
   737         ( MVPbkContactStore& aContactStore, TInt /*aReason*/ )
   737         ( MVPbkContactStore& /*aContactStore*/, TInt /*aReason*/ )
   738     {
   738     {
   739     if ( aContactStore.StoreProperties().Name().UriDes().Compare
   739 
   740             ( VPbkContactStoreUris::DefaultCntDbUri() ) && iLocalStore )
       
   741         {
       
   742         iLocalStore->Close( *this );
       
   743         iLocalStore = NULL;
       
   744         }
       
   745     }
   740     }
   746 
   741 
   747 // --------------------------------------------------------------------------
   742 // --------------------------------------------------------------------------
   748 // CNamesListUIExtensionPlugin::HandleStoreEventL
   743 // CNamesListUIExtensionPlugin::HandleStoreEventL
   749 // --------------------------------------------------------------------------
   744 // --------------------------------------------------------------------------
   765     
   760     
   766            case TVPbkContactStoreEvent::EContactDeleted:
   761            case TVPbkContactStoreEvent::EContactDeleted:
   767                {
   762                {
   768                iLocalStoreContactsCount--;
   763                iLocalStoreContactsCount--;
   769                break;
   764                break;
   770                }
   765                }             
   771                
       
   772            case TVPbkContactStoreEvent::EStoreBackupRestoreCompleted:
       
   773            case TVPbkContactStoreEvent::EUnknownChanges:
       
   774                {
       
   775                iLocalStoreContactsCount = iLocalStore->StoreInfo().NumberOfContactsL();
       
   776                break;
       
   777                }
       
   778                
       
   779            default:
   766            default:
   780                break;
   767                break;
   781            }
   768            }
   782         }
   769         }
   783     }
   770     }