]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h
Clean up the private GUID definition in module Level.
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel1CommandsLib / UefiShellLevel1CommandsLib.h
CommitLineData
a405b86d 1/** @file\r
2 Main file for NULL named library for level 1 shell command functions.\r
3\r
77dcec12 4 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
a405b86d 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
a1d4bfcc 15#ifndef _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_\r
77dcec12 16#define _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_\r
17\r
a405b86d 18#include <Uefi.h>\r
19#include <ShellBase.h>\r
20\r
bca163ff
LG
21#include <Guid/ShellLibHiiGuid.h>\r
22\r
a405b86d 23#include <Protocol/EfiShell.h>\r
24#include <Protocol/EfiShellParameters.h>\r
25#include <Protocol/DevicePath.h>\r
26#include <Protocol/LoadedImage.h>\r
27#include <Protocol/UnicodeCollation.h>\r
28#include <Protocol/DevicePathToText.h>\r
29\r
30#include <Library/BaseLib.h>\r
31#include <Library/BaseMemoryLib.h>\r
32#include <Library/DebugLib.h>\r
33#include <Library/MemoryAllocationLib.h>\r
34#include <Library/PcdLib.h>\r
35#include <Library/ShellCommandLib.h>\r
36#include <Library/ShellLib.h>\r
37#include <Library/SortLib.h>\r
38#include <Library/UefiLib.h>\r
39#include <Library/UefiRuntimeServicesTableLib.h>\r
40#include <Library/UefiBootServicesTableLib.h>\r
41#include <Library/HiiLib.h>\r
42#include <Library/FileHandleLib.h>\r
43\r
44extern EFI_HANDLE gShellLevel1HiiHandle;\r
a405b86d 45\r
77dcec12 46/**\r
47 Function for 'stall' command.\r
48\r
49 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
50 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
51**/\r
52SHELL_STATUS\r
53EFIAPI\r
54ShellCommandRunStall (\r
55 IN EFI_HANDLE ImageHandle,\r
56 IN EFI_SYSTEM_TABLE *SystemTable\r
57 );\r
58\r
a405b86d 59/**\r
60 Function for 'exit' command.\r
61\r
62 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
63 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
64**/\r
65SHELL_STATUS\r
66EFIAPI\r
67ShellCommandRunExit (\r
68 IN EFI_HANDLE ImageHandle,\r
69 IN EFI_SYSTEM_TABLE *SystemTable\r
70 );\r
71\r
72/**\r
73 Function for 'endif' command.\r
74\r
75 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
76 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
77**/\r
78SHELL_STATUS\r
79EFIAPI\r
80ShellCommandRunEndIf (\r
81 IN EFI_HANDLE ImageHandle,\r
82 IN EFI_SYSTEM_TABLE *SystemTable\r
83 );\r
84\r
85/**\r
86 Function for 'for' command.\r
87\r
88 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
89 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
90**/\r
91SHELL_STATUS\r
92EFIAPI\r
93ShellCommandRunFor (\r
94 IN EFI_HANDLE ImageHandle,\r
95 IN EFI_SYSTEM_TABLE *SystemTable\r
96 );\r
97\r
98/**\r
99 Function for 'endfor' command.\r
100\r
101 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
102 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
103**/\r
104SHELL_STATUS\r
105EFIAPI\r
106ShellCommandRunEndFor (\r
107 IN EFI_HANDLE ImageHandle,\r
108 IN EFI_SYSTEM_TABLE *SystemTable\r
109 );\r
110\r
111/**\r
112 Function for 'if' command.\r
113\r
114 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
115 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
116**/\r
117SHELL_STATUS\r
118EFIAPI\r
119ShellCommandRunIf (\r
120 IN EFI_HANDLE ImageHandle,\r
121 IN EFI_SYSTEM_TABLE *SystemTable\r
122 );\r
123\r
124/**\r
125 Function for 'goto' command.\r
126\r
127 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
128 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
129**/\r
130SHELL_STATUS\r
131EFIAPI\r
132ShellCommandRunGoto (\r
133 IN EFI_HANDLE ImageHandle,\r
134 IN EFI_SYSTEM_TABLE *SystemTable\r
135 );\r
136\r
137/**\r
138 Function for 'shift' command.\r
139\r
140 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
141 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
142**/\r
143SHELL_STATUS\r
144EFIAPI\r
145ShellCommandRunShift (\r
146 IN EFI_HANDLE ImageHandle,\r
147 IN EFI_SYSTEM_TABLE *SystemTable\r
148 );\r
149\r
150\r
151/**\r
152 Function for 'else' command.\r
153\r
154 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
155 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
156**/\r
157SHELL_STATUS\r
158EFIAPI\r
159ShellCommandRunElse (\r
160 IN EFI_HANDLE ImageHandle,\r
161 IN EFI_SYSTEM_TABLE *SystemTable\r
162 );\r
163\r
164///\r
165/// Function prototype for BOTH GetNextNode and GetPreviousNode...\r
166/// This is used to control the MoveToTag function direction...\r
167///\r
168typedef\r
169LIST_ENTRY *\r
170(EFIAPI *LIST_MANIP_FUNC)(\r
171 IN CONST LIST_ENTRY *List,\r
172 IN CONST LIST_ENTRY *Node\r
173 );\r
174\r
175/**\r
77dcec12 176 Move the script pointer from 1 tag (line) to another.\r
177\r
178 It functions so that count starts at 1 and it increases or decreases when it\r
179 hits the specified tags. when it hits zero the location has been found.\r
180\r
181 DecrementerTag and IncrementerTag are used to get around for/endfor and \r
182 similar paired types where the entire middle should be ignored.\r
183\r
184 If label is used it will be used instead of the count.\r
185\r
4ff7e37b
ED
186 @param[in] Function The function to use to enumerate through the \r
187 list. Normally GetNextNode or GetPreviousNode.\r
188 @param[in] DecrementerTag The tag to decrement the count at.\r
189 @param[in] IncrementerTag The tag to increment the count at.\r
190 @param[in] Label A label to look for.\r
191 @param[in, out] ScriptFile The pointer to the current script file structure.\r
192 @param[in] MovePast TRUE makes function return 1 past the found \r
193 location.\r
194 @param[in] FindOnly TRUE to not change the ScriptFile.\r
195 @param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in \r
196 searching.\r
a405b86d 197**/\r
198BOOLEAN\r
199EFIAPI\r
200MoveToTag (\r
201 IN CONST LIST_MANIP_FUNC Function,\r
202 IN CONST CHAR16 *DecrementerTag,\r
203 IN CONST CHAR16 *IncrementerTag,\r
204 IN CONST CHAR16 *Label OPTIONAL,\r
77dcec12 205 IN OUT SCRIPT_FILE *ScriptFile,\r
a405b86d 206 IN CONST BOOLEAN MovePast,\r
207 IN CONST BOOLEAN FindOnly,\r
208 IN CONST BOOLEAN WrapAroundScript\r
209 );\r
210\r
77dcec12 211#endif\r
212\r