|
1 /* |
|
2 * Copyright (c) 2005-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: Phonebook 2 field property interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MPBK2FIELDPROPERTY_H |
|
20 #define MPBK2FIELDPROPERTY_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <e32def.h> |
|
24 #include <pbk2fieldproperty.hrh> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MVPbkFieldType; |
|
28 class TPbk2IconId; |
|
29 |
|
30 //Use this UID to access field property interface extension 2. Used as |
|
31 //a parameter to FieldPropertyExtension() method. |
|
32 const TUid KMPbk2FieldPropertyExtension2Uid = { 2 }; |
|
33 |
|
34 /** |
|
35 * Phonebook 2 field property interface. |
|
36 * |
|
37 * Field property defines data for contact field presentation |
|
38 * in the UI. |
|
39 */ |
|
40 class MPbk2FieldProperty |
|
41 { |
|
42 public: // Interface |
|
43 |
|
44 /** |
|
45 * Compares two field properties. |
|
46 * |
|
47 * @param aOther The property to compare |
|
48 * @return ETrue if properties are the same. |
|
49 */ |
|
50 virtual TBool IsSame( |
|
51 const MPbk2FieldProperty& aOther ) const = 0; |
|
52 |
|
53 /** |
|
54 * Returns the field type of the property |
|
55 * |
|
56 * @return The field type this property links to. |
|
57 */ |
|
58 virtual const MVPbkFieldType& FieldType() const = 0; |
|
59 |
|
60 /** |
|
61 * Returns the multiplicity information |
|
62 * |
|
63 * @return Multiplicity property which tells that can |
|
64 * there be several fields of this type in the contact. |
|
65 */ |
|
66 virtual TPbk2FieldMultiplicity Multiplicity() const = 0; |
|
67 |
|
68 /** |
|
69 * Returns the maximum length of the field. |
|
70 * |
|
71 * @return Static maximum length of the field. Note, that the |
|
72 * contact store can have it's own limits. |
|
73 */ |
|
74 virtual TInt MaxLength() const = 0; |
|
75 |
|
76 /** |
|
77 * Returns the editing mode for the field editor. |
|
78 * |
|
79 * @return Field editing mode.. |
|
80 */ |
|
81 virtual TPbk2FieldEditMode EditMode() const = 0; |
|
82 |
|
83 /** |
|
84 * Returns the default character case for the field editor. |
|
85 * |
|
86 * @return Default character case. |
|
87 */ |
|
88 virtual TPbk2FieldDefaultCase DefaultCase() const = 0; |
|
89 |
|
90 /** |
|
91 * Returns the icon id for the field. |
|
92 * |
|
93 * @return Icon id. |
|
94 */ |
|
95 virtual const TPbk2IconId& IconId() const = 0; |
|
96 |
|
97 /** |
|
98 * Returns the type of the field editor. |
|
99 * |
|
100 * @return Type of the field editor (text, date, number etc.). |
|
101 */ |
|
102 virtual TPbk2FieldCtrlType CtrlType() const = 0; |
|
103 |
|
104 /** |
|
105 * Returns the field property flags defined in |
|
106 * Pbk2FieldProperty.hrh. |
|
107 * |
|
108 * @return Field property flags. |
|
109 */ |
|
110 virtual TUint Flags() const = 0; |
|
111 |
|
112 /** |
|
113 * Returns the field ordering item. |
|
114 * |
|
115 * @return Number that defines the ordering of the field. |
|
116 */ |
|
117 virtual TInt OrderingItem() const = 0; |
|
118 |
|
119 /** |
|
120 * Returns the field ordering item in 'add item' dialog. |
|
121 * |
|
122 * @return Number that defines the ordering of the field |
|
123 * in the contact editor add item dialog. |
|
124 */ |
|
125 virtual TInt AddItemOrdering() const = 0; |
|
126 |
|
127 /** |
|
128 * Returns field 'add item' text, or the default label if |
|
129 * there is no 'add item' text defined. |
|
130 * |
|
131 * @return Add item text or the default label. |
|
132 */ |
|
133 virtual const TDesC& AddItemText() const = 0; |
|
134 |
|
135 /** |
|
136 * Returns the location of the field. |
|
137 * |
|
138 * @return Location of the field (home, work, etc.). |
|
139 */ |
|
140 virtual TPbk2FieldLocation Location() const = 0; |
|
141 |
|
142 /** |
|
143 * Returns the group id of the property. |
|
144 * |
|
145 * @return Group id. |
|
146 */ |
|
147 virtual TPbk2FieldGroupId GroupId() const = 0; |
|
148 |
|
149 /** |
|
150 * Returns the default label that should be used if the store |
|
151 * doesn't define a label. |
|
152 * |
|
153 * @return Default label. |
|
154 */ |
|
155 virtual const TDesC& DefaultLabel() const = 0; |
|
156 |
|
157 /** |
|
158 * Returns an extension point for this interface or NULL. |
|
159 * |
|
160 * @param aExtensionUid Extension UID. |
|
161 * @return Extension point. |
|
162 */ |
|
163 virtual TAny* FieldPropertyExtension( |
|
164 TUid /*aExtensionUid*/ ) |
|
165 { |
|
166 return NULL; |
|
167 } |
|
168 }; |
|
169 |
|
170 #endif // MPBK2FIELDPROPERTY_H |
|
171 |
|
172 // End of File |