photosgallery/viewframework/plugins/fullscreenviewplugin/src/glxdownloadsfullscreenviewplugin.cpp
branchRCL_3
changeset 60 5b3385a43d68
equal deleted inserted replaced
59:8e5f6eea9c9f 60:5b3385a43d68
       
     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 #include <glxcommandhandlervideoplayback.h>
       
    50 
       
    51 _LIT(KGlxFullScreenResource,"glxfullscreenviewdata.rsc");
       
    52 
       
    53 
       
    54 
       
    55 // ---------------------------------------------------------------------------
       
    56 // C++ default constructor can NOT contain any code, that
       
    57 // might leave.
       
    58 // ---------------------------------------------------------------------------
       
    59 //
       
    60 CGlxDownloadsFullScreenViewPlugin::CGlxDownloadsFullScreenViewPlugin()
       
    61 
       
    62     {
       
    63     iResourceIds.iMenuId = R_GLX_FULLSCREEN_MENU;
       
    64     iResourceIds.iViewId = R_GLX_FULLSCREEN_VIEW;
       
    65     iResourceIds.iCbaId = R_GLX_FULLSCREEN_SOFTKEYS;
       
    66     iViewUID = KGlxDownloadsFullScreenViewImplementationId;
       
    67     
       
    68     
       
    69     
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // Symbian 2nd phase constructor can leave.
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 void CGlxDownloadsFullScreenViewPlugin::ConstructL()
       
    77     {
       
    78     // Do nothing
       
    79     }
       
    80 
       
    81 // ---------------------------------------------------------------------------
       
    82 // Two-phased constructor.
       
    83 // ---------------------------------------------------------------------------
       
    84 //
       
    85 CGlxDownloadsFullScreenViewPlugin* CGlxDownloadsFullScreenViewPlugin::NewL()
       
    86     {
       
    87     CGlxDownloadsFullScreenViewPlugin* self = 
       
    88         new ( ELeave ) CGlxDownloadsFullScreenViewPlugin();
       
    89     CleanupStack::PushL( self );
       
    90     self->ConstructL();
       
    91     CleanupStack::Pop( self );
       
    92     return self;
       
    93     }
       
    94 
       
    95 // ---------------------------------------------------------------------------
       
    96 // Destructor
       
    97 // ---------------------------------------------------------------------------
       
    98 //
       
    99 CGlxDownloadsFullScreenViewPlugin::~CGlxDownloadsFullScreenViewPlugin()
       
   100     {
       
   101     if ( iResOffset )
       
   102         {
       
   103         CCoeEnv::Static()->DeleteResourceFile( iResOffset );
       
   104         }
       
   105     }
       
   106 
       
   107 // ---------------------------------------------------------------------------
       
   108 // AddCommandHandlersL
       
   109 // ---------------------------------------------------------------------------
       
   110 //
       
   111 void CGlxDownloadsFullScreenViewPlugin::AddCommandHandlersL()
       
   112     {
       
   113     GLX_LOG_ENTRY_EXIT_LEAVE_L("CGlxDownloadsFullScreenViewPlugin::AddCommandHandlersL()");
       
   114     
       
   115     //Fix for error ID EVTY-7M87LF
       
   116 	//@ Registration of Video Playback Command handler has to before UPnP.
       
   117 	//@ else UPnP will not get play command once video playback command is consumed.
       
   118 	iFullScreenView->AddCommandHandlerL(
       
   119 			CGlxCommandHandlerVideoPlayback::NewL(iFullScreenView));
       
   120 	
       
   121     CGlxFullScreenViewPluginBase::AddCommandHandlersL();
       
   122     
       
   123     TGlxHelpContext helpInfo;
       
   124     helpInfo.iBrowseContext = LGAL_HLP_DOWNLOADS_FULLSCREEN;
       
   125     
       
   126     iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo));
       
   127     }
       
   128 
       
   129 
       
   130 
       
   131 // -----------------------------------------------------------------------------
       
   132 // GetResourceFilenameL
       
   133 // -----------------------------------------------------------------------------
       
   134 //
       
   135 void CGlxDownloadsFullScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile)
       
   136     {
       
   137     TParse parse;
       
   138     parse.Set(KGlxFullScreenResource, &KDC_APP_RESOURCE_DIR, NULL);
       
   139     aResFile.Append(parse.FullName()); 
       
   140     CGlxResourceUtilities::GetResourceFilenameL(aResFile);  
       
   141     }
       
   142 
       
   143 //  End of File