photosgallery/viewframework/plugins/fullscreenviewplugin/src/glxalbumfullscreenviewplugin.cpp
changeset 0 4e91876724a2
child 25 191387a8b767
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 
       
    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 
       
    43 _LIT(KGlxFullScreenResource,"glxfullscreenviewdata.rsc");
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // C++ default constructor can NOT contain any code, that
       
    47 // might leave.
       
    48 // ---------------------------------------------------------------------------
       
    49 //
       
    50 CGlxAlbumFullScreenViewPlugin::CGlxAlbumFullScreenViewPlugin()
       
    51 
       
    52     {
       
    53     iResourceIds.iMenuId = R_GLX_ALBUM_FULLSCREEN_MENU;
       
    54     iResourceIds.iViewId = R_GLX_ALBUM_FULLSCREEN_VIEW;
       
    55     iResourceIds.iCbaId = R_GLX_FULLSCREEN_SOFTKEYS;
       
    56     iViewUID = KGlxAlbumFullScreenViewImplementationId;
       
    57     
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------------------------
       
    61 // Symbian 2nd phase constructor can leave.
       
    62 // ---------------------------------------------------------------------------
       
    63 //
       
    64 void CGlxAlbumFullScreenViewPlugin::ConstructL()
       
    65     {
       
    66     // Do nothing
       
    67     }
       
    68 
       
    69 // ---------------------------------------------------------------------------
       
    70 // Two-phased constructor.
       
    71 // ---------------------------------------------------------------------------
       
    72 //
       
    73 CGlxAlbumFullScreenViewPlugin* CGlxAlbumFullScreenViewPlugin::NewL()
       
    74     {
       
    75     CGlxAlbumFullScreenViewPlugin* self = 
       
    76         new ( ELeave ) CGlxAlbumFullScreenViewPlugin();
       
    77     CleanupStack::PushL( self );
       
    78     self->ConstructL();
       
    79     CleanupStack::Pop( self );
       
    80     return self;
       
    81     }
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // Destructor
       
    85 // ---------------------------------------------------------------------------
       
    86 //
       
    87 CGlxAlbumFullScreenViewPlugin::~CGlxAlbumFullScreenViewPlugin()
       
    88     {
       
    89     // Do nothing
       
    90     }
       
    91 
       
    92     
       
    93 void CGlxAlbumFullScreenViewPlugin::AddCommandHandlersL()
       
    94     {
       
    95     CGlxFullScreenViewPluginBase::AddCommandHandlersL();
       
    96     // Remove from Album.
       
    97     iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerRemoveFrom::NewL(iFullScreenView, EMPXAlbum));     
       
    98     
       
    99     TGlxHelpContext helpInfo;
       
   100     helpInfo.iBrowseContext = LGAL_HLP_ALBUM_FULLSCREEN;
       
   101    
       
   102     iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo)); 
       
   103     }
       
   104 
       
   105 
       
   106 
       
   107 void CGlxAlbumFullScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile)
       
   108     {
       
   109     TParse parse;
       
   110     parse.Set(KGlxFullScreenResource, &KDC_APP_RESOURCE_DIR, NULL);
       
   111     aResFile.Append(parse.FullName()); 
       
   112     CGlxResourceUtilities::GetResourceFilenameL(aResFile);  
       
   113     }
       
   114 
       
   115 //  End of File