2 EFI Shell Dynamic Command registration protocol
4 (C) Copyright 2012-2014 Hewlett-Packard Development Company, L.P.<BR>
5 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_H__
11 #define __EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_H__
13 #include <Protocol/Shell.h>
14 #include <Protocol/ShellParameters.h>
16 // {3C7200E9-005F-4EA4-87DE-A3DFAC8A27C3}
17 #define EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_GUID \
19 0x3c7200e9, 0x005f, 0x4ea4, { 0x87, 0xde, 0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3 } \
23 // Define for forward reference.
25 typedef struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
;
28 This is the shell command handler function pointer callback type. This
29 function handles the command when it is invoked in the shell.
31 @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
32 @param[in] SystemTable The pointer to the system table.
33 @param[in] ShellParameters The parameters associated with the command.
34 @param[in] Shell The instance of the shell protocol used in the context
35 of processing this command.
37 @return EFI_SUCCESS the operation was sucessful
38 @return other the operation failed.
42 (EFIAPI
*SHELL_COMMAND_HANDLER
)(
43 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
44 IN EFI_SYSTEM_TABLE
*SystemTable
,
45 IN EFI_SHELL_PARAMETERS_PROTOCOL
*ShellParameters
,
46 IN EFI_SHELL_PROTOCOL
*Shell
50 This is the command help handler function pointer callback type. This
51 function is responsible for displaying help information for the associated
54 @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
55 @param[in] Language The pointer to the language string to use.
57 @return string Pool allocated help string, must be freed by caller
61 (EFIAPI
*SHELL_COMMAND_GETHELP
)(
62 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
63 IN CONST CHAR8
*Language
66 /// EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL protocol structure.
67 struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
{
68 CONST CHAR16
*CommandName
;
69 SHELL_COMMAND_HANDLER Handler
;
70 SHELL_COMMAND_GETHELP GetHelp
;
73 extern EFI_GUID gEfiShellDynamicCommandProtocolGuid
;