63
|
1 |
/*
|
|
2 |
* Copyright (c) 2004-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: A helper class for mapping field types to Versit
|
|
15 |
* or non-Versit types.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef TVPBKFIELDTYPEMAPPING_H
|
|
21 |
#define TVPBKFIELDTYPEMAPPING_H
|
|
22 |
|
|
23 |
#include <VPbkFieldType.hrh>
|
|
24 |
#include <TVPbkFieldVersitProperty.h>
|
|
25 |
|
|
26 |
class MVPbkFieldType;
|
|
27 |
class MVPbkFieldTypeList;
|
|
28 |
|
|
29 |
/**
|
|
30 |
* A helper class for mapping field types to Versit or non-Versit types.
|
|
31 |
*
|
|
32 |
* Can be used also for finding a field type from a field type list.
|
|
33 |
* @see VPbkFieldType.rh
|
|
34 |
* @lib VPbkEng.lib
|
|
35 |
*/
|
|
36 |
class TVPbkFieldTypeMapping
|
|
37 |
{
|
|
38 |
public:
|
|
39 |
/**
|
|
40 |
* Constructs this object from a VPBK_FIELD_TYPE_MAPPING resource.
|
|
41 |
*
|
|
42 |
* @param aReader A resource reader to VPBK_FIELD_TYPE_MAPPING that
|
|
43 |
* is defined in VPbkFieldType.rh.
|
|
44 |
*/
|
|
45 |
IMPORT_C TVPbkFieldTypeMapping(TResourceReader& aReader);
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Constructs an empty mapping.
|
|
49 |
*/
|
|
50 |
IMPORT_C TVPbkFieldTypeMapping();
|
|
51 |
|
|
52 |
public: // Interface
|
|
53 |
/**
|
|
54 |
* Returns a field type that matches this type mapping or NULL.
|
|
55 |
*
|
|
56 |
* @param aFieldTypeList A field type list that is for searching.
|
|
57 |
* @return A matched field type or NULL.
|
|
58 |
*/
|
|
59 |
IMPORT_C const MVPbkFieldType* FindMatch(
|
|
60 |
const MVPbkFieldTypeList& aFieldTypeList) const;
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Sets the Versit property of this field type mapping.
|
|
64 |
*
|
|
65 |
* @param aVersitProperty A new Versit property for the mapping.
|
|
66 |
*/
|
|
67 |
IMPORT_C void SetVersitProperty(
|
|
68 |
TVPbkFieldVersitProperty aVersitProperty);
|
|
69 |
|
|
70 |
/**
|
|
71 |
* Sets the non-Versit type of this field type mapping.
|
|
72 |
*
|
|
73 |
* @param aNonVersitType A new non-Versit type.
|
|
74 |
*/
|
|
75 |
IMPORT_C void SetNonVersitType(
|
|
76 |
TVPbkNonVersitFieldType aNonVersitType);
|
|
77 |
|
|
78 |
private: // Data
|
|
79 |
///Own: Versit property
|
|
80 |
TVPbkFieldVersitProperty iVersitProperty;
|
|
81 |
///Own: non-Versit property
|
|
82 |
TVPbkNonVersitFieldType iNonVersitType;
|
|
83 |
///Own: Spare for future extension
|
|
84 |
TAny* iSpare;
|
|
85 |
};
|
|
86 |
|
|
87 |
#endif // TVPBKFIELDTYPEMAPPING_H
|
|
88 |
|
|
89 |
//End of file
|