photosgallery/viewframework/plugins/fullscreenviewplugin/src/glxcameraalbumfullscreenviewplugin.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 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 
       
    23 #include "glxcameraalbumfullscreenviewplugin.h"
       
    24 
       
    25 #include "glxfullscreenviewplugin.hrh"
       
    26 #include <data_caging_path_literals.hrh>
       
    27 #include <glxcommandhandlers.hrh>
       
    28 
       
    29 #include <glxfullscreenviewdata.rsg>
       
    30 
       
    31 #include "glxcommandhandlerdetails.h"
       
    32 #include <AknUtils.h>
       
    33 #include <avkon.hrh>
       
    34 #include <bautils.h>
       
    35 #include <glxcommandhandlerhelp.h>
       
    36 #include <glxresourceutilities.h>                // for CGlxResourceUtilities
       
    37 #include <mpxcollectionpath.h>
       
    38 #include <mpxcollectionutility.h>
       
    39 #include <mpxmediageneraldefs.h>
       
    40 #include "glxfullscreenview.h"
       
    41 #include <glxcommandhandlervideoplayback.h>
       
    42 
       
    43 _LIT(KGlxFullScreenResource,"glxfullscreenviewdata.rsc");
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // C++ default constructor can NOT contain any code, that
       
    47 // might leave.
       
    48 // ---------------------------------------------------------------------------
       
    49 //
       
    50 CGlxCameraAlbumFullScreenViewPlugin::CGlxCameraAlbumFullScreenViewPlugin()
       
    51 
       
    52     {
       
    53     iResourceIds.iMenuId = R_GLX_FULLSCREEN_MENU;
       
    54     iResourceIds.iViewId = R_GLX_FULLSCREEN_VIEW;
       
    55     iResourceIds.iCbaId = R_GLX_FULLSCREEN_SOFTKEYS;
       
    56     iViewUID = KGlxCameraAlbumFullScreenViewImplementationId;
       
    57     
       
    58     
       
    59     }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // Symbian 2nd phase constructor can leave.
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 void CGlxCameraAlbumFullScreenViewPlugin::ConstructL()
       
    66     {
       
    67     // Do nothing
       
    68     }
       
    69 
       
    70 // ---------------------------------------------------------------------------
       
    71 // Two-phased constructor.
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 CGlxCameraAlbumFullScreenViewPlugin* CGlxCameraAlbumFullScreenViewPlugin::NewL()
       
    75     {
       
    76     CGlxCameraAlbumFullScreenViewPlugin* self = 
       
    77         new ( ELeave ) CGlxCameraAlbumFullScreenViewPlugin();
       
    78     CleanupStack::PushL( self );
       
    79     self->ConstructL();
       
    80     CleanupStack::Pop( self );
       
    81     return self;
       
    82     }
       
    83 
       
    84 // ---------------------------------------------------------------------------
       
    85 // Destructor
       
    86 // ---------------------------------------------------------------------------
       
    87 //
       
    88 CGlxCameraAlbumFullScreenViewPlugin::~CGlxCameraAlbumFullScreenViewPlugin()
       
    89     {
       
    90     // Do nothing
       
    91     }
       
    92 
       
    93     
       
    94 void CGlxCameraAlbumFullScreenViewPlugin::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       
       
   104     TGlxHelpContext helpInfo;
       
   105     helpInfo.iBrowseContext = LGAL_HLP_CAMERA_ALBUM_FULLSCRN;
       
   106     iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo)); 
       
   107     }
       
   108 
       
   109 void CGlxCameraAlbumFullScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile)
       
   110     {
       
   111     TParse parse;
       
   112     parse.Set(KGlxFullScreenResource, &KDC_APP_RESOURCE_DIR, NULL);
       
   113     aResFile.Append(parse.FullName()); 
       
   114     CGlxResourceUtilities::GetResourceFilenameL(aResFile);  
       
   115     }
       
   116 
       
   117 //  End of File