|
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 FotaCustCmdsFactory class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef FOTACUSTCMDSFACTORY_H |
|
20 #define FOTACUSTCMDSFACTORY_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 * FotaCustCmdsFactory 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 parameters of Execute function to distinguish between |
|
42 * them. |
|
43 * Note that similar commands can be implemented in the same command class - |
|
44 * just the factory methods need to be different. |
|
45 */ |
|
46 |
|
47 class FotaCustCmdsFactory |
|
48 { |
|
49 |
|
50 public: |
|
51 |
|
52 /** |
|
53 * Creates and returns a custom command of type CFotaCustCmdAllReasons. |
|
54 * This method has function ordinal 1 in fotacustcmds.dll. |
|
55 * |
|
56 * @return A custom command object. |
|
57 */ |
|
58 IMPORT_C static MSsmCustomCommand* FotaCustCmdAllReasonsNewL(); |
|
59 |
|
60 /** |
|
61 * Creates and returns a custom command of type CFotaCustCmdFirmwareUpdate. |
|
62 * This method has function ordinal 2 in fotacustcmds.dll. |
|
63 * |
|
64 * @return A custom command object. |
|
65 */ |
|
66 IMPORT_C static MSsmCustomCommand* FotaCustCmdFirmwareUpdateNewL(); |
|
67 |
|
68 /** |
|
69 * Creates and returns a custom command of type CFotaCustCmdFirstBoot. |
|
70 * This method has function ordinal 3 in fotacustcmds.dll. |
|
71 * |
|
72 * @return A custom command object. |
|
73 */ |
|
74 IMPORT_C static MSsmCustomCommand* FotaCustCmdFirstBootNewL(); |
|
75 |
|
76 // To add new custom commands to this DLL, add their factory methods here. |
|
77 |
|
78 }; |
|
79 |
|
80 #endif // FOTACUSTCMDSFACTORY |