|
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 * Declaration of SsmLangSelCmdFactory class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef SSMLANGSELCMDFACTORY_H |
|
20 #define SSMLANGSELCMDFACTORY_H |
|
21 |
|
22 #include <e32def.h> |
|
23 |
|
24 class MSsmCustomCommand; |
|
25 |
|
26 /** |
|
27 * Creates custom command objects. |
|
28 * |
|
29 * Custom commands are loaded by system state manager based on DLL name and |
|
30 * function ordinal. |
|
31 * Each DLL containing custom commands must offer factory methods for each |
|
32 * custom command. |
|
33 * The function ordinals must be exactly the same in emulator and HW builds |
|
34 * or loading the custom command may have unpredictable results. |
|
35 * |
|
36 * SsmLangSelCmdFactory is a static class containing factory method of one |
|
37 * custom command. It can be easily extended to contain factory methods of |
|
38 * multiple custom commands by adding more member functions. |
|
39 * |
|
40 * It is better to implement own factory method for each separate command |
|
41 * than to try to use command parameters to distinguis between them. |
|
42 * Note that similar commands can be implemented in the same command class - |
|
43 * just the factory methods need to be different. |
|
44 */ |
|
45 class SsmLangSelCmdFactory |
|
46 { |
|
47 |
|
48 public: |
|
49 |
|
50 /** |
|
51 * Creates and returns a custom command of type CSsmLangSelCmd. |
|
52 * This method has function ordinal 1 in ssmlangselcmd.dll. |
|
53 * |
|
54 * @return A custom command object. |
|
55 */ |
|
56 IMPORT_C static MSsmCustomCommand* SsmLangSelCmdNewL(); |
|
57 |
|
58 // To add new custom commands to this DLL, add their factory methods here. |
|
59 |
|
60 }; |
|
61 |
|
62 #endif // SSMLANGSELCMDFACTORY |