|
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 #include <glxcommandhandlereditimage.h> |
|
25 #include <glxcommandhandlerremovefrom.h> |
|
26 #include <glxcommandhandlernewmedia.h> |
|
27 #include <glxcommandhandlersend.h> |
|
28 #include <glxcommandhandlerrename.h> |
|
29 #include <glxcommandhandlercomment.h> |
|
30 |
|
31 GlxCommandHandler* GlxCommandHandlerFactory::CreateCommandHandler(int commandId) |
|
32 { |
|
33 GlxCommandHandler* cmdHandler = NULL; |
|
34 switch(commandId) |
|
35 { |
|
36 case EGlxCmdDelete: cmdHandler = new GlxCommandHandlerDelete(); |
|
37 break; |
|
38 case EGlxCmdAddToAlbum: |
|
39 case EGlxCmdAddToFav: |
|
40 cmdHandler = new GlxCommandHandlerAddToContainer(); |
|
41 break; |
|
42 case EGlxCmdRotate: cmdHandler = new GlxCommandHandlerRotate(); |
|
43 break; |
|
44 case EGlxCmdRemoveFrom: |
|
45 case EGlxCmdRemoveFromFav: |
|
46 cmdHandler = new GlxCommandHandlerRemoveFrom(); |
|
47 break; |
|
48 case EGlxCmdAddMedia: cmdHandler = new GlxCommandHandlerNewMedia(); |
|
49 break; |
|
50 |
|
51 case EGlxCmdSend : cmdHandler = new GlxCommandHandlerSend(); |
|
52 break; |
|
53 |
|
54 case EGlxCmdRename: cmdHandler = new GlxCommandHandlerRename(); |
|
55 break; |
|
56 |
|
57 case EGlxCmdComment: cmdHandler = new GlxCommandHandlerComment(); |
|
58 break; |
|
59 case EGlxCmdRotateImgCW: |
|
60 case EGlxCmdRotateImgCCW: |
|
61 case EGlxCmdRotateImgCrop: |
|
62 case EGlxCmdSetWallpaper: |
|
63 cmdHandler = new GlxCommandHandlerEditImage(); |
|
64 break; |
|
65 default: |
|
66 break; |
|
67 } |
|
68 return cmdHandler; |
|
69 } |