|
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 |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include "glxalbumfullscreenviewplugin.h" |
|
24 |
|
25 #include "glxfullscreenviewplugin.hrh" |
|
26 #include <data_caging_path_literals.hrh> |
|
27 #include <glxcommandhandlers.hrh> |
|
28 |
|
29 #include <AknUtils.h> |
|
30 #include <avkon.hrh> |
|
31 #include <bautils.h> |
|
32 #include <glxcommandhandlerhelp.h> |
|
33 #include <glxcommandhandlerremovefrom.h> |
|
34 #include <glxresourceutilities.h> // for CGlxResourceUtilities |
|
35 #include <glxfullscreenviewdata.rsg> |
|
36 #include <mpxcollectionpath.h> |
|
37 #include <mpxcollectionutility.h> |
|
38 #include <mpxmediageneraldefs.h> |
|
39 |
|
40 #include "glxcommandhandlerdetails.h" |
|
41 #include "glxfullscreenview.h" |
|
42 #include <glxcommandhandlervideoplayback.h> |
|
43 |
|
44 _LIT(KGlxFullScreenResource,"glxfullscreenviewdata.rsc"); |
|
45 |
|
46 // --------------------------------------------------------------------------- |
|
47 // C++ default constructor can NOT contain any code, that |
|
48 // might leave. |
|
49 // --------------------------------------------------------------------------- |
|
50 // |
|
51 CGlxAlbumFullScreenViewPlugin::CGlxAlbumFullScreenViewPlugin() |
|
52 |
|
53 { |
|
54 iResourceIds.iMenuId = R_GLX_ALBUM_FULLSCREEN_MENU; |
|
55 iResourceIds.iViewId = R_GLX_ALBUM_FULLSCREEN_VIEW; |
|
56 iResourceIds.iCbaId = R_GLX_FULLSCREEN_SOFTKEYS; |
|
57 iViewUID = KGlxAlbumFullScreenViewImplementationId; |
|
58 |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 // Symbian 2nd phase constructor can leave. |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 void CGlxAlbumFullScreenViewPlugin::ConstructL() |
|
66 { |
|
67 // Do nothing |
|
68 } |
|
69 |
|
70 // --------------------------------------------------------------------------- |
|
71 // Two-phased constructor. |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 CGlxAlbumFullScreenViewPlugin* CGlxAlbumFullScreenViewPlugin::NewL() |
|
75 { |
|
76 CGlxAlbumFullScreenViewPlugin* self = |
|
77 new ( ELeave ) CGlxAlbumFullScreenViewPlugin(); |
|
78 CleanupStack::PushL( self ); |
|
79 self->ConstructL(); |
|
80 CleanupStack::Pop( self ); |
|
81 return self; |
|
82 } |
|
83 |
|
84 // --------------------------------------------------------------------------- |
|
85 // Destructor |
|
86 // --------------------------------------------------------------------------- |
|
87 // |
|
88 CGlxAlbumFullScreenViewPlugin::~CGlxAlbumFullScreenViewPlugin() |
|
89 { |
|
90 // Do nothing |
|
91 } |
|
92 |
|
93 |
|
94 void CGlxAlbumFullScreenViewPlugin::AddCommandHandlersL() |
|
95 { |
|
96 //Fix for error ID EVTY-7M87LF |
|
97 //@ Registration of Video Playback Command handler has to before UPnP. |
|
98 //@ else UPnP will not get play command once video playback command is consumed. |
|
99 iFullScreenView->AddCommandHandlerL( |
|
100 CGlxCommandHandlerVideoPlayback::NewL(iFullScreenView)); |
|
101 |
|
102 CGlxFullScreenViewPluginBase::AddCommandHandlersL(); |
|
103 TFileName uiutilitiesrscfile; |
|
104 uiutilitiesrscfile.Append( |
|
105 CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
|
106 // Remove from Album. |
|
107 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerRemoveFrom::NewL( |
|
108 iFullScreenView, EMPXAlbum, uiutilitiesrscfile)); |
|
109 |
|
110 TGlxHelpContext helpInfo; |
|
111 helpInfo.iBrowseContext = LGAL_HLP_ALBUM_FULLSCREEN; |
|
112 |
|
113 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo)); |
|
114 } |
|
115 |
|
116 |
|
117 void CGlxAlbumFullScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile) |
|
118 { |
|
119 TParse parse; |
|
120 parse.Set(KGlxFullScreenResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
121 aResFile.Append(parse.FullName()); |
|
122 CGlxResourceUtilities::GetResourceFilenameL(aResFile); |
|
123 } |
|
124 |
|
125 // End of File |