]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/ShellDynamicCommand.h
MdePkg FirmwareManagement.h: Fix typo EFI_SECURITY_VIOLATIO
[mirror_edk2.git] / MdePkg / Include / Protocol / ShellDynamicCommand.h
CommitLineData
e66e86ee
JC
1/** @file\r
2 EFI Shell Dynamic Command registration protocol\r
3\r
c011b6c9 4 (C) Copyright 2012-2014 Hewlett-Packard Development Company, L.P.<BR>\r
51a09860 5 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
e66e86ee
JC
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
51a09860
RN
16#ifndef __EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_H__\r
17#define __EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_H__\r
e66e86ee 18\r
51a09860
RN
19#include <Protocol/Shell.h>\r
20#include <Protocol/ShellParameters.h>\r
e66e86ee 21\r
b8a13d73 22// {3C7200E9-005F-4EA4-87DE-A3DFAC8A27C3}\r
e66e86ee
JC
23#define EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_GUID \\r
24 { \\r
b8a13d73 25 0x3c7200e9, 0x005f, 0x4ea4, { 0x87, 0xde, 0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3 } \\r
e66e86ee
JC
26 }\r
27\r
28\r
29//\r
30// Define for forward reference.\r
31//\r
32typedef struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL;\r
33\r
34\r
35/**\r
36 This is the shell command handler function pointer callback type. This\r
37 function handles the command when it is invoked in the shell.\r
38\r
39 @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r
40 @param[in] SystemTable The pointer to the system table.\r
41 @param[in] ShellParameters The parameters associated with the command.\r
42 @param[in] Shell The instance of the shell protocol used in the context\r
43 of processing this command.\r
44\r
45 @return EFI_SUCCESS the operation was sucessful\r
46 @return other the operation failed.\r
47**/\r
48typedef\r
49SHELL_STATUS\r
50(EFIAPI * SHELL_COMMAND_HANDLER)(\r
51 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r
52 IN EFI_SYSTEM_TABLE *SystemTable,\r
53 IN EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters,\r
54 IN EFI_SHELL_PROTOCOL *Shell\r
55 );\r
56\r
57/**\r
58 This is the command help handler function pointer callback type. This\r
59 function is responsible for displaying help information for the associated\r
60 command.\r
61\r
62 @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r
63 @param[in] Language The pointer to the language string to use.\r
64\r
65 @return string Pool allocated help string, must be freed by caller\r
66**/\r
67typedef\r
68CHAR16*\r
69(EFIAPI * SHELL_COMMAND_GETHELP)(\r
70 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r
71 IN CONST CHAR8 *Language\r
72 );\r
73\r
74/// EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL protocol structure.\r
e7a8edfd 75struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL {\r
e66e86ee
JC
76 \r
77 CONST CHAR16 *CommandName;\r
78 SHELL_COMMAND_HANDLER Handler;\r
79 SHELL_COMMAND_GETHELP GetHelp;\r
80\r
e7a8edfd 81};\r
e66e86ee
JC
82\r
83extern EFI_GUID gEfiShellDynamicCommandProtocolGuid;\r
84\r
85#endif\r