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