phonebookui/Phonebook2/xSPExtensionManager/src/CxSPContactManager.cpp
branchRCL_3
changeset 32 2828b4d142c0
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
equal deleted inserted replaced
26:0d28c1c5b6dd 32:2828b4d142c0
   136 	}
   136 	}
   137 		
   137 		
   138 void CxSPContactManager::GetMappedPbkContactsL( TUint32 aId, TInt32 axSPContactId,
   138 void CxSPContactManager::GetMappedPbkContactsL( TUint32 aId, TInt32 axSPContactId,
   139         							RPointerArray<MVPbkContactLink>& aPbkContactLinks ) const
   139         							RPointerArray<MVPbkContactLink>& aPbkContactLinks ) const
   140 	{
   140 	{
       
   141 	CleanupClosePushL( aPbkContactLinks );
   141 	TInt count = iContactMap.Count();
   142 	TInt count = iContactMap.Count();
   142 	for( TInt i = 0; i < count; i++ )
   143 	for( TInt i = 0; i < count; i++ )
   143 		{
   144 		{
   144 		const CxSPPbkContactMap* map = iContactMap[i];
   145 		const CxSPPbkContactMap* map = iContactMap[i];
   145 		if( map->iId == aId && map->ixSPContactId == axSPContactId && map->iPbkContactLink )
   146 		if( map->iId == aId && map->ixSPContactId == axSPContactId && map->iPbkContactLink )
   146 			{
   147 			{
   147 			User::LeaveIfError( aPbkContactLinks.Append( map->iPbkContactLink ) );
   148 			User::LeaveIfError( aPbkContactLinks.Append( map->iPbkContactLink ) );
   148 			}
   149 			}
   149 		}
   150 		}
       
   151 	CleanupStack::Pop();
   150 	}		
   152 	}		
   151 
   153 
   152 void CxSPContactManager::GetMappedxSPContactsL( TUint32 aId, 
   154 void CxSPContactManager::GetMappedxSPContactsL( TUint32 aId, 
   153 												const MVPbkContactLink& aPbkContactLink,
   155 												const MVPbkContactLink& aPbkContactLink,
   154         										RArray<TInt32>& axSPContactIds ) const
   156         										RArray<TInt32>& axSPContactIds ) const
   155 	{
   157 	{
       
   158 	CleanupClosePushL( axSPContactIds );
   156 	const TInt count = iContactMap.Count();
   159 	const TInt count = iContactMap.Count();
   157 	for( TInt i = 0; i < count; i++ )
   160 	for( TInt i = 0; i < count; i++ )
   158 		{
   161 		{
   159 		const CxSPPbkContactMap* map = iContactMap[i];
   162 		const CxSPPbkContactMap* map = iContactMap[i];
   160 		if( map->iId == aId && map->iPbkContactLink )
   163 		if( map->iId == aId && map->iPbkContactLink )
   163 				{
   166 				{
   164 				User::LeaveIfError( axSPContactIds.Append( map->ixSPContactId ) );
   167 				User::LeaveIfError( axSPContactIds.Append( map->ixSPContactId ) );
   165 				}
   168 				}
   166 			}			
   169 			}			
   167 		}
   170 		}
       
   171 	CleanupStack::Pop();
   168 	}        										
   172 	}        										
   169 	
   173 	
   170 void CxSPContactManager::ViewActivatedL( const TVwsViewId& aPrevViewId,
   174 void CxSPContactManager::ViewActivatedL( const TVwsViewId& aPrevViewId,
   171                          				TUid aCustomMessageId,
   175                          				TUid aCustomMessageId,
   172                          				const TDesC8& aCustomMessage )
   176                          				const TDesC8& aCustomMessage )