phonebookengines/VirtualPhonebook/VPbkSimStoreImpl/src/CVPbkSimContact.cpp
branchRCL_3
changeset 18 d4f567ce2e7c
parent 0 e686773b3f54
equal deleted inserted replaced
17:2666d9724c76 18:d4f567ce2e7c
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
       
    21 #include <featmgr.h>
    21 #include "CVPbkSimContact.h"
    22 #include "CVPbkSimContact.h"
    22 
    23 
    23 #include "CVPbkSimCntField.h"
    24 #include "CVPbkSimCntField.h"
    24 #include "MVPbkSimCntStore.h"
    25 #include "MVPbkSimCntStore.h"
    25 #include "CVPbkETelCntConverter.h"
    26 #include "CVPbkETelCntConverter.h"
    48 void CVPbkSimContact::ConstructL( const TDesC8* aETelContact )
    49 void CVPbkSimContact::ConstructL( const TDesC8* aETelContact )
    49     {
    50     {
    50     if ( aETelContact )
    51     if ( aETelContact )
    51         {
    52         {
    52         SetL( *aETelContact );
    53         SetL( *aETelContact );
       
    54         if( FeatureManager::FeatureSupported( KFeatureIdFfTdClmcontactreplicationfromphonebooktousimcard ) )
       
    55         	{
       
    56 			IndentifyAdditionalFields();
       
    57         	}
    53         }
    58         }
    54     }
    59     }
    55 
    60 
    56 // -----------------------------------------------------------------------------
    61 // -----------------------------------------------------------------------------
    57 // CVPbkSimContact::NewL
    62 // CVPbkSimContact::NewL
   232         ptr, *this );
   237         ptr, *this );
   233     CleanupStack::PopAndDestroy( buf );
   238     CleanupStack::PopAndDestroy( buf );
   234     }
   239     }
   235 
   240 
   236 // -----------------------------------------------------------------------------
   241 // -----------------------------------------------------------------------------
       
   242 // CVPbkSimContact::IndentifyAdditionalFields()
       
   243 // -----------------------------------------------------------------------------
       
   244 //
       
   245 void CVPbkSimContact::IndentifyAdditionalFields()
       
   246     {
       
   247     TInt anrNumberFieldCount = 0;
       
   248     for( int i = 0; i < iFieldArray.Count(); i ++ )
       
   249         {
       
   250         if( iFieldArray[i]->Type() == EVPbkSimAdditionalNumber )
       
   251             {
       
   252             anrNumberFieldCount ++;
       
   253             switch( anrNumberFieldCount )
       
   254                 {
       
   255                 case 1:
       
   256                     iFieldArray[i]->SetType( EVPbkSimAdditionalNumber1 );
       
   257                     break;
       
   258                 case 2:
       
   259                     iFieldArray[i]->SetType( EVPbkSimAdditionalNumber2 );
       
   260                     break;
       
   261                 case 3:
       
   262                     iFieldArray[i]->SetType( EVPbkSimAdditionalNumber3 );
       
   263                     break;
       
   264                 default:
       
   265                     iFieldArray[i]->SetType( EVPbkSimAdditionalNumberLast );
       
   266                     break;
       
   267                 }
       
   268             }
       
   269         }
       
   270     }
       
   271 
       
   272 // -----------------------------------------------------------------------------
   237 // CVPbkSimContact::CreateETelContactL
   273 // CVPbkSimContact::CreateETelContactL
   238 // -----------------------------------------------------------------------------
   274 // -----------------------------------------------------------------------------
   239 // 
   275 // 
   240 void CVPbkSimContact::CreateETelContactL() const
   276 void CVPbkSimContact::CreateETelContactL() const
   241     {
   277     {