|
1 /* |
|
2 * Copyright (c) 2008 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: search fields interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MVIMPSTUISEARCHFIELD_H |
|
20 #define MVIMPSTUISEARCHFIELD_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <w32std.h> |
|
24 #include "tvimpstenums.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CEikEdwin; |
|
28 class CEikCaptionedControl; |
|
29 |
|
30 enum TVIMPSTSearchDataFieldType |
|
31 { |
|
32 EVIMPSTEdwinText, |
|
33 EVIMPSTEdwinNumber, |
|
34 EVIMPSTEdwinEmail, |
|
35 EVIMPSTEdwinMobile |
|
36 }; |
|
37 |
|
38 enum TIMPSTSearchFieldTypes |
|
39 { |
|
40 EIMBasicSearch = 0 , |
|
41 EIMAdvancedSearch |
|
42 }; |
|
43 |
|
44 |
|
45 // CLASS DECLARATION |
|
46 /** |
|
47 * search field interface. |
|
48 */ |
|
49 |
|
50 class MVIMPSTUiSearchField |
|
51 { |
|
52 |
|
53 public: // Interface |
|
54 |
|
55 /** |
|
56 * virtual Destructor. |
|
57 */ |
|
58 virtual ~MVIMPSTUiSearchField() |
|
59 { |
|
60 } |
|
61 |
|
62 /** |
|
63 * control id |
|
64 * @return Dialog control id. |
|
65 */ |
|
66 virtual TInt ControlId() const = 0; |
|
67 |
|
68 |
|
69 /** |
|
70 * Returns the CEikEdwin. |
|
71 * @return Field label. |
|
72 */ |
|
73 |
|
74 virtual CEikEdwin* Control() const = 0 ; |
|
75 |
|
76 /** |
|
77 * SetControl and captured control |
|
78 * @param aControl, a control to set |
|
79 * @param aCaptionedCtrl, a captured control to set |
|
80 */ |
|
81 virtual void SetControl(CEikEdwin* aControl, |
|
82 CEikCaptionedControl* aCaptionedCtrl) = 0 ; |
|
83 |
|
84 |
|
85 /** |
|
86 * activate the field |
|
87 * before calling must call SetControl |
|
88 */ |
|
89 virtual void ActivateL() = 0 ; |
|
90 |
|
91 |
|
92 /** |
|
93 * Returns the Control Text. |
|
94 * @return Field data. |
|
95 */ |
|
96 virtual HBufC* ControlTextL() const = 0 ; |
|
97 |
|
98 /** |
|
99 * Returns the field label. |
|
100 * @return field label. |
|
101 */ |
|
102 virtual TPtrC FieldLabel() = 0; |
|
103 |
|
104 |
|
105 /** |
|
106 * Returns the field data. |
|
107 * @return field data. |
|
108 */ |
|
109 virtual TPtrC FieldData() = 0; |
|
110 |
|
111 |
|
112 /** |
|
113 * Sets given data as the field |
|
114 * @param aData, data to set |
|
115 */ |
|
116 virtual void SetFieldDataL( |
|
117 const TDesC& aData ) = 0; |
|
118 |
|
119 |
|
120 /** |
|
121 * @return the field data type |
|
122 */ |
|
123 virtual TVIMPSTSearchDataFieldType FieldDataType() const = 0 ; |
|
124 |
|
125 /** |
|
126 * @return ETrue if basic field |
|
127 */ |
|
128 virtual TBool IsBasicField() const = 0 ; |
|
129 |
|
130 /** |
|
131 * @return field search key |
|
132 */ |
|
133 virtual TVIMPSTEnums::TVIMPSTSearchKey GetSearchKey() const = 0 ; |
|
134 |
|
135 /** |
|
136 * reset the field data. |
|
137 */ |
|
138 virtual void ResetFieldData() = 0; |
|
139 |
|
140 }; |
|
141 |
|
142 #endif // MVIMPSTUISEARCHFIELD_H |
|
143 |
|
144 // End of File |
|
145 |