epoc32/include/app/MPbk2FieldProperty.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/app/MPbk2FieldProperty.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,172 @@
     1.4 +/*
     1.5 +* Copyright (c) 2005-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:  Phonebook 2 field property interface.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef MPBK2FIELDPROPERTY_H
    1.23 +#define MPBK2FIELDPROPERTY_H
    1.24 +
    1.25 +// INCLUDE FILES
    1.26 +#include <e32def.h>
    1.27 +#include <pbk2fieldproperty.hrh>
    1.28 +
    1.29 +// FORWARD DECLARATIONS
    1.30 +class MVPbkFieldType;
    1.31 +class TPbk2IconId;
    1.32 +
    1.33 +//Use this UID to access field property interface extension 2. Used as
    1.34 +//a parameter to FieldPropertyExtension() method.
    1.35 +const TUid KMPbk2FieldPropertyExtension2Uid = { 2 };
    1.36 +
    1.37 +/**
    1.38 + * Phonebook 2 field property interface.
    1.39 + *
    1.40 + * Field property defines data for contact field presentation
    1.41 + * in the UI. 
    1.42 + */
    1.43 +class MPbk2FieldProperty
    1.44 +    {
    1.45 +    public: // Interface
    1.46 +
    1.47 +        /**
    1.48 +         * Compares two field properties.
    1.49 +         *
    1.50 +         * @param aOther    The property to compare
    1.51 +         * @return  ETrue if properties are the same.
    1.52 +         */
    1.53 +        virtual TBool IsSame(
    1.54 +            const MPbk2FieldProperty& aOther ) const = 0;
    1.55 +
    1.56 +        /**
    1.57 +         * Returns the field type of the property
    1.58 +         *
    1.59 +         * @return  The field type this property links to.
    1.60 +         */
    1.61 +        virtual const MVPbkFieldType& FieldType() const = 0;
    1.62 +
    1.63 +        /**
    1.64 +         * Returns the multiplicity information
    1.65 +         *
    1.66 +         * @return  Multiplicity property which tells that can
    1.67 +         *          there be several fields of this type in the contact.
    1.68 +         */
    1.69 +        virtual TPbk2FieldMultiplicity Multiplicity() const = 0;
    1.70 +
    1.71 +        /**
    1.72 +         * Returns the maximum length of the field.
    1.73 +         *
    1.74 +         * @return  Static maximum length of the field. Note, that the
    1.75 +         *          contact store can have it's own limits.
    1.76 +         */
    1.77 +        virtual TInt MaxLength() const = 0;
    1.78 +
    1.79 +        /**
    1.80 +         * Returns the editing mode for the field editor.
    1.81 +         *
    1.82 +         * @return  Field editing mode..
    1.83 +         */
    1.84 +        virtual TPbk2FieldEditMode EditMode() const = 0;
    1.85 +
    1.86 +        /**
    1.87 +         * Returns the default character case for the field editor.
    1.88 +         *
    1.89 +         * @return  Default character case.
    1.90 +         */
    1.91 +        virtual TPbk2FieldDefaultCase DefaultCase() const = 0;
    1.92 +
    1.93 +        /**
    1.94 +         * Returns the icon id for the field.
    1.95 +         *
    1.96 +         * @return  Icon id.
    1.97 +         */
    1.98 +        virtual const TPbk2IconId& IconId() const = 0;
    1.99 +
   1.100 +        /**
   1.101 +         * Returns the type of the field editor.
   1.102 +         *
   1.103 +         * @return  Type of the field editor (text, date, number etc.).
   1.104 +         */
   1.105 +        virtual TPbk2FieldCtrlType CtrlType() const = 0;
   1.106 +
   1.107 +        /**
   1.108 +         * Returns the field property flags defined in
   1.109 +         * Pbk2FieldProperty.hrh.
   1.110 +         *
   1.111 +         * @return  Field property flags.
   1.112 +         */
   1.113 +        virtual TUint Flags() const = 0;
   1.114 +
   1.115 +        /**
   1.116 +         * Returns the field ordering item.
   1.117 +         *
   1.118 +         * @return  Number that defines the ordering of the field.
   1.119 +         */
   1.120 +        virtual TInt OrderingItem() const = 0;
   1.121 +
   1.122 +        /**
   1.123 +         * Returns the field ordering item in 'add item' dialog.
   1.124 +         *
   1.125 +         * @return  Number that defines the ordering of the field
   1.126 +         *          in the contact editor add item dialog.
   1.127 +         */
   1.128 +        virtual TInt AddItemOrdering() const = 0;
   1.129 +
   1.130 +        /**
   1.131 +         * Returns field 'add item' text, or the default label if
   1.132 +         * there is no 'add item' text defined.
   1.133 +         *
   1.134 +         * @return  Add item text or the default label.
   1.135 +         */
   1.136 +        virtual const TDesC& AddItemText() const = 0;
   1.137 +
   1.138 +        /**
   1.139 +         * Returns the location of the field.
   1.140 +         *
   1.141 +         * @return  Location of the field (home, work, etc.).
   1.142 +         */
   1.143 +        virtual TPbk2FieldLocation Location() const = 0;
   1.144 +
   1.145 +        /**
   1.146 +         * Returns the group id of the property.
   1.147 +         *
   1.148 +         * @return  Group id.
   1.149 +         */
   1.150 +        virtual TPbk2FieldGroupId GroupId() const = 0;
   1.151 +
   1.152 +        /**
   1.153 +         * Returns the default label that should be used if the store
   1.154 +         * doesn't define a label.
   1.155 +         *
   1.156 +         * @return  Default label.
   1.157 +         */
   1.158 +        virtual const TDesC& DefaultLabel() const = 0;
   1.159 +
   1.160 +        /**
   1.161 +         * Returns an extension point for this interface or NULL.
   1.162 +         *
   1.163 +         * @param aExtensionUid     Extension UID.
   1.164 +         * @return  Extension point.
   1.165 +         */
   1.166 +        virtual TAny* FieldPropertyExtension(
   1.167 +                TUid /*aExtensionUid*/ )
   1.168 +            {
   1.169 +            return NULL;
   1.170 +            }
   1.171 +    };
   1.172 +
   1.173 +#endif // MPBK2FIELDPROPERTY_H
   1.174 +
   1.175 +// End of File