|
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 default phone number formatter. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2DEFAULTPHONENUMBERFORMATTER_H |
|
20 #define CPBK2DEFAULTPHONENUMBERFORMATTER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <MPbk2PhoneNumberFormatter.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * Phonebook 2 default phone number formatter. |
|
30 * |
|
31 * Responsible for formatting phone number. |
|
32 */ |
|
33 NONSHARABLE_CLASS(CPbk2DefaultPhoneNumberFormatter) : |
|
34 public CBase, |
|
35 public MPbk2PhoneNumberFormatter |
|
36 { |
|
37 public: // Construction and destruction |
|
38 |
|
39 /** |
|
40 * Creates a new instance of this class. |
|
41 * |
|
42 * @param aMaxDisplayLength Maximum phone number display length. |
|
43 * @return A new instance of this class. |
|
44 */ |
|
45 static CPbk2DefaultPhoneNumberFormatter* NewL( |
|
46 TInt aMaxDisplayLength ); |
|
47 |
|
48 /** |
|
49 * Destructor |
|
50 */ |
|
51 virtual ~CPbk2DefaultPhoneNumberFormatter(); |
|
52 |
|
53 public: // From MPbk2PhoneNumberFormatter |
|
54 void SetMaxBufferLengthL( |
|
55 TInt aMaxLength ); |
|
56 TPtrC FormatPhoneNumberForDisplay( |
|
57 const TDesC& aOriginalPhoneNumber ); |
|
58 |
|
59 private: // Implementation |
|
60 CPbk2DefaultPhoneNumberFormatter(); |
|
61 void ConstructL( |
|
62 TInt aMaxDisplayLength ); |
|
63 |
|
64 private: // Data |
|
65 /// Own: Formatting buffer |
|
66 HBufC* iFormatterNumberBuffer; |
|
67 }; |
|
68 |
|
69 #endif // CPBK2DEFAULTPHONENUMBERFORMATTER_H |
|
70 |
|
71 // End of File |