X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFrameworkPkg%2FInclude%2FProtocol%2FSectionExtraction.h;h=a20f0df064c986dd8ed6dce91d6ba84ee6bd67e9;hp=cdf8f06c5cb8ca428279eb54462c84b4130ab9d8;hb=920d2c23a160b14b13283944477bb9e164884274;hpb=b80fbe8543eb535e40172a263b6b5d633e5b282c diff --git a/IntelFrameworkPkg/Include/Protocol/SectionExtraction.h b/IntelFrameworkPkg/Include/Protocol/SectionExtraction.h index cdf8f06c5c..a20f0df064 100644 --- a/IntelFrameworkPkg/Include/Protocol/SectionExtraction.h +++ b/IntelFrameworkPkg/Include/Protocol/SectionExtraction.h @@ -1,15 +1,16 @@ /** @file - This file declares Section Extraction protocols. + This file declares Section Extraction Protocol. This interface provides a means of decoding a set of sections into a linked list of leaf sections. This provides for an extensible and flexible file format. - Copyright (c) 2007, Intel Corporation - All rights reserved. This program and the materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at + Copyright (c) 2006 - 2007, Intel Corporation + All rights reserved. This program and the accompanying + materials are licensed and made available under the terms and + conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php - + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -25,6 +26,7 @@ #define _SECTION_EXTRACTION_PROTOCOL_H_ #include +#include // // Protocol GUID definition @@ -58,7 +60,7 @@ typedef struct _EFI_SECTION_EXTRACTION_PROTOCOL EFI_SECTION_EXTRACTION_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_OPEN_SECTION_STREAM) ( +(EFIAPI *EFI_OPEN_SECTION_STREAM)( IN EFI_SECTION_EXTRACTION_PROTOCOL *This, IN UINTN SectionStreamLength, IN VOID *SectionStream, @@ -70,7 +72,10 @@ EFI_STATUS @param This Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance. @param SectionStreamHandle Indicates from which section stream to read. - @param SectionType Pointer to an EFI_SECTION_TYPE. + @param SectionType Pointer to an EFI_SECTION_TYPE. SectionType == NULL, the contents of the + entire section stream are returned in Buffer.If SectionType is not NULL, + only the requested section is returned. EFI_SECTION_ALL matches all section + types and can be used as a wild card to extract all sections in order. @param SectionDefinitionGuid Pointer to an EFI_GUID.If SectionType == EFI_SECTION_GUID_DEFINED, SectionDefinitionGuid indicates what section GUID to search for.If SectionType !=EFI_SECTION_GUID_DEFINED, then @@ -97,13 +102,13 @@ EFI_STATUS @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the request. @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist. - @retval EFI_BUFFER_TOO_SMALL The size of the input buffer is insufficient to - contain the requested section. + @retval EFI_WARN_BUFFER_TOO_SMALL The size of the input buffer is insufficient to contain the requested + section. The input buffer is filled and section contents are truncated. **/ typedef EFI_STATUS -(EFIAPI *EFI_GET_SECTION) ( +(EFIAPI *EFI_GET_SECTION)( IN EFI_SECTION_EXTRACTION_PROTOCOL *This, IN UINTN SectionStreamHandle, IN EFI_SECTION_TYPE *SectionType, @@ -126,7 +131,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_CLOSE_SECTION_STREAM) ( +(EFIAPI *EFI_CLOSE_SECTION_STREAM)( IN EFI_SECTION_EXTRACTION_PROTOCOL *This, IN UINTN SectionStreamHandle ); @@ -134,25 +139,19 @@ EFI_STATUS // // Protocol definition // -/** - @par Protocol Description: - The Section Extraction Protocol provides a simple method of extracting - sections from arbitrarily complex files. - - @param OpenSectionStream - Takes a bounded stream of sections and returns a section stream handle. - - @param GetSection - Given a section stream handle, retrieves the requested section and - meta-data from the section stream. - - @param CloseSectionStream - Given a section stream handle, closes the section stream. - -**/ struct _EFI_SECTION_EXTRACTION_PROTOCOL { +/// +/// Takes a bounded stream of sections and returns a section stream handle. +/// EFI_OPEN_SECTION_STREAM OpenSectionStream; +/// +/// Given a section stream handle, retrieves the requested section and +/// meta-data from the section stream. +/// EFI_GET_SECTION GetSection; +/// +/// Given a section stream handle, closes the section stream. +/// EFI_CLOSE_SECTION_STREAM CloseSectionStream; };