|
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: |
|
15 * List box model class for field listboxes displaying Phonebook fields. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CPbkFieldFormatter_H__ |
|
21 #define __CPbkFieldFormatter_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> // CBase |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class TPbkContactItemField; |
|
28 class MPbkPhoneNumberFormat; |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Formats Phonebook field contents for display. |
|
35 */ |
|
36 NONSHARABLE_CLASS(CPbkFieldFormatter) : |
|
37 public CBase |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 /** |
|
41 * Creates an instance of this class. |
|
42 */ |
|
43 static CPbkFieldFormatter* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 ~CPbkFieldFormatter(); |
|
49 |
|
50 /** |
|
51 * Returns formatted contents of aField. |
|
52 */ |
|
53 TPtrC FormatFieldContentL(const TPbkContactItemField& aField); |
|
54 |
|
55 /** |
|
56 * Sets the fields time formatter to aTimeFormat. |
|
57 */ |
|
58 void SetTimeFormatL(const TDesC& aTimeFormat); |
|
59 |
|
60 private: // Implementation |
|
61 CPbkFieldFormatter(); |
|
62 void ConstructL(); |
|
63 TPtr ReallocBufferL(TInt aNewSize); |
|
64 |
|
65 private: // Data |
|
66 /// Own: buffer for handling line strings |
|
67 HBufC* iBuffer; |
|
68 /// Own: time format |
|
69 HBufC* iTimeFormat; |
|
70 /// Own: number formatter |
|
71 MPbkPhoneNumberFormat* iNumberFormatter; |
|
72 }; |
|
73 |
|
74 #endif // __CPbkFieldFormatter_H__ |
|
75 |
|
76 // End of File |