]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/ParseGuidedSectionTools.h
Check In tool source code based on Build tool project revision r1655.
[mirror_edk2.git] / BaseTools / Source / C / Common / ParseGuidedSectionTools.h
diff --git a/BaseTools/Source/C/Common/ParseGuidedSectionTools.h b/BaseTools/Source/C/Common/ParseGuidedSectionTools.h
new file mode 100644 (file)
index 0000000..d30afff
--- /dev/null
@@ -0,0 +1,133 @@
+/** @file\r
+\r
+Copyright (c) 2007 - 2008, Intel Corporation                                                         \r
+All rights reserved. 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
+\r
+Module Name:\r
+\r
+  ParseGuidedSectionTools.h\r
+\r
+Abstract:\r
+\r
+  Header file for helper functions for parsing GuidedSectionTools.txt\r
+\r
+**/\r
+\r
+#ifndef _EFI_PARSE_GUIDED_SECTION_TOOLS_H\r
+#define _EFI_PARSE_GUIDED_SECTION_TOOLS_H\r
+\r
+#include <Common/UefiBaseTypes.h>\r
+\r
+//\r
+// Functions declarations\r
+//\r
+\r
+EFI_HANDLE\r
+ParseGuidedSectionToolsFile (\r
+  IN CHAR8    *InputFile\r
+  )\r
+;\r
+/**\r
+\r
+Routine Description:\r
+\r
+  This function parses the tools_def.txt file.  It returns a\r
+  EFI_HANDLE object which can be used for the other library\r
+  functions and should be passed to FreeParsedToolsDefHandle\r
+  to free resources when the tools_def.txt information is no\r
+  longer needed.\r
+\r
+Arguments:\r
+\r
+  InputFile     Path name of file to read\r
+\r
+Returns:\r
+\r
+  NULL if error parsing\r
+  A non-NULL EFI_HANDLE otherwise\r
+\r
+**/\r
+\r
+\r
+EFI_HANDLE\r
+ParseGuidedSectionToolsMemoryFile (\r
+  IN EFI_HANDLE    InputFile\r
+  )\r
+;\r
+/**\r
+\r
+Routine Description:\r
+\r
+  This function parses the tools_def.txt file.  It returns a\r
+  EFI_HANDLE object which can be used for the other library\r
+  functions and should be passed to FreeParsedToolsDefHandle\r
+  to free resources when the tools_def.txt information is no\r
+  longer needed.\r
+\r
+Arguments:\r
+\r
+  InputFile     Memory file image.\r
+\r
+Returns:\r
+\r
+  NULL if error parsing\r
+  A non-NULL EFI_HANDLE otherwise\r
+\r
+**/\r
+\r
+CHAR8*\r
+LookupGuidedSectionToolPath (\r
+  IN EFI_HANDLE ParsedGuidedSectionToolsHandle,\r
+  IN EFI_GUID   *SectionGuid\r
+  )\r
+;\r
+/**\r
+\r
+Routine Description:\r
+\r
+  This function looks up the appropriate tool to use for extracting\r
+  a GUID defined FV section.\r
+\r
+Arguments:\r
+\r
+  ParsedGuidedSectionToolsHandle    A parsed GUID section tools handle.\r
+  SectionGuid                       The GUID for the section.\r
+\r
+Returns:\r
+\r
+  NULL     - if no tool is found or there is another error\r
+  Non-NULL - The tool to use to access the section contents.  (The caller\r
+             must free the memory associated with this string.)\r
+\r
+**/\r
+\r
+EFI_STATUS\r
+FreeParsedGuidedSectionToolsHandle (\r
+  IN EFI_HANDLE ParsedGuidedSectionToolsHandle\r
+  )\r
+;\r
+/**\r
+\r
+Routine Description:\r
+\r
+  Frees resources that were allocated by ParseGuidedSectionToolsFile.\r
+  After freeing these resources, the information that was parsed\r
+  is no longer accessible.\r
+\r
+Arguments:\r
+\r
+  ParsedToolDefHandle   Handle returned from ParseGuidedSectionToolsFile\r
+\r
+Returns:\r
+\r
+  EFI_STATUS\r
+\r
+**/\r
+\r
+#endif\r