phonebookengines/contactsmodel/cntvcard/cntvcardimport.cpp
changeset 24 0ba2181d7c28
parent 0 e686773b3f54
child 37 fd64c38c277d
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 /*
     2 // All rights reserved.
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // This component and the accompanying materials are made available
     3 * All rights reserved.
     4 // under the terms of "Eclipse Public License v1.0"
     4 * This component and the accompanying materials are made available
     5 // which accompanies this distribution, and is available
     5 * under the terms of "Eclipse Public License v1.0"
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 * which accompanies this distribution, and is available
     7 //
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 // Initial Contributors:
     8 *
     9 // Nokia Corporation - initial contribution.
     9 * Initial Contributors:
    10 //
    10 * Nokia Corporation - initial contribution.
    11 // Contributors:
    11 *
    12 //
    12 * Contributors:
    13 // Description:
    13 *
    14 //
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
    15 
    18 
    16 #include "cntvcardutils.h"
    19 #include "cntvcardutils.h"
    17 
    20 
    18 // System includes
    21 // System includes
    19 #include <badesca.h>
    22 #include <badesca.h>
    24 // User includes
    27 // User includes
    25 #include <cntfldst.h>
    28 #include <cntfldst.h>
    26 #include <cntfield.h>
    29 #include <cntfield.h>
    27 #include <cntdef.h>
    30 #include <cntdef.h>
    28 #include <cntitem.h>
    31 #include <cntitem.h>
    29 
       
    30 
    32 
    31 // Constants
    33 // Constants
    32 const TInt KVCardImportAddressArrayGranularity = 4;
    34 const TInt KVCardImportAddressArrayGranularity = 4;
    33 const TInt KContactGivenName = 1;
    35 const TInt KContactGivenName = 1;
    34 const TInt KContactFamilyName = 0;
    36 const TInt KContactFamilyName = 0;
    40 const TInt KContactAddress = 2;
    42 const TInt KContactAddress = 2;
    41 const TInt KContactLocality = 3;
    43 const TInt KContactLocality = 3;
    42 const TInt KContactRegion = 4;
    44 const TInt KContactRegion = 4;
    43 const TInt KContactPostcode = 5;
    45 const TInt KContactPostcode = 5;
    44 const TInt KContactCountry = 6;
    46 const TInt KContactCountry = 6;
    45 
       
    46 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    47 const TInt KContactMaxFieldNumber = 32;
       
    48 #endif
       
    49 
    47 
    50 /**
    48 /**
    51  * Delete name fields from a contact
    49  * Delete name fields from a contact
    52  *
    50  *
    53  * @param aContact Contact item
    51  * @param aContact Contact item
  1439     	if(vpropNameConst.CompareF(KVersitTokenTZ) == 0)
  1437     	if(vpropNameConst.CompareF(KVersitTokenTZ) == 0)
  1440     		{
  1438     		{
  1441     		mapping=KUidContactFieldVCardMapNotRequired;
  1439     		mapping=KUidContactFieldVCardMapNotRequired;
  1442     		}
  1440     		}
  1443     	break;
  1441     	break;
  1444 //
  1442 //////////////
  1445     default:	// aka case KVersitPropertyHBufCUid:
  1443     default:	// aka case KVersitPropertyHBufCUid:
  1446     	aStorageType=KStorageTypeText;
  1444     	aStorageType=KStorageTypeText;
  1447 		mapping = KUidContactFieldVCardMapUnknown; // Initialize to something sensible
  1445 		mapping = KUidContactFieldVCardMapUnknown; // Initialize to something sensible
  1448 		switch (vpropNameConst[0])
  1446 		switch (vpropNameConst[0])
  1449 			{
  1447 			{