|
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 * Phonebook phone number formatting. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CPbkPhoneNumberDefaultFormatter_H__ |
|
21 #define __CPbkPhoneNumberDefaultFormatter_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "MPbkPhoneNumberFormat.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Phonebook number formatter. |
|
32 */ |
|
33 NONSHARABLE_CLASS(CPbkPhoneNumberDefaultFormatter) : |
|
34 public CBase, |
|
35 public MPbkPhoneNumberFormat |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 /** |
|
39 * Constructor. |
|
40 */ |
|
41 static CPbkPhoneNumberDefaultFormatter* NewL |
|
42 (TInt aMaxPhoneNumberDisplayLength); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CPbkPhoneNumberDefaultFormatter(); |
|
48 |
|
49 public: // from MPbkPhoneNumberFormat |
|
50 void SetMaxBufferLengthL(TInt aMaxLength); |
|
51 TPtrC FormatPhoneNumberForDisplay(const TDesC& aOriginalPhoneNumber); |
|
52 |
|
53 private: // implementation |
|
54 CPbkPhoneNumberDefaultFormatter(); |
|
55 void ConstructL(TInt aMaxPhoneNumberDisplayLength); |
|
56 |
|
57 private: // data members |
|
58 /// Own: formatting buffer |
|
59 HBufC* iFormatterNumberBuffer; |
|
60 |
|
61 }; |
|
62 |
|
63 #endif // __CPbkPhoneNumberDefaultFormatter_H__ |
|
64 |
|
65 // End of File |