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