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