|
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 contact name formatter factory. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PBK2CONTACTNAMEFORMATTERFACTORY_H |
|
20 #define PBK2CONTACTNAMEFORMATTERFACTORY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MVPbkFieldTypeList; |
|
27 class MPbk2ContactNameFormatter; |
|
28 class CPbk2SortOrderManager; |
|
29 class TResourceReader; |
|
30 class RFs; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Phonebook 2 contact name formatter factory. |
|
36 * Pbk2ContactNameFormatterFactory is responsible for creating |
|
37 * name formatter objects. |
|
38 * |
|
39 * @see MPbk2ContactNameFormatter |
|
40 */ |
|
41 class Pbk2ContactNameFormatterFactory |
|
42 { |
|
43 public: // Interface |
|
44 |
|
45 /** |
|
46 * Creates and returns an MPbk2ContactNameFormatter instance. |
|
47 * Uses Phonebook default unnamed text. |
|
48 * |
|
49 * @param aMasterFieldTypeList Master field type list of |
|
50 * Virtual Phonebook. Should be the |
|
51 * FieldTypes() from CVPbkContactManager. |
|
52 * @param aSortOrderManager Sort order manager for fetching |
|
53 * current sort order. |
|
54 * @param aFs A file system session reference for |
|
55 * resource file handling. If NULL then |
|
56 * an own session is created. |
|
57 * @return A new MPbk2ContactNameFormatter instance. |
|
58 */ |
|
59 IMPORT_C static MPbk2ContactNameFormatter* CreateL( |
|
60 const MVPbkFieldTypeList& aMasterFieldTypeList, |
|
61 const CPbk2SortOrderManager& aSortOrderManager, |
|
62 RFs* aFs = NULL ); |
|
63 |
|
64 /** |
|
65 * Creates and returns an MPbk2ContactNameFormatter instance. |
|
66 * |
|
67 * @param aUnnamedText Text to use for unnamed contacts. |
|
68 * @param aMasterFieldTypeList Master field type list of |
|
69 * Virtual Phonebook. Should be the |
|
70 * FieldTypes() from CVPbkContactManager. |
|
71 * @param aSortOrderManager Sort order manager for fetching |
|
72 * current sort order. |
|
73 * @param aFs A file system session reference for |
|
74 * resource file handling. If NULL then |
|
75 * an own session is created. |
|
76 * @return A new MPbk2ContactNameFormatter instance. |
|
77 */ |
|
78 IMPORT_C static MPbk2ContactNameFormatter* CreateL( |
|
79 const TDesC& aUnnamedText, |
|
80 const MVPbkFieldTypeList& aMasterFieldTypeList, |
|
81 const CPbk2SortOrderManager& aSortOrderManager, |
|
82 RFs* aFs = NULL ); |
|
83 |
|
84 /** |
|
85 * Creates and returns an MPbk2ContactNameFormatter instance. |
|
86 * |
|
87 * @param aMasterFieldTypeList Master field type list of |
|
88 * Virtual Phonebook. Should be the |
|
89 * FieldTypes() from CVPbkContactManager. |
|
90 * @param aSortOrderManager Sort order manager for fetching |
|
91 * current sort order. |
|
92 * @param aTitleFieldSelectorReader VPBK_FIELD_TYPE_SELECTOR |
|
93 * from VPbkFieldType.rh |
|
94 * Defines field types that can be |
|
95 * used for name formatting |
|
96 * @param aUnnamedText Text to use for unnamed contacts. |
|
97 * If NULL then default text is used |
|
98 * @param aFs A file system session reference for |
|
99 * resource file handling. If NULL then |
|
100 * an own session is created. |
|
101 * @return A new MPbk2ContactNameFormatter instance. |
|
102 */ |
|
103 IMPORT_C static MPbk2ContactNameFormatter* CreateL( |
|
104 const MVPbkFieldTypeList& aMasterFieldTypeList, |
|
105 const CPbk2SortOrderManager& aSortOrderManager, |
|
106 TResourceReader& aTitleFieldSelectorReader, |
|
107 const TDesC* aUnnamedText, |
|
108 RFs* aFs = NULL ); |
|
109 |
|
110 private: // Disabled functions |
|
111 Pbk2ContactNameFormatterFactory(); |
|
112 }; |
|
113 |
|
114 #endif // PBK2CONTACTNAMEFORMATTERFACTORY_H |
|
115 |
|
116 // End of File |