2 * Copyright (c) 2005-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: Phonebook 2 field property interface.
19 #ifndef MPBK2FIELDPROPERTY_H
20 #define MPBK2FIELDPROPERTY_H
24 #include <pbk2fieldproperty.hrh>
26 // FORWARD DECLARATIONS
30 //Use this UID to access field property interface extension 2. Used as
31 //a parameter to FieldPropertyExtension() method.
32 const TUid KMPbk2FieldPropertyExtension2Uid = { 2 };
35 * Phonebook 2 field property interface.
37 * Field property defines data for contact field presentation
40 class MPbk2FieldProperty
45 * Compares two field properties.
47 * @param aOther The property to compare
48 * @return ETrue if properties are the same.
51 const MPbk2FieldProperty& aOther ) const = 0;
54 * Returns the field type of the property
56 * @return The field type this property links to.
58 virtual const MVPbkFieldType& FieldType() const = 0;
61 * Returns the multiplicity information
63 * @return Multiplicity property which tells that can
64 * there be several fields of this type in the contact.
66 virtual TPbk2FieldMultiplicity Multiplicity() const = 0;
69 * Returns the maximum length of the field.
71 * @return Static maximum length of the field. Note, that the
72 * contact store can have it's own limits.
74 virtual TInt MaxLength() const = 0;
77 * Returns the editing mode for the field editor.
79 * @return Field editing mode..
81 virtual TPbk2FieldEditMode EditMode() const = 0;
84 * Returns the default character case for the field editor.
86 * @return Default character case.
88 virtual TPbk2FieldDefaultCase DefaultCase() const = 0;
91 * Returns the icon id for the field.
95 virtual const TPbk2IconId& IconId() const = 0;
98 * Returns the type of the field editor.
100 * @return Type of the field editor (text, date, number etc.).
102 virtual TPbk2FieldCtrlType CtrlType() const = 0;
105 * Returns the field property flags defined in
106 * Pbk2FieldProperty.hrh.
108 * @return Field property flags.
110 virtual TUint Flags() const = 0;
113 * Returns the field ordering item.
115 * @return Number that defines the ordering of the field.
117 virtual TInt OrderingItem() const = 0;
120 * Returns the field ordering item in 'add item' dialog.
122 * @return Number that defines the ordering of the field
123 * in the contact editor add item dialog.
125 virtual TInt AddItemOrdering() const = 0;
128 * Returns field 'add item' text, or the default label if
129 * there is no 'add item' text defined.
131 * @return Add item text or the default label.
133 virtual const TDesC& AddItemText() const = 0;
136 * Returns the location of the field.
138 * @return Location of the field (home, work, etc.).
140 virtual TPbk2FieldLocation Location() const = 0;
143 * Returns the group id of the property.
147 virtual TPbk2FieldGroupId GroupId() const = 0;
150 * Returns the default label that should be used if the store
151 * doesn't define a label.
153 * @return Default label.
155 virtual const TDesC& DefaultLabel() const = 0;
158 * Returns an extension point for this interface or NULL.
160 * @param aExtensionUid Extension UID.
161 * @return Extension point.
163 virtual TAny* FieldPropertyExtension(
164 TUid /*aExtensionUid*/ )
170 #endif // MPBK2FIELDPROPERTY_H