|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Dialog class for fetcher plugin app |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef GLXFETCHERDIALOG_H_ |
|
22 #define GLXFETCHERDIALOG_H_ |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <AknDialog.h> // for CAknDialog |
|
26 #include <glxfilterfactory.h> // CMPXFilter |
|
27 #include <coedef.h> |
|
28 #include <alf/alfscreenbuffer.h> |
|
29 |
|
30 #include "mglxeventobserver.h" |
|
31 |
|
32 // Forward Declerations |
|
33 class CGlxFetcherContainer; |
|
34 class CGlxUiUtility; |
|
35 class MMGFetchVerifier; |
|
36 class CAlfEnv; |
|
37 |
|
38 |
|
39 // INTERNAL INCLUDES |
|
40 |
|
41 NONSHARABLE_CLASS (CGlxFetcherDialog) : public CAknDialog , |
|
42 public MGlxEventObserver |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * @param reference to an array where the selected files are set |
|
48 * @param selection verifier interface |
|
49 * @param filtertype, either images or videos |
|
50 * @param the title for the dialog |
|
51 */ |
|
52 static CGlxFetcherDialog* NewL( |
|
53 CDesCArray& aSelectedFiles, |
|
54 MMGFetchVerifier* aVerifier, |
|
55 TGlxFilterItemType aFilterType, |
|
56 const TDesC& aTitle, |
|
57 TBool aMultiSelectionEnabled); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 ~CGlxFetcherDialog(); |
|
63 |
|
64 public: // from MEikCommandObserver |
|
65 /** |
|
66 * @ref MEikCommandObserver |
|
67 */ |
|
68 void ProcessCommandL(TInt aCommandId); |
|
69 |
|
70 protected: // Functions CEikDialog |
|
71 |
|
72 /** |
|
73 * @ref CEikDialog |
|
74 */ |
|
75 TBool OkToExitL(TInt aKeycode); |
|
76 |
|
77 /** |
|
78 * From MEikMenuObserver |
|
79 */ |
|
80 void DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) ; |
|
81 |
|
82 protected: // From CAknDialog |
|
83 /** |
|
84 * From MEikMenuObserver |
|
85 */ |
|
86 TKeyResponse OfferKeyEventL(const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/); |
|
87 |
|
88 private: |
|
89 /** |
|
90 * Symbian 2nd phase constructor |
|
91 */ |
|
92 void ConstructL(); |
|
93 |
|
94 /** |
|
95 * C++ default constructor. |
|
96 */ |
|
97 CGlxFetcherDialog( |
|
98 CDesCArray& aSelectedFiles, MMGFetchVerifier* aVerifier, |
|
99 TGlxFilterItemType aFilterType, const TDesC& aTitle, |
|
100 TBool aMultiSelectionEnabled); |
|
101 |
|
102 private: // from CCoeControl |
|
103 /** |
|
104 * @ref CCoeControl::SizeChanged |
|
105 */ |
|
106 void SizeChanged(); |
|
107 |
|
108 private: |
|
109 /** |
|
110 * Initializes the dialog's controls before the dialog is sized and |
|
111 * layed out. |
|
112 */ |
|
113 void PreLayoutDynInitL(); |
|
114 |
|
115 /** |
|
116 * Initializes the dialog's controls after the dialog has been sized |
|
117 * but before it has been activated. |
|
118 */ |
|
119 void PostLayoutDynInitL(); |
|
120 |
|
121 private: // from MEikDialogPageObserver |
|
122 /** |
|
123 * @ref MEikDialogPageObserver::CreateCustomControlL |
|
124 */ |
|
125 SEikControlInfo CreateCustomControlL(TInt aControlType); |
|
126 |
|
127 private: // CAknDialog |
|
128 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
129 |
|
130 private:// From MGlxEventObserver |
|
131 |
|
132 virtual void HandleDoubleTapEventL(TInt aCommandId); |
|
133 |
|
134 public:// to exit the fetcher dialog |
|
135 void CallCancelFetcherL(TInt aCommandId); |
|
136 |
|
137 private: |
|
138 CGlxFetcherContainer* iFetcherContainer ; //Container Object |
|
139 CGlxUiUtility* iUiUtility; // UiUtility |
|
140 CAlfEnv* iEnv; // Alf Environment |
|
141 |
|
142 // Selected items array |
|
143 // Not Own. Owned by the client |
|
144 CDesCArray& iSelectedFiles; |
|
145 |
|
146 MMGFetchVerifier* iVerifier; |
|
147 |
|
148 TGlxFilterItemType iFilterType; // GlxFilterType |
|
149 |
|
150 /// Ref: the title |
|
151 const TDesC& iTitle; |
|
152 |
|
153 TBool iMultiSelectionEnabled; |
|
154 |
|
155 // Flag to check for mark started or not |
|
156 TBool iMarkStarted; |
|
157 |
|
158 TBool iFetchUri; // This is to check if uri is being fetcher or not |
|
159 }; |
|
160 |
|
161 #endif /*GLXFETCHERDIALOG_H_*/ |