]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h
ShellPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / UefiShellLevel2CommandsLib.h
index 80f6d59ee9f5bd5896a896cb51e04c1433b3c478..6d522d4bb4a1ac0b1bcdb914fbe1e075ccc02006 100644 (file)
@@ -9,14 +9,8 @@
   * functions are non-interactive only\r
 \r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #define _UEFI_SHELL_LEVEL2_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
-#include <ShellBase.h>\r
 \r
-#include <Protocol/EfiShell.h>\r
-#include <Protocol/EfiShellParameters.h>\r
+#include <Guid/GlobalVariable.h>\r
+#include <Guid/ShellLibHiiGuid.h>\r
+\r
+#include <Protocol/Shell.h>\r
+#include <Protocol/ShellParameters.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/HiiLib.h>\r
 #include <Library/SortLib.h>\r
 #include <Library/FileHandleLib.h>\r
-#include <Library/PathLib.h>\r
 \r
 extern CONST  CHAR16                            mFileName[];\r
 extern        EFI_HANDLE                        gShellLevel2HiiHandle;\r
-extern CONST  EFI_GUID                          gShellLevel2HiiGuid;\r
 \r
 /**\r
   Function for 'attrib' command.\r
@@ -264,7 +257,6 @@ ShellCommandRunMv (
   @retval other           pointer to a fuly qualified path.\r
 **/\r
 CHAR16*\r
-EFIAPI\r
 GetFullyQualifiedPath(\r
   IN CONST CHAR16* Path\r
   );\r
@@ -277,29 +269,44 @@ GetFullyQualifiedPath(
   @retval EFI_SUCCESS   The operation was successful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 VerifyIntermediateDirectories (\r
   IN CONST CHAR16 *Path\r
   );\r
 \r
 /**\r
-  CaseInsensitive length limited string comparison.\r
+  String comparison without regard to case for a limited number of characters.\r
 \r
-  @param[in] Source   Pointer to first string.\r
-  @param[in] Target   Pointer to second string.\r
-  @param[in] Count    Number of characters to compare.\r
+  @param[in] Source   The first item to compare.\r
+  @param[in] Target   The second item to compare.\r
+  @param[in] Count    How many characters to compare.\r
+\r
+  @retval 0    Source and Target are identical strings without regard to case.\r
+  @retval !=0  Source is not identical to Target.\r
 \r
-  @retval 0   The strings are the same.\r
-  @return     non-zero if the strings are different.\r
 **/\r
-CONST CHAR16*\r
-EFIAPI\r
+INTN\r
 StrniCmp(\r
   IN CONST CHAR16 *Source,\r
   IN CONST CHAR16 *Target,\r
   IN CONST UINTN  Count\r
   );\r
 \r
+/**\r
+  Cleans off all the quotes in the string.\r
+\r
+  @param[in]     OriginalString   pointer to the string to be cleaned.\r
+  @param[out]   CleanString      The new string with all quotes removed.\r
+                                                  Memory allocated in the function and free\r
+                                                  by caller.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
+EFI_STATUS\r
+ShellLevel2StripQuotes (\r
+  IN  CONST CHAR16     *OriginalString,\r
+  OUT CHAR16           **CleanString\r
+  );\r
+\r
 /**\r
   Function for 'Vol' command.\r
 \r
@@ -313,5 +320,44 @@ ShellCommandRunVol (
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   );\r
 \r
+/**\r
+  Function to Copy one file to another location\r
+\r
+  If the destination exists the user will be prompted and the result put into *resp\r
+\r
+  @param[in] Source     pointer to source file name\r
+  @param[in] Dest       pointer to destination file name\r
+  @param[out] Resp      pointer to response from question.  Pass back on looped calling\r
+  @param[in] SilentMode whether to run in quiet mode or not\r
+  @param[in] CmdName    Source command name requesting single file copy\r
+\r
+  @retval SHELL_SUCCESS   The source file was copied to the destination\r
+**/\r
+SHELL_STATUS\r
+CopySingleFile(\r
+  IN CONST CHAR16 *Source,\r
+  IN CONST CHAR16 *Dest,\r
+  OUT VOID        **Resp,\r
+  IN BOOLEAN      SilentMode,\r
+  IN CONST CHAR16 *CmdName\r
+  );\r
+\r
+/**\r
+  Delete a node and all nodes under it (including sub directories).\r
+\r
+  @param[in] Node   The node to start deleting with.\r
+  @param[in] Quiet  TRUE to print no messages.\r
+\r
+  @retval SHELL_SUCCESS       The operation was successful.\r
+  @retval SHELL_ACCESS_DENIED A file was read only.\r
+  @retval SHELL_ABORTED       The abort message was received.\r
+  @retval SHELL_DEVICE_ERROR  A device error occured reading this Node.\r
+**/\r
+SHELL_STATUS\r
+CascadeDelete(\r
+  IN EFI_SHELL_FILE_INFO  *Node,\r
+  IN CONST BOOLEAN        Quiet\r
+  );\r
+\r
 #endif\r
 \r