]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/ParseGuidedSectionTools.h
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / C / Common / ParseGuidedSectionTools.h
1 /** @file
2 Header file for helper functions for parsing GuidedSectionTools.txt
3
4 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _EFI_PARSE_GUIDED_SECTION_TOOLS_H
10 #define _EFI_PARSE_GUIDED_SECTION_TOOLS_H
11
12 #include <Common/UefiBaseTypes.h>
13
14 //
15 // Functions declarations
16 //
17
18 EFI_HANDLE
19 ParseGuidedSectionToolsFile (
20 IN CHAR8 *InputFile
21 )
22 ;
23 /**
24
25 Routine Description:
26
27 This function parses the tools_def.txt file. It returns a
28 EFI_HANDLE object which can be used for the other library
29 functions and should be passed to FreeParsedToolsDefHandle
30 to free resources when the tools_def.txt information is no
31 longer needed.
32
33 Arguments:
34
35 InputFile Path name of file to read
36
37 Returns:
38
39 NULL if error parsing
40 A non-NULL EFI_HANDLE otherwise
41
42 **/
43
44
45 EFI_HANDLE
46 ParseGuidedSectionToolsMemoryFile (
47 IN EFI_HANDLE InputFile
48 )
49 ;
50 /**
51
52 Routine Description:
53
54 This function parses the tools_def.txt file. It returns a
55 EFI_HANDLE object which can be used for the other library
56 functions and should be passed to FreeParsedToolsDefHandle
57 to free resources when the tools_def.txt information is no
58 longer needed.
59
60 Arguments:
61
62 InputFile Memory file image.
63
64 Returns:
65
66 NULL if error parsing
67 A non-NULL EFI_HANDLE otherwise
68
69 **/
70
71 CHAR8*
72 LookupGuidedSectionToolPath (
73 IN EFI_HANDLE ParsedGuidedSectionToolsHandle,
74 IN EFI_GUID *SectionGuid
75 )
76 ;
77 /**
78
79 Routine Description:
80
81 This function looks up the appropriate tool to use for extracting
82 a GUID defined FV section.
83
84 Arguments:
85
86 ParsedGuidedSectionToolsHandle A parsed GUID section tools handle.
87 SectionGuid The GUID for the section.
88
89 Returns:
90
91 NULL - if no tool is found or there is another error
92 Non-NULL - The tool to use to access the section contents. (The caller
93 must free the memory associated with this string.)
94
95 **/
96
97 EFI_STATUS
98 FreeParsedGuidedSectionToolsHandle (
99 IN EFI_HANDLE ParsedGuidedSectionToolsHandle
100 )
101 ;
102 /**
103
104 Routine Description:
105
106 Frees resources that were allocated by ParseGuidedSectionToolsFile.
107 After freeing these resources, the information that was parsed
108 is no longer accessible.
109
110 Arguments:
111
112 ParsedToolDefHandle Handle returned from ParseGuidedSectionToolsFile
113
114 Returns:
115
116 EFI_STATUS
117
118 **/
119
120 #endif