diff -r 91c2fb4b78df -r ba54057fe027 phoneengine/PhoneCntFinder/ContactService/src/cphcntstoreloaderimpl.cpp --- a/phoneengine/PhoneCntFinder/ContactService/src/cphcntstoreloaderimpl.cpp Tue Apr 27 16:37:10 2010 +0300 +++ b/phoneengine/PhoneCntFinder/ContactService/src/cphcntstoreloaderimpl.cpp Tue May 11 16:13:03 2010 +0300 @@ -15,12 +15,17 @@ * */ - +#include #include +#include +#include #include -#include +#include +#include +#include #include "cphcntstoreloaderimpl.h" #include "MPhCntContactManager.h" +#include "cphcntcontactstoreuris.h" // ======== MEMBER FUNCTIONS ======== @@ -176,13 +181,32 @@ // TBool CPhCntStoreLoaderImpl::IsContactStoreLoadedL( const TDesC8& aContactLink ) const - { - CVPbkContactLinkArray* linkArray = CVPbkContactLinkArray::NewLC( - aContactLink, iContactManager.ContactStoresL() ); + { + TBool storeLoaded = EFalse; + CPhCntContactStoreUris& storeUris = iContactManager.ContactStoreUrisL(); + CVPbkContactStoreUriArray* uriArray = storeUris.ActiveContactStoresL(); + CleanupStack::PushL( uriArray ); - TBool storeLoaded( linkArray->Count() != 0 ); - CleanupStack::PopAndDestroy( linkArray ); - + if ( uriArray->Count() > 0 ) + { + MVPbkContactLink* link = iContactManager.ConvertDescriptorToLinkL( aContactLink ); + if( link ) + { + for ( int i=0; iCount();i++ ) + { + if ((*uriArray)[i].Compare( + link->ContactStore().StoreProperties().Uri(), + TVPbkContactStoreUriPtr::EContactStoreUriAllComponents ) + == KErrNone ) + { + storeLoaded = ETrue; + break; + } + } + delete link; + } + } + CleanupStack::PopAndDestroy( uriArray ); return storeLoaded; }