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