telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp
branchRCL_3
changeset 6 fc69e1e37771
parent 5 7ef16719d8cb
child 7 fe8b59ab9fa0
equal deleted inserted replaced
5:7ef16719d8cb 6:fc69e1e37771
  1159 #ifdef USING_CTSY_DISPATCHER 		
  1159 #ifdef USING_CTSY_DISPATCHER 		
  1160 	aDataPackage->UnPackData(iPBStoreCache);
  1160 	aDataPackage->UnPackData(iPBStoreCache);
  1161 #else
  1161 #else
  1162 	CArrayPtrSeg<CPhoneBookStoreEntry>* entryData;
  1162 	CArrayPtrSeg<CPhoneBookStoreEntry>* entryData;
  1163 	aDataPackage->UnPackData(entryData);	
  1163 	aDataPackage->UnPackData(entryData);	
  1164 	CopyLtsyCacheToCtsyCache(entryData);
  1164 	CopyLtsyCacheToCtsyCacheL(entryData);
  1165 #endif
  1165 #endif
  1166 	
  1166 	
  1167     CMmPhoneTsy::CNosBootState* bootState = iMmPhoneTsy->NosBootState();
  1167     CMmPhoneTsy::CNosBootState* bootState = iMmPhoneTsy->NosBootState();
  1168 
  1168 
  1169     // If cache were successfully generated, update
  1169     // If cache were successfully generated, update
  3161 TFLOGSTRING2( "TSY: CMmPhoneBookStoreTsy::GetPhonebookType - iPhoneBookType: %d", iPhoneBookType);	            
  3161 TFLOGSTRING2( "TSY: CMmPhoneBookStoreTsy::GetPhonebookType - iPhoneBookType: %d", iPhoneBookType);	            
  3162  	return iPhoneBookType;
  3162  	return iPhoneBookType;
  3163  	}
  3163  	}
  3164 
  3164 
  3165 // ---------------------------------------------------------------------------
  3165 // ---------------------------------------------------------------------------
  3166 // CMmPhoneBookStoreTsy::CopyLtsyCacheToCtsyCache
  3166 // CMmPhoneBookStoreTsy::CopyLtsyCacheToCtsyCacheL
  3167 // This method copies Ltsy Cache to Ctsy Cache
  3167 // This method copies Ltsy Cache to Ctsy Cache
  3168 // This is only done when NOT using the dispatcher as the Ltsy creates the array and destroys
  3168 // This is only done when NOT using the dispatcher as the Ltsy creates the array and destroys
  3169 // the memory before CTSY is completely done with it. It now has to be copied over to CTSY domain
  3169 // the memory before CTSY is completely done with it. It now has to be copied over to CTSY domain
  3170 // to make sure the Ltsy does not delete before Ctsy is finished. This is not the case using Ctsy Dispatcher
  3170 // to make sure the Ltsy does not delete before Ctsy is finished. This is not the case using Ctsy Dispatcher
  3171 // (other items were commented in a header).
  3171 // (other items were commented in a header).
  3172 // ---------------------------------------------------------------------------
  3172 // ---------------------------------------------------------------------------
  3173 //
  3173 //
  3174 void CMmPhoneBookStoreTsy::CopyLtsyCacheToCtsyCache( CArrayPtrSeg<CPhoneBookStoreEntry>* aEntryData )
  3174 void CMmPhoneBookStoreTsy::CopyLtsyCacheToCtsyCacheL( CArrayPtrSeg<CPhoneBookStoreEntry>* aEntryData )
  3175 	{
  3175 	{
  3176 	if (iPBStoreCache!=NULL)
  3176 	if (iPBStoreCache!=NULL)
  3177 		{
  3177 		{
  3178 		iPBStoreCache->ResetAndDestroy();
  3178 		iPBStoreCache->ResetAndDestroy();
  3179 		delete iPBStoreCache;
  3179 		delete iPBStoreCache;
  3229 				for(TInt anrCount = 0; anrCount<(anr->Count()); anrCount++)
  3229 				for(TInt anrCount = 0; anrCount<(anr->Count()); anrCount++)
  3230 					{
  3230 					{
  3231 					(phoneBookStoreEntry->iAnr)->AppendL((*anr)[anrCount]);
  3231 					(phoneBookStoreEntry->iAnr)->AppendL((*anr)[anrCount]);
  3232 					}	
  3232 					}	
  3233 				}
  3233 				}
  3234 						
  3234 			
  3235 			iPBStoreCache->AppendL(phoneBookStoreEntry);
  3235 			iPBStoreCache->AppendL(phoneBookStoreEntry);
  3236 			CleanupStack::Pop( phoneBookStoreEntry );
  3236 			CleanupStack::Pop( phoneBookStoreEntry );
  3237 			}
  3237 			}
  3238 		}
  3238 		}
  3239 	else
  3239 	else