]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellParametersProtocol.h
Vlv2TbltDevicePkg:Add PiSmmCommunication&PiSmmCpuDxeSmm of UefiCpuPkg.
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellParametersProtocol.h
index 15b76b76918605d03e6efc61beaa8e039cd485e4..926f36242cdee50e152e33d7419a700dac6e7cf0 100644 (file)
 \r
 #include "Shell.h"\r
 \r
+typedef enum {\r
+  Internal_Command,\r
+  Script_File_Name,\r
+  Efi_Application,\r
+  File_Sys_Change,\r
+  Unknown_Invalid\r
+} SHELL_OPERATION_TYPES;\r
+\r
 /**\r
   creates a new EFI_SHELL_PARAMETERS_PROTOCOL instance and populates it and then\r
   installs it on our handle and if there is an existing version of the protocol\r
@@ -66,6 +74,7 @@ CleanUpShellParametersProtocol (
 \r
   @param[in, out] ShellParameters       pointer to parameter structure to modify\r
   @param[in] NewCommandLine             the new command line to parse and use\r
+  @param[in] Type                       the type of operation.\r
   @param[out] OldArgv                   pointer to old list of parameters\r
   @param[out] OldArgc                   pointer to old number of items in Argv list\r
 \r
@@ -77,6 +86,7 @@ EFIAPI
 UpdateArgcArgv(\r
   IN OUT EFI_SHELL_PARAMETERS_PROTOCOL  *ShellParameters,\r
   IN CONST CHAR16                       *NewCommandLine,\r
+  IN SHELL_OPERATION_TYPES              Type,\r
   OUT CHAR16                            ***OldArgv,\r
   OUT UINTN                             *OldArgc\r
   );\r
@@ -162,9 +172,11 @@ RestoreStdInStdOutStdErr (
   parameters for inclusion in EFI_SHELL_PARAMETERS_PROTOCOL.  this supports space\r
   delimited and quote surrounded parameter definition.\r
 \r
-  @param[in] CommandLine         String of command line to parse\r
-  @param[in, out] Argv           pointer to array of strings; one for each parameter\r
-  @param[in, out] Argc           pointer to number of strings in Argv array\r
+  @param[in] CommandLine          String of command line to parse\r
+  @param[in] StripQuotation       if TRUE then strip the quotation marks surrounding\r
+                                  the parameters.\r
+  @param[in, out] Argv            pointer to array of strings; one for each parameter\r
+  @param[in, out] Argc            pointer to number of strings in Argv array\r
 \r
   @return EFI_SUCCESS           the operation was sucessful\r
   @return EFI_OUT_OF_RESOURCES  a memory allocation failed.\r
@@ -173,8 +185,9 @@ EFI_STATUS
 EFIAPI\r
 ParseCommandLineToArgs(\r
   IN CONST CHAR16 *CommandLine,\r
-  IN OUT CHAR16 ***Argv,\r
-  IN OUT UINTN *Argc\r
+  IN BOOLEAN      StripQuotation,\r
+  IN OUT CHAR16   ***Argv,\r
+  IN OUT UINTN    *Argc\r
   );\r
 \r
 /**\r
@@ -187,18 +200,23 @@ ParseCommandLineToArgs(
   Temp Parameter must be large enough to hold the parameter before calling this\r
   function.\r
 \r
-  @param[in, out] Walker        pointer to string of command line.  Adjusted to\r
-                                reminaing command line on return\r
-  @param[in, out] TempParameter pointer to string of command line item extracted.\r
-  @param[in]      Length        Length of (*TempParameter) in bytes\r
+  @param[in, out] Walker          pointer to string of command line.  Adjusted to\r
+                                  reminaing command line on return\r
+  @param[in, out] TempParameter   pointer to string of command line item extracted.\r
+  @param[in]      Length          Length of (*TempParameter) in bytes\r
+  @param[in]      StripQuotation  if TRUE then strip the quotation marks surrounding\r
+                                  the parameters.\r
 \r
+  @return   EFI_INALID_PARAMETER  A required parameter was NULL or pointed to a NULL or empty string.\r
+  @return   EFI_NOT_FOUND         A closing " could not be found on the specified string\r
 **/\r
-VOID\r
+EFI_STATUS\r
 EFIAPI\r
 GetNextParameter(\r
   IN OUT CHAR16   **Walker,\r
   IN OUT CHAR16   **TempParameter,\r
-  IN CONST UINTN  Length\r
+  IN CONST UINTN  Length,\r
+  IN BOOLEAN      StripQuotation\r
   );\r
 \r
 #endif //_SHELL_PARAMETERS_PROTOCOL_PROVIDER_HEADER_\r