]>
Commit | Line | Data |
---|---|---|
e66e86ee JC |
1 | /** @file\r |
2 | EFI Shell Dynamic Command registration protocol\r | |
3 | \r | |
4 | Copyright (c) 2012 Hewlett-Packard Company. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef __EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL__\r | |
16 | #define __EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL__\r | |
17 | \r | |
18 | #include <ShellBase.h>\r | |
19 | #include <Protocol/EfiShellParameters.h>\r | |
20 | #include <Protocol/EfiShell.h>\r | |
21 | \r | |
22 | \r | |
23 | // {0CD3258C-D677-4fcc-B343-934D30983888}\r | |
24 | #define EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_GUID \\r | |
25 | { \\r | |
26 | 0xcd3258c, 0xd677, 0x4fcc, { 0xb3, 0x43, 0x93, 0x4d, 0x30, 0x98, 0x38, 0x88 } \\r | |
27 | }\r | |
28 | \r | |
29 | \r | |
30 | //\r | |
31 | // Define for forward reference.\r | |
32 | //\r | |
33 | typedef struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL;\r | |
34 | \r | |
35 | \r | |
36 | /**\r | |
37 | This is the shell command handler function pointer callback type. This\r | |
38 | function handles the command when it is invoked in the shell.\r | |
39 | \r | |
40 | @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r | |
41 | @param[in] SystemTable The pointer to the system table.\r | |
42 | @param[in] ShellParameters The parameters associated with the command.\r | |
43 | @param[in] Shell The instance of the shell protocol used in the context\r | |
44 | of processing this command.\r | |
45 | \r | |
46 | @return EFI_SUCCESS the operation was sucessful\r | |
47 | @return other the operation failed.\r | |
48 | **/\r | |
49 | typedef\r | |
50 | SHELL_STATUS\r | |
51 | (EFIAPI * SHELL_COMMAND_HANDLER)(\r | |
52 | IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r | |
53 | IN EFI_SYSTEM_TABLE *SystemTable,\r | |
54 | IN EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters,\r | |
55 | IN EFI_SHELL_PROTOCOL *Shell\r | |
56 | );\r | |
57 | \r | |
58 | /**\r | |
59 | This is the command help handler function pointer callback type. This\r | |
60 | function is responsible for displaying help information for the associated\r | |
61 | command.\r | |
62 | \r | |
63 | @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r | |
64 | @param[in] Language The pointer to the language string to use.\r | |
65 | \r | |
66 | @return string Pool allocated help string, must be freed by caller\r | |
67 | **/\r | |
68 | typedef\r | |
69 | CHAR16*\r | |
70 | (EFIAPI * SHELL_COMMAND_GETHELP)(\r | |
71 | IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r | |
72 | IN CONST CHAR8 *Language\r | |
73 | );\r | |
74 | \r | |
75 | /// EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL protocol structure.\r | |
e7a8edfd | 76 | struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL {\r |
e66e86ee JC |
77 | \r |
78 | CONST CHAR16 *CommandName;\r | |
79 | SHELL_COMMAND_HANDLER Handler;\r | |
80 | SHELL_COMMAND_GETHELP GetHelp;\r | |
81 | \r | |
e7a8edfd | 82 | };\r |
e66e86ee JC |
83 | \r |
84 | extern EFI_GUID gEfiShellDynamicCommandProtocolGuid;\r | |
85 | \r | |
86 | #endif\r |