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: Delete command handler
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef __C_GLXCOMMANDHANDLERREMOVEFROM_H__
|
|
22 |
#define __C_GLXCOMMANDHANDLERREMOVEFROM_H__
|
|
23 |
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <glxmedia.h>
|
|
26 |
#include <glxmpxcommandcommandhandler.h>
|
|
27 |
#include <mpxmediageneraldefs.h>
|
|
28 |
|
|
29 |
class MGlxMediaListProvider;
|
|
30 |
|
|
31 |
/**
|
|
32 |
* @class CGlxCommandHandlerRemoveFrom
|
|
33 |
*
|
|
34 |
* Command handler that removes relationships between media objects.
|
|
35 |
*
|
|
36 |
*/
|
|
37 |
|
|
38 |
NONSHARABLE_CLASS( CGlxCommandHandlerRemoveFrom )
|
|
39 |
: public CGlxMpxCommandCommandHandler
|
|
40 |
{
|
|
41 |
public:
|
|
42 |
/**
|
|
43 |
* Two-phase constructor
|
|
44 |
* @param aMediaListProvider object that provides the media list
|
|
45 |
* @param aContainerType specifies the container type. (Used to determine
|
|
46 |
* the correct confirmation note.) Only confirmation notes for EMPXAlbum
|
|
47 |
* and EMPXTag are supported. A confirmation note will not be displayed for
|
|
48 |
* unsupported types.
|
|
49 |
* @param aFileName resource file
|
|
50 |
*/
|
|
51 |
IMPORT_C static CGlxCommandHandlerRemoveFrom* NewL(
|
|
52 |
MGlxMediaListProvider* aMediaListProvider,
|
|
53 |
TMPXGeneralCategory aContainerType, const TDesC& aFileName);
|
|
54 |
|
|
55 |
/** Destructor */
|
|
56 |
IMPORT_C ~CGlxCommandHandlerRemoveFrom();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Set the container from which the items will be removed.
|
|
60 |
* If this is not set, the items will be removed from their container (their
|
|
61 |
* parent) on the path owned by the media list passed as a parameter to
|
|
62 |
* CreateCommandL().
|
|
63 |
* @param aContainerId. The container from which the items will be removed.
|
|
64 |
*/
|
|
65 |
IMPORT_C void SetContainerId(TGlxMediaId aContainerId);
|
|
66 |
|
|
67 |
protected: // From CGlxMpxCommandCommandHandler
|
|
68 |
/** See @ref CGlxMpxCommandCommandHandler::CreateCommandL */
|
|
69 |
virtual CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aList,
|
|
70 |
TBool& aConsume) const;
|
|
71 |
|
|
72 |
/** See CGlxMpxCommandCommandHandler::ConfirmationTextL */
|
|
73 |
virtual HBufC* ConfirmationTextL(TInt aCommandId, TBool aMultiSelection) const;
|
|
74 |
|
|
75 |
protected: // from CGlxCommandHandler
|
|
76 |
/** See @ref CGlxCommandHandler::DoActivateL */
|
|
77 |
void DoActivateL(TInt /*aViewId*/);
|
|
78 |
|
|
79 |
private:
|
|
80 |
/** Second phase constructor */
|
|
81 |
void ConstructL(const TDesC& aFileName);
|
|
82 |
|
|
83 |
/** Constructor */
|
|
84 |
CGlxCommandHandlerRemoveFrom(MGlxMediaListProvider* aMediaListProvider, TMPXGeneralCategory aContainerType);
|
|
85 |
|
|
86 |
private:
|
|
87 |
/// Resource file offset
|
|
88 |
TInt iResourceOffset;
|
|
89 |
TGlxMediaId iRemoveFromContainerId;
|
|
90 |
TMPXGeneralCategory iContainerType;
|
|
91 |
};
|
|
92 |
|
|
93 |
#endif // __C_GLXCOMMANDHANDLERREMOVEFROM_H__
|