epoc32/include/app/TVPbkFieldTypeMapping.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/app/TVPbkFieldTypeMapping.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,89 @@
     1.4 +/*
     1.5 +* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  A helper class for mapping field types to Versit 
    1.18 +*                or non-Versit types.           
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef TVPBKFIELDTYPEMAPPING_H
    1.24 +#define TVPBKFIELDTYPEMAPPING_H
    1.25 +
    1.26 +#include <vpbkfieldtype.hrh>
    1.27 +#include <tvpbkfieldversitproperty.h>
    1.28 +
    1.29 +class MVPbkFieldType;
    1.30 +class MVPbkFieldTypeList;
    1.31 +
    1.32 +/**
    1.33 + * A helper class for mapping field types to Versit or non-Versit types.
    1.34 + *
    1.35 + * Can be used also for finding a field type from a field type list.
    1.36 + * @see VPbkFieldType.rh
    1.37 + * @lib VPbkEng.lib
    1.38 + */
    1.39 +class TVPbkFieldTypeMapping
    1.40 +    {
    1.41 +    public:
    1.42 +        /**
    1.43 +         * Constructs this object from a VPBK_FIELD_TYPE_MAPPING resource.
    1.44 +         *
    1.45 +         * @param aReader A resource reader to VPBK_FIELD_TYPE_MAPPING that
    1.46 +         *                is defined in VPbkFieldType.rh.
    1.47 +         */
    1.48 +        IMPORT_C TVPbkFieldTypeMapping(TResourceReader& aReader);
    1.49 +
    1.50 +        /**
    1.51 +         * Constructs an empty mapping.
    1.52 +         */
    1.53 +        IMPORT_C TVPbkFieldTypeMapping();
    1.54 +        
    1.55 +    public: // Interface
    1.56 +        /**
    1.57 +         * Returns a field type that matches this type mapping or NULL.
    1.58 +         *
    1.59 +         * @param aFieldTypeList A field type list that is for searching.
    1.60 +         * @return A matched field type or NULL.
    1.61 +         */
    1.62 +        IMPORT_C const MVPbkFieldType* FindMatch(
    1.63 +                const MVPbkFieldTypeList& aFieldTypeList) const;
    1.64 +
    1.65 +        /**
    1.66 +         * Sets the Versit property of this field type mapping.
    1.67 +         *
    1.68 +         * @param aVersitProperty A new Versit property for the mapping.
    1.69 +         */
    1.70 +        IMPORT_C void SetVersitProperty(
    1.71 +                TVPbkFieldVersitProperty aVersitProperty);
    1.72 +
    1.73 +        /**
    1.74 +         * Sets the non-Versit type of this field type mapping.
    1.75 +         *
    1.76 +         * @param aNonVersitType A new non-Versit type.
    1.77 +         */
    1.78 +        IMPORT_C void SetNonVersitType(
    1.79 +                TVPbkNonVersitFieldType aNonVersitType);
    1.80 +
    1.81 +    private: // Data
    1.82 +        ///Own: Versit property
    1.83 +        TVPbkFieldVersitProperty iVersitProperty;
    1.84 +        ///Own: non-Versit property
    1.85 +        TVPbkNonVersitFieldType iNonVersitType;
    1.86 +        ///Own: Spare for future extension
    1.87 +        TAny* iSpare;
    1.88 +	};
    1.89 +
    1.90 +#endif // TVPBKFIELDTYPEMAPPING_H
    1.91 +
    1.92 +//End of file