2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: A helper class for mapping field types to Versit
15 * or non-Versit types.
20 #ifndef TVPBKFIELDTYPEMAPPING_H
21 #define TVPBKFIELDTYPEMAPPING_H
23 #include <vpbkfieldtype.hrh>
24 #include <tvpbkfieldversitproperty.h>
27 class MVPbkFieldTypeList;
30 * A helper class for mapping field types to Versit or non-Versit types.
32 * Can be used also for finding a field type from a field type list.
33 * @see VPbkFieldType.rh
36 class TVPbkFieldTypeMapping
40 * Constructs this object from a VPBK_FIELD_TYPE_MAPPING resource.
42 * @param aReader A resource reader to VPBK_FIELD_TYPE_MAPPING that
43 * is defined in VPbkFieldType.rh.
45 IMPORT_C TVPbkFieldTypeMapping(TResourceReader& aReader);
48 * Constructs an empty mapping.
50 IMPORT_C TVPbkFieldTypeMapping();
54 * Returns a field type that matches this type mapping or NULL.
56 * @param aFieldTypeList A field type list that is for searching.
57 * @return A matched field type or NULL.
59 IMPORT_C const MVPbkFieldType* FindMatch(
60 const MVPbkFieldTypeList& aFieldTypeList) const;
63 * Sets the Versit property of this field type mapping.
65 * @param aVersitProperty A new Versit property for the mapping.
67 IMPORT_C void SetVersitProperty(
68 TVPbkFieldVersitProperty aVersitProperty);
71 * Sets the non-Versit type of this field type mapping.
73 * @param aNonVersitType A new non-Versit type.
75 IMPORT_C void SetNonVersitType(
76 TVPbkNonVersitFieldType aNonVersitType);
79 ///Own: Versit property
80 TVPbkFieldVersitProperty iVersitProperty;
81 ///Own: non-Versit property
82 TVPbkNonVersitFieldType iNonVersitType;
83 ///Own: Spare for future extension
87 #endif // TVPBKFIELDTYPEMAPPING_H