|
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: Phonebook 2 contact name construction policy. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2CONTACTNAMECONSTRUCTIONPOLICY_H |
|
20 #define CPBK2CONTACTNAMECONSTRUCTIONPOLICY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <CVPbkContactNameConstructionPolicy.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MVPbkFieldTypeList; |
|
28 class CPbk2SortOrderManager; |
|
29 class MPbk2ContactNameFormatter; |
|
30 class CVPbkFieldTypeRefsList; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Phonebook 2 contact name construction policy. |
|
36 * Responsible for implementing Virtual Phonebook defined name |
|
37 * formatting policy so that a name gets formatted as specified |
|
38 * in UI level specifications. |
|
39 */ |
|
40 class CPbk2ContactNameConstructionPolicy : |
|
41 public CVPbkContactNameConstructionPolicy |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * |
|
48 * @param aParam Virtual Phonebook name construction policy. |
|
49 * @return A new instance of this class. |
|
50 */ |
|
51 static CPbk2ContactNameConstructionPolicy* NewL( |
|
52 TParam* aParam ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CPbk2ContactNameConstructionPolicy(); |
|
58 |
|
59 private: // From CVPbkContactNameConstructionPolicy |
|
60 MVPbkBaseContactFieldIterator* NameConstructionFieldsLC( |
|
61 const MVPbkBaseContactFieldCollection& aFieldCollection, |
|
62 CVPbkFieldTypeRefsList& aFieldTypeRefsList ); |
|
63 |
|
64 private: // Implementation |
|
65 CPbk2ContactNameConstructionPolicy( |
|
66 const MVPbkFieldTypeList& aMasterFieldTypeList ); |
|
67 void ConstructL(); |
|
68 |
|
69 private: // Data |
|
70 /// Ref: Master field type list |
|
71 const MVPbkFieldTypeList& iMasterFieldTypeList; |
|
72 /// Own: Sort order |
|
73 CPbk2SortOrderManager* iSortOrderManager; |
|
74 /// Own: Name formatter |
|
75 MPbk2ContactNameFormatter* iNameFormatter; |
|
76 }; |
|
77 |
|
78 #endif // CPBK2CONTACTNAMECONSTRUCTIONPOLICY_H |
|
79 |
|
80 // End of File |