60
|
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(
|
|
46 |
MGlxMediaListProvider* aMediaListProvider, TInt aMenuResource,
|
|
47 |
const TDesC& aFileName);
|
|
48 |
|
|
49 |
/** Destructor */
|
|
50 |
IMPORT_C ~CGlxCommandHandlerCopyAndMove();
|
|
51 |
|
|
52 |
public: // from CGlxMpCommandCommandHandler
|
|
53 |
/** See @ref CGlxMpxCommandCommandHandler::CreateCommandL */
|
|
54 |
virtual CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aList,
|
|
55 |
TBool& aConsume) const;
|
|
56 |
|
|
57 |
public: // from CGlxMediaListCommandHandler
|
|
58 |
/** See @ref CGlxMediaListCommandHandler::DoDynInitMenuPaneL */
|
|
59 |
void DoDynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
|
|
60 |
|
|
61 |
private:
|
|
62 |
/** Second phase constructor
|
|
63 |
* @param aResourceFile resource file
|
|
64 |
*/
|
|
65 |
void ConstructL(const TDesC& aFileName);
|
|
66 |
|
|
67 |
/** First phase constructor */
|
|
68 |
CGlxCommandHandlerCopyAndMove(MGlxMediaListProvider* aMediaListProvider, TInt aMenuResource);
|
|
69 |
|
|
70 |
/**
|
|
71 |
* Appends a drive letter to a descriptor for a given drive number.
|
|
72 |
* @param aDriveNumber a drive number that is required to be represented as a descriptor.
|
|
73 |
* @param aDriveLetter descriptor to which the drive letter (including ':\') should be appended
|
|
74 |
*/
|
|
75 |
static void DriveLetterFromNumber(TDriveNumber aDriveNumber, TDes& aDriveLetter);
|
|
76 |
|
|
77 |
private:
|
|
78 |
/** ETrue if the command is visible
|
|
79 |
* in the menu else EFalse*/
|
|
80 |
mutable TBool iVisible;
|
|
81 |
|
|
82 |
/// Menu resource containing iCommandId
|
|
83 |
TInt iMenuResource;
|
|
84 |
|
|
85 |
/// Resource file offset
|
|
86 |
TInt iResourceOffset;
|
|
87 |
};
|
|
88 |
|
|
89 |
|
|
90 |
#endif /*GLXCOMMANDHANDLERCOPYANDMOVE_H_*/
|