uiservicetab/vimpstcmdprocess/src/cvimpstcmdaddfrompbk.cpp
branchRCL_3
changeset 10 78867dafe7eb
parent 0 5e5d6b214f4f
child 14 9fdee5e1da30
equal deleted inserted replaced
4:f5911524345e 10:78867dafe7eb
   176        
   176        
   177         const MVPbkStoreContactField& field = fieldCollection.FieldAt( index );
   177         const MVPbkStoreContactField& field = fieldCollection.FieldAt( index );
   178         const MVPbkFieldType* fieldType = field.BestMatchingFieldType();
   178         const MVPbkFieldType* fieldType = field.BestMatchingFieldType();
   179         
   179         
   180         //find the relevant voip fields/email id fileds.
   180         //find the relevant voip fields/email id fileds.
   181         if ( fieldType &&  
   181         if ( fieldType )
   182             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPHOME ) || 
   182             {  
       
   183             if ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPHOME ) || 
   183             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPWORK ) || 
   184             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPWORK ) || 
   184             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPGEN ) ||
   185             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPGEN ) ||
   185             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_SIP )||
   186             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_SIP )||
   186             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILWORK ) ||
   187             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILWORK ) ||
   187             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILHOME ) ||
   188             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILHOME ) ||
   188             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILGEN ))
   189             ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILGEN ))
   189             {
       
   190             CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL]  ->  GetServiceFieldsL - Found");
       
   191             values[0] = MVPbkContactFieldTextData::Cast( 
       
   192                     iStoreContact.Fields().FieldAt( index ).
       
   193                     FieldData() ).Text().AllocLC();
       
   194             if ( values[0] )
       
   195                 {
   190                 {
   196                 // Check for prefix and remove if found
   191                 CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL]  ->  GetServiceFieldsL - Found");
   197                 TInt prefixLocation = values[0]->Locate( ':' );
   192                 values[0] = MVPbkContactFieldTextData::Cast( 
   198                 if ( KErrNotFound != prefixLocation )
   193                 iStoreContact.Fields().FieldAt( index ).
       
   194                 FieldData() ).Text().AllocLC();
       
   195                 if ( values[0] )
   199                     {
   196                     {
   200                     CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL]  ->  Prefix found -> remove");
   197                     // Check for prefix and remove if found
   201                     aArrayForServiceFields.AppendL( values[0]->Des().Mid(
   198                     TInt prefixLocation = values[0]->Locate( ':' );
       
   199                     if ( KErrNotFound != prefixLocation )
       
   200                         {
       
   201                         CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL]  ->  Prefix found -> remove");
       
   202                         aArrayForServiceFields.AppendL( values[0]->Des().Mid(
   202                         prefixLocation+1 ) );
   203                         prefixLocation+1 ) );
       
   204                         }
       
   205                     else
       
   206                         {
       
   207                         CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL]  ->  No Prefix found");
       
   208                         aArrayForServiceFields.AppendL( values[0]->Des() );    
       
   209                         }
       
   210                     CleanupStack::PopAndDestroy( values[0] );
   203                     }
   211                     }
   204                 else
       
   205                     {
       
   206                     CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL]  ->  No Prefix found");
       
   207                     aArrayForServiceFields.AppendL( values[0]->Des() );    
       
   208                     }
       
   209                 CleanupStack::PopAndDestroy( values[0] );
       
   210                 }
   212                 }
   211             }
   213             }
   212         }   
   214         }   
   213     }        
   215     }        
   214     
   216