|
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: Implementation of download FullScreen view plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 |
|
24 #include "glxdownloadsfullscreenviewplugin.h" |
|
25 |
|
26 #include "glxfullscreenviewplugin.hrh" |
|
27 #include <avkon.hrh> |
|
28 #include <data_caging_path_literals.hrh> |
|
29 #include <glxcommandhandlers.hrh> |
|
30 |
|
31 #include <AknUtils.h> |
|
32 #include <bautils.h> |
|
33 #include <glxcollectiongeneraldefs.h> |
|
34 #include <glxcommandhandlerhelp.h> |
|
35 #include <glxlog.h> |
|
36 #include <glxtracer.h> |
|
37 #include <glxmedia.h> |
|
38 #include <glxmedialist.h> |
|
39 #include <glxresourceutilities.h> // for CGlxResourceUtilities |
|
40 #include <glxsettingsmodel.h> // For Cenrep Keys |
|
41 #include <glxfullscreenview.h> |
|
42 #include <mpxcollectionpath.h> |
|
43 #include <mpxcollectionutility.h> |
|
44 #include <mpxmediageneraldefs.h> |
|
45 #include <StringLoader.h> |
|
46 |
|
47 #include <glxfullscreenviewdata.rsg> |
|
48 #include <glxicons.mbg> // icons |
|
49 |
|
50 _LIT(KGlxFullScreenResource,"glxfullscreenviewdata.rsc"); |
|
51 |
|
52 |
|
53 |
|
54 // --------------------------------------------------------------------------- |
|
55 // C++ default constructor can NOT contain any code, that |
|
56 // might leave. |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 CGlxDownloadsFullScreenViewPlugin::CGlxDownloadsFullScreenViewPlugin() |
|
60 |
|
61 { |
|
62 iResourceIds.iMenuId = R_GLX_FULLSCREEN_MENU; |
|
63 iResourceIds.iViewId = R_GLX_FULLSCREEN_VIEW; |
|
64 iResourceIds.iCbaId = R_GLX_FULLSCREEN_SOFTKEYS; |
|
65 iViewUID = KGlxDownloadsFullScreenViewImplementationId; |
|
66 |
|
67 |
|
68 |
|
69 } |
|
70 |
|
71 // --------------------------------------------------------------------------- |
|
72 // Symbian 2nd phase constructor can leave. |
|
73 // --------------------------------------------------------------------------- |
|
74 // |
|
75 void CGlxDownloadsFullScreenViewPlugin::ConstructL() |
|
76 { |
|
77 // Do nothing |
|
78 } |
|
79 |
|
80 // --------------------------------------------------------------------------- |
|
81 // Two-phased constructor. |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 CGlxDownloadsFullScreenViewPlugin* CGlxDownloadsFullScreenViewPlugin::NewL() |
|
85 { |
|
86 CGlxDownloadsFullScreenViewPlugin* self = |
|
87 new ( ELeave ) CGlxDownloadsFullScreenViewPlugin(); |
|
88 CleanupStack::PushL( self ); |
|
89 self->ConstructL(); |
|
90 CleanupStack::Pop( self ); |
|
91 return self; |
|
92 } |
|
93 |
|
94 // --------------------------------------------------------------------------- |
|
95 // Destructor |
|
96 // --------------------------------------------------------------------------- |
|
97 // |
|
98 CGlxDownloadsFullScreenViewPlugin::~CGlxDownloadsFullScreenViewPlugin() |
|
99 { |
|
100 if ( iResOffset ) |
|
101 { |
|
102 CCoeEnv::Static()->DeleteResourceFile( iResOffset ); |
|
103 } |
|
104 } |
|
105 |
|
106 // --------------------------------------------------------------------------- |
|
107 // AddCommandHandlersL |
|
108 // --------------------------------------------------------------------------- |
|
109 // |
|
110 void CGlxDownloadsFullScreenViewPlugin::AddCommandHandlersL() |
|
111 { |
|
112 GLX_LOG_ENTRY_EXIT_LEAVE_L("CGlxDownloadsFullScreenViewPlugin::AddCommandHandlersL()"); |
|
113 CGlxFullScreenViewPluginBase::AddCommandHandlersL(); |
|
114 |
|
115 TGlxHelpContext helpInfo; |
|
116 helpInfo.iBrowseContext = LGAL_HLP_DOWNLOADS_FULLSCREEN; |
|
117 |
|
118 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo)); |
|
119 } |
|
120 |
|
121 |
|
122 |
|
123 // ----------------------------------------------------------------------------- |
|
124 // GetResourceFilenameL |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 void CGlxDownloadsFullScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile) |
|
128 { |
|
129 TParse parse; |
|
130 parse.Set(KGlxFullScreenResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
131 aResFile.Append(parse.FullName()); |
|
132 CGlxResourceUtilities::GetResourceFilenameL(aResFile); |
|
133 } |
|
134 |
|
135 // End of File |