phonebookengines/VirtualPhonebook/VPbkVCardEng/inc/TVPbkVCardFieldTypeMapping.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TVPBKVCARDFIELDTYPEMAPPING_H
       
    20 #define TVPBKVCARDFIELDTYPEMAPPING_H
       
    21 
       
    22 #include <VPbkFieldType.hrh>
       
    23 #include <TVPbkFieldVersitProperty.h>
       
    24 
       
    25 class MVPbkFieldType;
       
    26 class MVPbkFieldTypeList;
       
    27 class TVPbkFieldTypeParameters;
       
    28 namespace VPbkEngUtils
       
    29     {
       
    30     class CTextStore;    
       
    31     }
       
    32 
       
    33 NONSHARABLE_CLASS( TVPbkVCardFieldTypeMapping )
       
    34     {
       
    35     public:
       
    36         void InitializeL
       
    37             ( TResourceReader& aResReader,
       
    38               VPbkEngUtils::CTextStore& aTextStore );
       
    39 
       
    40     public:
       
    41         /**
       
    42          * Returns a field type that matches this type mapping.
       
    43          */
       
    44         const MVPbkFieldType* FindMatch
       
    45             ( const MVPbkFieldTypeList& aFieldTypeList ) const;
       
    46 
       
    47         /**
       
    48          * Returns the versit property name.
       
    49          */
       
    50         inline TVPbkFieldTypeName Name() const;
       
    51 
       
    52         /**
       
    53          * Returns the versit property subfield.
       
    54          */
       
    55         inline TVPbkSubFieldType SubField() const;
       
    56 
       
    57         /**
       
    58          * Returns the versit property parameters (read-only).
       
    59          */
       
    60         inline const TVPbkFieldTypeParameters& Parameters() const;
       
    61 
       
    62         /**
       
    63          * Returns the versit property parameters (read-write).
       
    64          */
       
    65         inline TVPbkFieldTypeParameters& Parameters();
       
    66 
       
    67         /**
       
    68          * Returns the versit extension name.
       
    69          */
       
    70         inline TPtrC8 ExtensionName() const;        
       
    71         
       
    72         inline TVPbkNonVersitFieldType NonVersitType() const;
       
    73         
       
    74     private:    
       
    75         TVPbkFieldVersitProperty iVersitProperty;
       
    76         TVPbkNonVersitFieldType iNonVersitType;
       
    77     };
       
    78     
       
    79 inline TVPbkFieldTypeName TVPbkVCardFieldTypeMapping::Name() const
       
    80     {
       
    81     return iVersitProperty.Name();
       
    82     }
       
    83 
       
    84 inline TVPbkSubFieldType TVPbkVCardFieldTypeMapping::SubField() const
       
    85     {
       
    86     return iVersitProperty.SubField();
       
    87     }
       
    88 
       
    89 inline const TVPbkFieldTypeParameters& TVPbkVCardFieldTypeMapping::Parameters
       
    90         ( ) const
       
    91     {
       
    92     return iVersitProperty.Parameters();
       
    93     }
       
    94 
       
    95 inline TVPbkFieldTypeParameters& TVPbkVCardFieldTypeMapping::Parameters()
       
    96     {
       
    97     return iVersitProperty.Parameters();
       
    98     }
       
    99 
       
   100 inline TPtrC8 TVPbkVCardFieldTypeMapping::ExtensionName() const
       
   101     {
       
   102     return iVersitProperty.ExtensionName();
       
   103     }    
       
   104     
       
   105 inline TVPbkNonVersitFieldType TVPbkVCardFieldTypeMapping::NonVersitType() const
       
   106     {
       
   107     return iNonVersitType;
       
   108     }
       
   109     
       
   110 #endif // TVPBKVCARDFIELDTYPEMAPPING_H
       
   111 
       
   112 // End of file
       
   113