photosgallery/viewframework/plugins/fullscreenviewplugin/src/glximageviewerfullscreenviewplugin.cpp
changeset 0 4e91876724a2
child 18 bcb43dc84c44
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     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 "glximageviewerfullscreenviewplugin.h"
       
    25 
       
    26 #include "glxfullscreenviewplugin.hrh"
       
    27 #include <data_caging_path_literals.hrh>
       
    28 #include <glxcommandhandlerhelp.h>
       
    29 #include <glxcommandhandlers.hrh>
       
    30 
       
    31 #include <AknUtils.h>
       
    32 #include <avkon.hrh>
       
    33 #include <bautils.h>
       
    34 #include <glxcollectiongeneraldefs.h>
       
    35 #include <glxcommandhandlerhelp.h>
       
    36 #include <glxlog.h>
       
    37 #include <glxtracer.h>
       
    38 #include <glxmedia.h>
       
    39 #include <glxmedialist.h>
       
    40 #include <glxresourceutilities.h>                // for CGlxResourceUtilities
       
    41 #include <glxsettingsmodel.h>			              // For Cenrep Keys
       
    42 #include <glxfullscreenview.h>
       
    43 #include <mpxcollectionpath.h>
       
    44 #include <mpxcollectionutility.h>
       
    45 #include <mpxmediageneraldefs.h>
       
    46 #include <StringLoader.h>
       
    47 
       
    48 #include <glxfullscreenviewdata.rsg>
       
    49 #include <glxicons.mbg> // icons 
       
    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 CGlxImageViewerScreenViewPlugin::CGlxImageViewerScreenViewPlugin()
       
    61 
       
    62     {
       
    63     	
       
    64     TRACER("CGlxImageViewerScreenViewPlugin::CGlxImageViewerScreenViewPlugin()");	
       
    65     	
       
    66     iResourceIds.iMenuId = R_GLX_IMAGEVIEWER_FULLSCREEN_MENU;   //r_glx_imageviewer_fullscreen_menu
       
    67     iResourceIds.iViewId = R_GLX_IMAGEVIEWER_FULLSCREEN_VIEW;   //r_glx_imageviewer_fullscreen_view
       
    68     iResourceIds.iCbaId = R_GLX_FULLSCREEN_SOFTKEYS;
       
    69     iViewUID = KGlxImageViewerFullScreenViewImplementationId;    
       
    70     
       
    71     }
       
    72 
       
    73 // ---------------------------------------------------------------------------
       
    74 // Symbian 2nd phase constructor can leave.
       
    75 // ---------------------------------------------------------------------------
       
    76 //
       
    77 void CGlxImageViewerScreenViewPlugin::ConstructL()
       
    78     {
       
    79     // Do nothing
       
    80     }
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 // Two-phased constructor.
       
    84 // ---------------------------------------------------------------------------
       
    85 //
       
    86 CGlxImageViewerScreenViewPlugin* CGlxImageViewerScreenViewPlugin::NewL()
       
    87     {
       
    88     TRACER("CGlxImageViewerScreenViewPlugin::::NewL()");	
       
    89     
       
    90     CGlxImageViewerScreenViewPlugin* self = 
       
    91         new ( ELeave ) CGlxImageViewerScreenViewPlugin();
       
    92     CleanupStack::PushL( self );
       
    93     self->ConstructL();
       
    94     CleanupStack::Pop( self );
       
    95     return self;
       
    96     }
       
    97 
       
    98 // ---------------------------------------------------------------------------
       
    99 // Destructor
       
   100 // ---------------------------------------------------------------------------
       
   101 //
       
   102 CGlxImageViewerScreenViewPlugin::~CGlxImageViewerScreenViewPlugin()
       
   103     {
       
   104     TRACER("CGlxImageViewerScreenViewPlugin::::~CGlxImageViewerScreenViewPlugin()");	
       
   105     	
       
   106     if ( iResOffset )
       
   107         {
       
   108         CCoeEnv::Static()->DeleteResourceFile( iResOffset );
       
   109         }
       
   110     }
       
   111 
       
   112 // ---------------------------------------------------------------------------
       
   113 // AddCommandHandlersL
       
   114 // ---------------------------------------------------------------------------
       
   115 //
       
   116 void CGlxImageViewerScreenViewPlugin::AddCommandHandlersL()
       
   117     {
       
   118     TRACER("CGlxImageViewerScreenViewPlugin::AddCommandHandlersL()");	
       
   119     	
       
   120     GLX_LOG_ENTRY_EXIT_LEAVE_L("CGlxImageViewerScreenViewPlugin::AddCommandHandlersL()");
       
   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 CGlxImageViewerScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile)
       
   136     {
       
   137     TRACER("CGlxImageViewerScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile)");		
       
   138     	
       
   139     TParse parse;
       
   140     parse.Set(KGlxFullScreenResource, &KDC_APP_RESOURCE_DIR, NULL);
       
   141     aResFile.Append(parse.FullName()); 
       
   142     CGlxResourceUtilities::GetResourceFilenameL(aResFile);  
       
   143     }
       
   144 
       
   145 //  End of File