photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandlercopyandmove.h
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:    Move and Copy commmand handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef GLXCOMMANDHANDLERCOPYANDMOVE_H_
       
    22 #define GLXCOMMANDHANDLERCOPYANDMOVE_H_
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <glxmediaid.h>
       
    26 #include <glxmpxcommandcommandhandler.h>
       
    27 
       
    28 /**
       
    29  *  CGlxCommandHandlerCopyAndMove 
       
    30  *
       
    31  *  Copy and Move command handler.
       
    32  *
       
    33  *  @lib glxcommoncommandhandlers.lib
       
    34  *
       
    35  * @internal reviewed 07/06/2007 by M. Byrne
       
    36  */
       
    37 NONSHARABLE_CLASS( CGlxCommandHandlerCopyAndMove )
       
    38 : public CGlxMpxCommandCommandHandler
       
    39     {
       
    40 
       
    41 public:
       
    42     /** 
       
    43      * Two-phase constructor: 
       
    44      */
       
    45     IMPORT_C static CGlxCommandHandlerCopyAndMove* NewL(MGlxMediaListProvider* aMediaListProvider, TInt aMenuResource);
       
    46     
       
    47     /** Destructor */
       
    48     IMPORT_C ~CGlxCommandHandlerCopyAndMove();
       
    49 
       
    50 public: // from CGlxMpCommandCommandHandler
       
    51     /** See @ref CGlxMpxCommandCommandHandler::CreateCommandL */
       
    52     virtual CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aList,
       
    53             TBool& aConsume) const;  
       
    54 
       
    55 public: // from CGlxMediaListCommandHandler
       
    56     /** See @ref CGlxMediaListCommandHandler::DoDynInitMenuPaneL */
       
    57     void DoDynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
    58 
       
    59 private:
       
    60     /** Second phase constructor */
       
    61     void ConstructL();
       
    62 
       
    63     /** First phase constructor */
       
    64     CGlxCommandHandlerCopyAndMove(MGlxMediaListProvider* aMediaListProvider, TInt aMenuResource);
       
    65     
       
    66     /**
       
    67      * Appends a drive letter to a descriptor for a given drive number.
       
    68      * @param aDriveNumber a drive number that is required to be represented as a descriptor.
       
    69      * @param aDriveLetter descriptor to which the drive letter (including ':\') should be appended
       
    70      */
       
    71     static void DriveLetterFromNumber(TDriveNumber aDriveNumber, TDes& aDriveLetter);
       
    72     
       
    73 private:    
       
    74     /** ETrue if the command is visible 
       
    75      * in the menu else EFalse*/
       
    76     mutable TBool iVisible;
       
    77     
       
    78     /// Menu resource containing iCommandId
       
    79     TInt iMenuResource;
       
    80     
       
    81     /// Resource file offset
       
    82     TInt iResourceOffset;
       
    83     };
       
    84 
       
    85 
       
    86 #endif /*GLXCOMMANDHANDLERCOPYANDMOVE_H_*/