|
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: Download commmand handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __GLXCOMMANDHANDLERDOWNLOAD_H__ |
|
22 #define __GLXCOMMANDHANDLERDOWNLOAD_H__ |
|
23 |
|
24 |
|
25 |
|
26 // INTERNAL INCLUDES |
|
27 #include "glxcommandhandler.h" |
|
28 |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * @class CGlxCommandHandlerDownload |
|
34 * |
|
35 * Command handler that opens a browser to allow downloading of images |
|
36 * or videos |
|
37 * @author David Holland |
|
38 * @internal reviewed 26/06/2007 by Rowland Cook |
|
39 * |
|
40 */ |
|
41 NONSHARABLE_CLASS(CGlxCommandHandlerDownload) : |
|
42 public CGlxCommandHandler |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * @return pointer to CGlxCommandHandlerDownload object |
|
48 */ |
|
49 IMPORT_C static CGlxCommandHandlerDownload* NewL(); |
|
50 |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 IMPORT_C ~CGlxCommandHandlerDownload(); |
|
56 |
|
57 |
|
58 private: |
|
59 /** |
|
60 * Symbian 2nd phase constructor |
|
61 */ |
|
62 void ConstructL(); |
|
63 |
|
64 /** |
|
65 * C++ default constructor. |
|
66 */ |
|
67 CGlxCommandHandlerDownload(); |
|
68 |
|
69 |
|
70 private: // From MGlxCommandHandler |
|
71 /** |
|
72 * Execute the command, if applicable |
|
73 * @param aCommand The command to handle |
|
74 * @return ETrue iff command was handled |
|
75 * see @ref MGlxCommandHandler::ExecuteL |
|
76 */ |
|
77 TBool ExecuteL(TInt aCommand); |
|
78 |
|
79 /** |
|
80 * Modify a menu before it is displayed. |
|
81 * Null implementation |
|
82 * @param aResourceId The resource ID of the menu |
|
83 * @param aMenuPane The in-memory representation of the menu pane |
|
84 * see @ref MGlxCommandHandler::DynInitMenuPaneL |
|
85 */ |
|
86 void DynInitMenuPaneL(TInt /*aResourceId*/, CEikMenuPane* /*aMenuPane*/) {}; |
|
87 |
|
88 /** |
|
89 * Called when the owning view is activated |
|
90 * Null implementation |
|
91 * @param aViewId The ID of the view |
|
92 * see @ref CGlxCommandHandler::DoActivateL |
|
93 */ |
|
94 void DoActivateL(TInt /*aViewId*/) {}; |
|
95 |
|
96 /** |
|
97 * Called when the owning view is deactivated |
|
98 * Null implementation |
|
99 * see @ref MGlxCommandHandler::Deactivate |
|
100 */ |
|
101 void Deactivate() {}; |
|
102 |
|
103 /** |
|
104 * Offers key events to the command handler |
|
105 * Null implementation |
|
106 * @param aKeyEvent The key event. |
|
107 * @param aType The type of key event: EEventKey, EEventKeyUp or EEventKeyDown |
|
108 * @return Indicates whether or not the key event was used by this control. EKeyWasNotConsumed or EKeyWasConsumed |
|
109 * see @ref MGlxCommandHandler::OfferKeyEventL |
|
110 */ |
|
111 TKeyResponse OfferKeyEventL(const TKeyEvent& /*aKeyEvent*/, |
|
112 TEventCode /*aType*/) {return EKeyWasNotConsumed;}; |
|
113 |
|
114 /** |
|
115 * Perform any actions needed before the options menu is displayed. |
|
116 * The view calling this must first arrange a wait dialog to be displayed, as this operation may take |
|
117 * a long time to complete |
|
118 * Null implementation |
|
119 * see @ref MGlxCommandHandler::PreDynInitMenuPaneL |
|
120 */ |
|
121 void PreDynInitMenuPaneL( TInt /*aResourceId*/ ) {}; |
|
122 |
|
123 /** |
|
124 * See @ref MGlxCommandHandler::GetRequiredAttributesL |
|
125 * No implementation required |
|
126 */ |
|
127 void GetRequiredAttributesL(RArray< TMPXAttribute >& /*aAttributes*/, |
|
128 TBool /*aFilterUsingSelection*/, |
|
129 TBool /*aFilterUsingCommandId*/, |
|
130 TInt /*aCommandId*/) const {} |
|
131 |
|
132 private: // data |
|
133 |
|
134 // Not owned |
|
135 }; |
|
136 |
|
137 #endif //__GLXCOMMANDHANDLERDOWNLOAD_H__ |