]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/Dxe/Include/GetImage.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / Include / GetImage.h
CommitLineData
3eb9473e 1/*++\r
2\r
4ea9375a
HT
3Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials\r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 GetImage.h\r
15\r
16Abstract:\r
17\r
18 Image data retrieval support for common use.\r
19\r
20--*/\r
21\r
22#ifndef _GET_IMAGE_H_\r
23#define _GET_IMAGE_H_\r
24#include "EfiImageFormat.h"\r
25\r
26EFI_STATUS\r
27GetImage (\r
28 IN EFI_GUID *NameGuid,\r
29 IN EFI_SECTION_TYPE SectionType,\r
30 OUT VOID **Buffer,\r
31 OUT UINTN *Size\r
32 )\r
33/*++\r
34\r
35Routine Description:\r
36 Enumerate all the FVs, and fill Buffer with the SectionType section content in NameGuid file.\r
37\r
38 Note:\r
39 1. when SectionType is EFI_SECTION_PE32, it tries to read NameGuid file after failure on \r
40 reading EFI_SECTION_PE32 section.\r
41 2. when SectionType is EFI_SECTION_TE, it tries to get EFI_SECTION_PE32 section after failure on\r
42 reading EFI_SECTION_TE section. If it's failed again, it tries to read NameGuid file.\r
43 3. Callee allocates memory, which caller is responsible to free.\r
44\r
45Arguments:\r
46\r
47 NameGuid - Pointer to EFI_GUID, which is file name.\r
48 SectionType - Required section type.\r
49 Buffer - Pointer to a pointer in which the read content is returned.\r
50 Caller is responsible to free Buffer.\r
51 Size - Pointer to a UINTN, which indicates the size of returned *Buffer.\r
52\r
53Returns:\r
54 EFI_NOT_FOUND - Required content can not be found.\r
55 EFI_SUCCESS - Required content can be found, but whether the Buffer is filled \r
56 with section content or not depends on the Buffer and Size.\r
57--*/\r
58;\r
59\r
60EFI_STATUS\r
61GetImageEx (\r
62 IN EFI_HANDLE ImageHandle,\r
63 IN EFI_GUID *NameGuid,\r
64 IN EFI_SECTION_TYPE SectionType,\r
65 OUT VOID **Buffer,\r
66 OUT UINTN *Size,\r
67 BOOLEAN WithinImageFv\r
68 )\r
69/*++\r
70\r
71Routine Description:\r
72 Search FVs, and fill Buffer with the SectionType section content in NameGuid file.\r
73 If ImageHandle is not NULL, the FV from which the ImageHandle is loaded is searched\r
74 first. If WithinImageFv is TRUE, only the FV from which the ImageHandle is loaded\r
75 is searched. If ImageHandle is NULL or WithinImageFv is FALSE, all FVs in the system\r
76 is searched.\r
77\r
78 Note:\r
79 1. when SectionType is EFI_SECTION_PE32, it tries to read NameGuid file after failure on \r
80 reading EFI_SECTION_PE32 section.\r
81 2. when SectionType is EFI_SECTION_TE, it tries to get EFI_SECTION_PE32 section after failure on\r
82 reading EFI_SECTION_TE section. If it's failed again, it tries to read NameGuid file.\r
83 3. Callee allocates memory, which caller is responsible to free.\r
84\r
85Arguments:\r
86\r
87 ImageHandle - The caller's driver image handle.\r
88 NameGuid - Pointer to EFI_GUID, which is file name.\r
89 SectionType - Required section type.\r
90 Buffer - Pointer to a pointer in which the read content is returned.\r
91 Caller is responsible to free Buffer.\r
92 Size - Pointer to a UINTN, which indicates the size of returned *Buffer.\r
93 WithinImageFv - Whether the search only performs on the FV from which the caller's\r
94 driver image is loaded.\r
95\r
96Returns:\r
97 EFI_INVALID_PARAMETER - ImageHandle is NULL and WithinImageFv is TRUE.\r
98 EFI_NOT_FOUND - Required content can not be found.\r
99 EFI_SUCCESS - Required content can be found, but whether the Buffer is filled \r
100 with section content or not depends on the Buffer and Size.\r
101--*/\r
102;\r
103\r
104#endif //_GET_IMAGE_H_\r