ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp
changeset 23 74c9f037fd5d
child 24 99ad1390cd33
equal deleted inserted replaced
5:f7f0874bfe7d 23:74c9f037fd5d
       
     1 /*
       
     2 * Copyright (c) 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #include <mpxcollectionpath.h>
       
    19 #include <mglxmedialist.h>
       
    20 #include <glxcommandfactory.h>
       
    21 #include <glxcommandhandlerdelete.h>
       
    22 #include <QDebug>
       
    23 
       
    24 GlxCommandHandlerDelete::GlxCommandHandlerDelete()
       
    25 {
       
    26     qDebug("GlxCommandHandlerDelete::GlxCommandHandlerDelete() ");
       
    27 }
       
    28 
       
    29 GlxCommandHandlerDelete::~GlxCommandHandlerDelete()
       
    30 {
       
    31     qDebug("GlxCommandHandlerDelete::~GlxCommandHandlerDelete() ");
       
    32 }
       
    33 
       
    34 CMPXCommand* GlxCommandHandlerDelete::CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const 
       
    35 {
       
    36 	Q_UNUSED(aCommandId);
       
    37 	Q_UNUSED(aConsume);
       
    38     qDebug("GlxCommandHandlerDelete::CreateCommandL");
       
    39     CMPXCollectionPath* path = aMediaList.PathLC( NGlxListDefs::EPathFocusOrSelection );
       
    40     CMPXCommand* command = TGlxCommandFactory::DeleteCommandLC(*path);
       
    41     CleanupStack::Pop(command);
       
    42     CleanupStack::PopAndDestroy(path);
       
    43     return command;
       
    44 }