|
1 /* |
|
2 * Copyright (c) 2002 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: MsgAddressControlEditorField declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef INC_MSGADDRESSCONTROLEDITORFIELD_H |
|
21 #define INC_MSGADDRESSCONTROLEDITORFIELD_H |
|
22 |
|
23 // ========== INCLUDE FILES ================================ |
|
24 #include <fldbase.h> // for CTextField and MTextFieldFactory |
|
25 |
|
26 // ========== CONSTANTS ==================================== |
|
27 |
|
28 const TUid KMsgAddressControlEditorFieldUid = { 0x100000 }; |
|
29 |
|
30 const TInt KMsgMaxStringLength = 1000; // Maximum length of strings for iAddress and iName. |
|
31 const TInt KMsgMaxFieldLength = 100; // Maximum length of the field. |
|
32 |
|
33 // ========== MACROS ======================================= |
|
34 |
|
35 // ========== DATA TYPES =================================== |
|
36 |
|
37 // ========== FUNCTION PROTOTYPES ========================== |
|
38 |
|
39 // ========== FORWARD DECLARATIONS ========================= |
|
40 class MVPbkContactLink; |
|
41 |
|
42 // ========== CLASS DECLARATION ============================ |
|
43 |
|
44 /** |
|
45 * Defines a text field for the address control editor. This kind of field is used |
|
46 * to indicate that recipient's address has been verified i.e. found from the |
|
47 * contact database. |
|
48 * |
|
49 */ |
|
50 class CMsgAddressControlEditorField : public CTextField |
|
51 { |
|
52 |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Constructor. |
|
57 */ |
|
58 CMsgAddressControlEditorField(); |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 ~CMsgAddressControlEditorField(); |
|
64 |
|
65 /** |
|
66 * |
|
67 * @param aEntryString |
|
68 */ |
|
69 void SetEntryStringL(const TDesC& aEntryString); |
|
70 |
|
71 /** |
|
72 * |
|
73 * @param aName |
|
74 */ |
|
75 void SetNameL(const TDesC& aName); |
|
76 |
|
77 /** |
|
78 * |
|
79 * @param aAddress |
|
80 */ |
|
81 void SetAddressL(const TDesC& aAddress); |
|
82 |
|
83 /** |
|
84 * |
|
85 * @param aVerified |
|
86 */ |
|
87 void SetVerified(TBool aVerified); |
|
88 |
|
89 /** |
|
90 * |
|
91 * @param aValidated |
|
92 */ |
|
93 void SetValidated(TBool aValidated); |
|
94 |
|
95 /** |
|
96 * |
|
97 * @param aId |
|
98 */ |
|
99 void SetContactLink ( const MVPbkContactLink* aContactLink ); |
|
100 /** |
|
101 * |
|
102 * @return |
|
103 */ |
|
104 const MVPbkContactLink* ContactLink() const; |
|
105 |
|
106 /** |
|
107 * |
|
108 * @return |
|
109 */ |
|
110 HBufC* Name() const; |
|
111 |
|
112 /** |
|
113 * |
|
114 * @return |
|
115 */ |
|
116 HBufC* Address() const; |
|
117 |
|
118 /** |
|
119 * |
|
120 * @return |
|
121 */ |
|
122 TBool IsVerified() const; |
|
123 |
|
124 /** |
|
125 * |
|
126 * @return |
|
127 */ |
|
128 TBool IsValidated() const; |
|
129 |
|
130 |
|
131 public: // from TTextField |
|
132 |
|
133 /** |
|
134 * |
|
135 * @param aValueText |
|
136 * @return |
|
137 */ |
|
138 TInt Value(TPtr& aValueText); |
|
139 |
|
140 /** |
|
141 * |
|
142 * @param aStream |
|
143 */ |
|
144 void InternalizeL(RReadStream& aStream); |
|
145 |
|
146 /** |
|
147 * |
|
148 * @param aStream |
|
149 */ |
|
150 void ExternalizeL(RWriteStream& aStream) const; |
|
151 |
|
152 /** |
|
153 * |
|
154 * @return |
|
155 */ |
|
156 TUid Type() const; |
|
157 |
|
158 protected: |
|
159 HBufC* iEntryString; |
|
160 HBufC* iName; |
|
161 HBufC* iAddress; |
|
162 TBool iVerified; |
|
163 TBool iValidated; |
|
164 const MVPbkContactLink* iContactLink; |
|
165 }; |
|
166 |
|
167 // ========================================================= |
|
168 |
|
169 /** |
|
170 * Defines a text field factory for the address control editor. |
|
171 * |
|
172 */ |
|
173 class TMsgAddressControlEditorFieldFactory : public MTextFieldFactory |
|
174 { |
|
175 |
|
176 public: |
|
177 |
|
178 /** |
|
179 * Constructor. |
|
180 */ |
|
181 TMsgAddressControlEditorFieldFactory(); |
|
182 |
|
183 /** |
|
184 * Destructor. |
|
185 */ |
|
186 virtual ~TMsgAddressControlEditorFieldFactory(); |
|
187 |
|
188 public: // from MTextFieldFactory |
|
189 |
|
190 /** |
|
191 * |
|
192 * @param aFieldType |
|
193 * @return |
|
194 */ |
|
195 CTextField* NewFieldL(TUid aFieldType); |
|
196 |
|
197 private: |
|
198 |
|
199 /** |
|
200 * Copy constructor (not available). |
|
201 */ |
|
202 TMsgAddressControlEditorFieldFactory(const TMsgAddressControlEditorFieldFactory& aSource); |
|
203 |
|
204 /** |
|
205 * Assignment operator (not available). |
|
206 */ |
|
207 const TMsgAddressControlEditorFieldFactory& operator=(const TMsgAddressControlEditorFieldFactory& aSource); |
|
208 |
|
209 }; |
|
210 |
|
211 #endif |
|
212 |
|
213 // End of File |