author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@4 | 1 |
/* |
williamr@4 | 2 |
* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). |
williamr@4 | 3 |
* All rights reserved. |
williamr@4 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of "Eclipse Public License v1.0" |
williamr@4 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@4 | 8 |
* |
williamr@4 | 9 |
* Initial Contributors: |
williamr@4 | 10 |
* Nokia Corporation - initial contribution. |
williamr@4 | 11 |
* |
williamr@4 | 12 |
* Contributors: |
williamr@4 | 13 |
* |
williamr@4 | 14 |
* Description: A helper class for mapping field types to Versit |
williamr@4 | 15 |
* or non-Versit types. |
williamr@4 | 16 |
* |
williamr@4 | 17 |
*/ |
williamr@4 | 18 |
|
williamr@4 | 19 |
|
williamr@4 | 20 |
#ifndef TVPBKFIELDTYPEMAPPING_H |
williamr@4 | 21 |
#define TVPBKFIELDTYPEMAPPING_H |
williamr@4 | 22 |
|
williamr@4 | 23 |
#include <vpbkfieldtype.hrh> |
williamr@4 | 24 |
#include <tvpbkfieldversitproperty.h> |
williamr@4 | 25 |
|
williamr@4 | 26 |
class MVPbkFieldType; |
williamr@4 | 27 |
class MVPbkFieldTypeList; |
williamr@4 | 28 |
|
williamr@4 | 29 |
/** |
williamr@4 | 30 |
* A helper class for mapping field types to Versit or non-Versit types. |
williamr@4 | 31 |
* |
williamr@4 | 32 |
* Can be used also for finding a field type from a field type list. |
williamr@4 | 33 |
* @see VPbkFieldType.rh |
williamr@4 | 34 |
* @lib VPbkEng.lib |
williamr@4 | 35 |
*/ |
williamr@4 | 36 |
class TVPbkFieldTypeMapping |
williamr@4 | 37 |
{ |
williamr@4 | 38 |
public: |
williamr@4 | 39 |
/** |
williamr@4 | 40 |
* Constructs this object from a VPBK_FIELD_TYPE_MAPPING resource. |
williamr@4 | 41 |
* |
williamr@4 | 42 |
* @param aReader A resource reader to VPBK_FIELD_TYPE_MAPPING that |
williamr@4 | 43 |
* is defined in VPbkFieldType.rh. |
williamr@4 | 44 |
*/ |
williamr@4 | 45 |
IMPORT_C TVPbkFieldTypeMapping(TResourceReader& aReader); |
williamr@4 | 46 |
|
williamr@4 | 47 |
/** |
williamr@4 | 48 |
* Constructs an empty mapping. |
williamr@4 | 49 |
*/ |
williamr@4 | 50 |
IMPORT_C TVPbkFieldTypeMapping(); |
williamr@4 | 51 |
|
williamr@4 | 52 |
public: // Interface |
williamr@4 | 53 |
/** |
williamr@4 | 54 |
* Returns a field type that matches this type mapping or NULL. |
williamr@4 | 55 |
* |
williamr@4 | 56 |
* @param aFieldTypeList A field type list that is for searching. |
williamr@4 | 57 |
* @return A matched field type or NULL. |
williamr@4 | 58 |
*/ |
williamr@4 | 59 |
IMPORT_C const MVPbkFieldType* FindMatch( |
williamr@4 | 60 |
const MVPbkFieldTypeList& aFieldTypeList) const; |
williamr@4 | 61 |
|
williamr@4 | 62 |
/** |
williamr@4 | 63 |
* Sets the Versit property of this field type mapping. |
williamr@4 | 64 |
* |
williamr@4 | 65 |
* @param aVersitProperty A new Versit property for the mapping. |
williamr@4 | 66 |
*/ |
williamr@4 | 67 |
IMPORT_C void SetVersitProperty( |
williamr@4 | 68 |
TVPbkFieldVersitProperty aVersitProperty); |
williamr@4 | 69 |
|
williamr@4 | 70 |
/** |
williamr@4 | 71 |
* Sets the non-Versit type of this field type mapping. |
williamr@4 | 72 |
* |
williamr@4 | 73 |
* @param aNonVersitType A new non-Versit type. |
williamr@4 | 74 |
*/ |
williamr@4 | 75 |
IMPORT_C void SetNonVersitType( |
williamr@4 | 76 |
TVPbkNonVersitFieldType aNonVersitType); |
williamr@4 | 77 |
|
williamr@4 | 78 |
private: // Data |
williamr@4 | 79 |
///Own: Versit property |
williamr@4 | 80 |
TVPbkFieldVersitProperty iVersitProperty; |
williamr@4 | 81 |
///Own: non-Versit property |
williamr@4 | 82 |
TVPbkNonVersitFieldType iNonVersitType; |
williamr@4 | 83 |
///Own: Spare for future extension |
williamr@4 | 84 |
TAny* iSpare; |
williamr@4 | 85 |
}; |
williamr@4 | 86 |
|
williamr@4 | 87 |
#endif // TVPBKFIELDTYPEMAPPING_H |
williamr@4 | 88 |
|
williamr@4 | 89 |
//End of file |