ui/viewmanagement/statehandler/src/glxcommandhandlerfactory.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<glxcommandhandlerfactory.h>
       
    19 #include <glxcommandhandlers.hrh>
       
    20 
       
    21 #include<glxcommandhandlerdelete.h>
       
    22 #include <glxcommandhandleraddtocontainer.h>
       
    23 #include <glxcommandhandlerrotate.h>
       
    24 
       
    25 GlxCommandHandler* GlxCommandHandlerFactory::CreateCommandHandler(int commandId)
       
    26 {
       
    27     GlxCommandHandler* cmdHandler = NULL;
       
    28     switch(commandId)
       
    29         {
       
    30         case EGlxCmdDelete: cmdHandler = new GlxCommandHandlerDelete();
       
    31            break;
       
    32         case EGlxCmdAddToAlbum: cmdHandler = new GlxCommandHandlerAddToContainer();
       
    33            break;
       
    34 		case EGlxCmdRotate: cmdHandler = new GlxCommandHandlerRotate();
       
    35            break;
       
    36         default:
       
    37            break;
       
    38         }
       
    39     return cmdHandler;
       
    40 }