|
1 /* |
|
2 * Copyright (c) 2002-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: |
|
15 * Chinese contact name formatter. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPBK2CHINESECONTACTNAMEFORMATTER_H |
|
21 #define CPBK2CHINESECONTACTNAMEFORMATTER_H |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include "CPbk2ContactNameFormatter.h" |
|
25 |
|
26 /** |
|
27 * Chinese contact name formatter. |
|
28 * |
|
29 * Name creation logic: |
|
30 * 1) Try to create name according to first two field types in the |
|
31 * sort order. |
|
32 * 2) If the contact didn't have neither of the two fields |
|
33 * then create name according to the third -> last type in the |
|
34 * sort order. |
|
35 * 3) If the field type is defined in the sort order but not defined |
|
36 * as a title field type then the field data is not used. |
|
37 */ |
|
38 NONSHARABLE_CLASS(CPbk2ChineseContactNameFormatter) |
|
39 : public CPbk2ContactNameFormatter |
|
40 { |
|
41 public: // Construction |
|
42 |
|
43 /** |
|
44 * @param aUnnamedText Text to use for unnamed contacts. |
|
45 * @param aMasterFieldTypeList Master field type list of |
|
46 * Virtual Phonebook. |
|
47 * @param aSortOrderManager Sort order manager for fetching |
|
48 * current sort order. |
|
49 * @param aTitleFieldSelector Title fields, ownership changes |
|
50 * @return a new instance of this class |
|
51 */ |
|
52 static CPbk2ChineseContactNameFormatter* NewL( |
|
53 const TDesC& aUnnamedText, |
|
54 const MVPbkFieldTypeList& aMasterFieldTypeList, |
|
55 const CPbk2SortOrderManager& aSortOrderManager, |
|
56 CVPbkFieldTypeSelector* aTitleFieldSelector ); |
|
57 |
|
58 ~CPbk2ChineseContactNameFormatter(); |
|
59 |
|
60 private: // From MPbk2ContactNameFormatter |
|
61 TBool IsFindSeparatorChar( TChar aCh ); |
|
62 |
|
63 private: // Implementation |
|
64 CPbk2ChineseContactNameFormatter( |
|
65 const MVPbkFieldTypeList& aMasterFieldTypeList, |
|
66 const CPbk2SortOrderManager& aSortOrderManager ); |
|
67 }; |
|
68 |
|
69 #endif // CPBK2CHINESECONTACTNAMEFORMATTER_H |
|
70 |
|
71 // End of File |