|
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 UI control composite UI extension. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2CONTACTUICONTROLEXTENSION_H |
|
20 #define CPBK2CONTACTUICONTROLEXTENSION_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <MPbk2ContactUiControlExtension.h> |
|
25 #include <MPbk2ContactUiControlExtension2.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CPbk2UIExtensionLoader; |
|
29 class CVPbkContactManager; |
|
30 class CPbk2IconArray; |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Phonebook 2 contact UI control composite UI extension. |
|
37 * Responsible for managing real contact UI control extensions and |
|
38 * delegating calls from core Phonebook 2 to them. |
|
39 */ |
|
40 NONSHARABLE_CLASS(CPbk2ContactUiControlExtension) : |
|
41 public CBase, |
|
42 public MPbk2ContactUiControlExtension, |
|
43 public MPbk2ContactUiControlExtension2 |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Creates a new instance of this class. |
|
49 * |
|
50 * @param aContactManager Virtual Phonebook contact manager. |
|
51 * @param aExtensionLoader UI extension loader. |
|
52 * @return A new instance of this class. |
|
53 */ |
|
54 static CPbk2ContactUiControlExtension* NewL( |
|
55 CVPbkContactManager& aContactManager, |
|
56 CPbk2UIExtensionLoader& aExtensionLoader ); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 ~CPbk2ContactUiControlExtension(); |
|
62 |
|
63 public: // From MPbk2ContactUiControlExtension |
|
64 void DoRelease(); |
|
65 const TArray<TPbk2IconId> GetDynamicIconsL( |
|
66 const MVPbkViewContact* aContactHandle ); |
|
67 void SetContactUiControlUpdate( |
|
68 MPbk2ContactUiControlUpdate* aContactUpdator ); |
|
69 TAny* ContactUiControlExtensionExtension( TUid aUid ); |
|
70 |
|
71 public: // From MPbk2ContactUiControlExtension2 |
|
72 void SetIconArray(CPbk2IconArray& aIconArray); |
|
73 |
|
74 private: // Implementation |
|
75 CPbk2ContactUiControlExtension( |
|
76 CVPbkContactManager& aContactManager, |
|
77 CPbk2UIExtensionLoader& aExtensionLoader ); |
|
78 void ConstructL(); |
|
79 void LoadExtensionsL(); |
|
80 |
|
81 private: // Data |
|
82 /// Ref: Virtual Phonebook contact manager |
|
83 CVPbkContactManager& iContactManager; |
|
84 /// Ref: UI extension loader |
|
85 CPbk2UIExtensionLoader& iExtensionLoader; |
|
86 /// Own: Array of UI extension implementations |
|
87 RPointerArray<MPbk2ContactUiControlExtension> iUiControlExtensions; |
|
88 /// Own: Dummy array |
|
89 RArray<TPbk2IconId> iDummyArray; |
|
90 }; |
|
91 |
|
92 #endif // CPBK2CONTACTUICONTROLEXTENSION_H |
|
93 |
|
94 // End of File |