phonebookui/Phonebook/BCardEng/inc/TBCardPropertyAdapter.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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 *    CPbkFieldInfo export type <-> MPbkVcardProperty adapter.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __TBCARDPROPERTYADAPTER_H__
       
    21 #define __TBCARDPROPERTYADAPTER_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32def.h> // Basic Symbian OS types
       
    25 #include "MPbkVcardProperty.h"
       
    26 #include "MPbkVcardParameters.h"
       
    27 
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CParserProperty;
       
    31 class CBCardFieldUidMapping;
       
    32 class CBCardParserProperty;
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * Maps a CParserProperty to a MPbkVcardProperty.
       
    39  */
       
    40 NONSHARABLE_CLASS(TBCardPropertyAdapter) : 
       
    41         public MPbkVcardProperty,
       
    42         private MPbkVcardParameters
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45         /**
       
    46          * Constructor.
       
    47 		 * @param aProperty the property
       
    48 		 * @param aFieldIndex index of the field
       
    49 		 * @param aFieldUidMapping UID mapping of the field
       
    50          */
       
    51         TBCardPropertyAdapter
       
    52             (const CParserProperty& aProperty, 
       
    53             TInt aFieldIndex,
       
    54             const CBCardFieldUidMapping& aFieldUidMapping);
       
    55 
       
    56         /**
       
    57          * Destructor.
       
    58          */
       
    59         ~TBCardPropertyAdapter();
       
    60 
       
    61      public:  // from MPbkVcardProperty
       
    62          TUid PropertyName() const;
       
    63          const MPbkVcardParameters& PropertyParameters() const;
       
    64 
       
    65     private: // from MPbkVcardParameters
       
    66         TInt ParameterCount() const;
       
    67         TUid ParameterAt(TInt aIndex) const;
       
    68         
       
    69     private:  // Data
       
    70 		/// Ref: the property
       
    71         const CBCardParserProperty& iProperty;
       
    72 		/// Own: index of the field
       
    73         const TInt iFieldIndex;
       
    74 		/// Ref: UID mapping of the field
       
    75         const CBCardFieldUidMapping& iFieldUidMapping;
       
    76     };
       
    77 
       
    78 
       
    79 #endif // __TBCARDPROPERTYADAPTER_H__
       
    80 
       
    81 // End of File