|
1 /* |
|
2 * Copyright (c) 2006 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 * Sort view implementation |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CXSPSORTVIEW_H__ |
|
21 #define __CXSPSORTVIEW_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "CxSPBaseView.h" |
|
26 #include "MGlobalNoteObserver.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CPbk2UIExtensionView; |
|
30 class CAknNavigationDecorator; |
|
31 class CEikMenuPane; |
|
32 class CxSPSortViewControl; |
|
33 class CxSPViewIdChanger; |
|
34 class CxSPLoader; |
|
35 |
|
36 typedef CArrayPtrFlat<CxSPLoader> CxSPArray; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 /** |
|
40 * Sort view for Extension Manager. Provides extension sorting UI |
|
41 * for user. |
|
42 */ |
|
43 class CxSPSortView : public CxSPBaseView, public MGlobalNoteObserver |
|
44 { |
|
45 public: // Constructor |
|
46 |
|
47 /** |
|
48 * Creates a new CxSPSortView. |
|
49 * |
|
50 * @param aViewIdChanger Reference to view id changer |
|
51 * @param aContactManager Reference to contact manager object |
|
52 * @param aView Reference to Phonebook2-created view instance |
|
53 * @param aExtensions array of extensions |
|
54 * |
|
55 * @return New instance of this class |
|
56 */ |
|
57 static CxSPSortView* NewL( CxSPViewIdChanger& aViewIdChanger, |
|
58 MxSPContactManager& aContactManager, |
|
59 CPbk2UIExtensionView& aView, |
|
60 CxSPArray& aExtensions ); |
|
61 |
|
62 public: // From MPbk2UIExtensionView through CxSPBaseView |
|
63 void DoDeactivate(); |
|
64 void HandleCommandL( TInt aCommand ); |
|
65 void HandleStatusPaneSizeChange(); |
|
66 |
|
67 private: // From CxSPBaseView |
|
68 |
|
69 void DoActivateViewL( const TVwsViewId& aPrevViewId, |
|
70 TUid aCustomMessageId, |
|
71 const TDesC8& aCustomMessage ); |
|
72 |
|
73 private: // From MGlobalNoteObserver |
|
74 void GlobalNoteClosed( const TInt aResult ); |
|
75 void GlobalNoteError( const TInt aErr ); |
|
76 |
|
77 private: // Implementation |
|
78 /** |
|
79 * Standard C++ constructor |
|
80 * |
|
81 * @param aMapper Reference to view id changer |
|
82 * @param aContactManager Reference to contact manager object |
|
83 * @param aView Reference to Phonebook2-created view instance |
|
84 * @param aExtensions array of extensions |
|
85 */ |
|
86 CxSPSortView( CxSPViewIdChanger& aViewIdChanger, |
|
87 MxSPContactManager& aContactManager, |
|
88 CPbk2UIExtensionView& aView, |
|
89 CxSPArray& aExtensions ); |
|
90 |
|
91 /** |
|
92 * Performs the 2nd phase of construction. |
|
93 */ |
|
94 void ConstructL(); |
|
95 |
|
96 /** |
|
97 * Standard C++ destructor. |
|
98 */ |
|
99 ~CxSPSortView(); |
|
100 |
|
101 private: // Data |
|
102 |
|
103 /// Ref: View id changer |
|
104 CxSPViewIdChanger& iViewIdChanger; |
|
105 |
|
106 /// Own: This view's control container |
|
107 CxSPSortViewControl* iContainer; |
|
108 |
|
109 /// Own: Used for navigation pane text |
|
110 CAknNavigationDecorator* iNaviDecorator; |
|
111 |
|
112 /// Ref: Array of extensions |
|
113 CxSPArray& iExtensions; |
|
114 }; |
|
115 |
|
116 #endif // __CXSPSORTVIEW_H__ |
|
117 |
|
118 // End of File |