]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Protocol/ShellDynamicCommand.h
OvmfPkg: Skip initrd command on Xcode toolchain
[mirror_edk2.git] / MdePkg / Include / Protocol / ShellDynamicCommand.h
... / ...
CommitLineData
1/** @file\r
2 EFI Shell Dynamic Command registration protocol\r
3\r
4 (C) Copyright 2012-2014 Hewlett-Packard Development Company, L.P.<BR>\r
5 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
7\r
8**/\r
9\r
10#ifndef __EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_H__\r
11#define __EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_H__\r
12\r
13#include <Protocol/Shell.h>\r
14#include <Protocol/ShellParameters.h>\r
15\r
16// {3C7200E9-005F-4EA4-87DE-A3DFAC8A27C3}\r
17#define EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_GUID \\r
18 { \\r
19 0x3c7200e9, 0x005f, 0x4ea4, { 0x87, 0xde, 0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3 } \\r
20 }\r
21\r
22\r
23//\r
24// Define for forward reference.\r
25//\r
26typedef struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL;\r
27\r
28\r
29/**\r
30 This is the shell command handler function pointer callback type. This\r
31 function handles the command when it is invoked in the shell.\r
32\r
33 @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r
34 @param[in] SystemTable The pointer to the system table.\r
35 @param[in] ShellParameters The parameters associated with the command.\r
36 @param[in] Shell The instance of the shell protocol used in the context\r
37 of processing this command.\r
38\r
39 @return EFI_SUCCESS the operation was sucessful\r
40 @return other the operation failed.\r
41**/\r
42typedef\r
43SHELL_STATUS\r
44(EFIAPI * SHELL_COMMAND_HANDLER)(\r
45 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r
46 IN EFI_SYSTEM_TABLE *SystemTable,\r
47 IN EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters,\r
48 IN EFI_SHELL_PROTOCOL *Shell\r
49 );\r
50\r
51/**\r
52 This is the command help handler function pointer callback type. This\r
53 function is responsible for displaying help information for the associated\r
54 command.\r
55\r
56 @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r
57 @param[in] Language The pointer to the language string to use.\r
58\r
59 @return string Pool allocated help string, must be freed by caller\r
60**/\r
61typedef\r
62CHAR16*\r
63(EFIAPI * SHELL_COMMAND_GETHELP)(\r
64 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r
65 IN CONST CHAR8 *Language\r
66 );\r
67\r
68/// EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL protocol structure.\r
69struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL {\r
70\r
71 CONST CHAR16 *CommandName;\r
72 SHELL_COMMAND_HANDLER Handler;\r
73 SHELL_COMMAND_GETHELP GetHelp;\r
74\r
75};\r
76\r
77extern EFI_GUID gEfiShellDynamicCommandProtocolGuid;\r
78\r
79#endif\r