Home | History | Annotate | Download | only in SectionExtraction
      1 /*++
      2 
      3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
      4 This program and the accompanying materials
      5 are licensed and made available under the terms and conditions of the BSD License
      6 which accompanies this distribution.  The full text of the license may be found at
      7 http://opensource.org/licenses/bsd-license.php
      8 
      9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     11 
     12 Module Name:
     13 
     14   SectionExtraction.h
     15 
     16 Abstract:
     17 
     18   Section extraction protocol as defined in the Tiano File Image Format specification.
     19 
     20   This interface provides a means of decoding a set of sections into a linked list of
     21   leaf sections.  This provides for an extensible and flexible file format.
     22 
     23 --*/
     24 
     25 #ifndef _SECTION_EXTRACTION_PROTOCOL_H
     26 #define _SECTION_EXTRACTION_PROTOCOL_H
     27 
     28 #include "EfiFirmwareFileSystem.h"
     29 
     30 //
     31 // Protocol GUID definition
     32 //
     33 #define EFI_SECTION_EXTRACTION_PROTOCOL_GUID \
     34   { \
     35     0x448F5DA4, 0x6DD7, 0x4FE1, {0x93, 0x07, 0x69, 0x22, 0x41, 0x92, 0x21, 0x5D} \
     36   }
     37 
     38 EFI_FORWARD_DECLARATION (EFI_SECTION_EXTRACTION_PROTOCOL);
     39 
     40 //
     41 // Protocol member functions
     42 //
     43 typedef
     44 EFI_STATUS
     45 (EFIAPI *EFI_OPEN_SECTION_STREAM) (
     46   IN  EFI_SECTION_EXTRACTION_PROTOCOL                   * This,
     47   IN  UINTN                                             SectionStreamLength,
     48   IN  VOID                                              *SectionStream,
     49   OUT UINTN                                             *SectionStreamHandle
     50   );
     51 
     52 typedef
     53 EFI_STATUS
     54 (EFIAPI *EFI_GET_SECTION) (
     55   IN EFI_SECTION_EXTRACTION_PROTOCOL                    * This,
     56   IN UINTN                                              SectionStreamHandle,
     57   IN EFI_SECTION_TYPE                                   * SectionType,
     58   IN EFI_GUID                                           * SectionDefinitionGuid,
     59   IN UINTN                                              SectionInstance,
     60   IN VOID                                               **Buffer,
     61   IN OUT UINTN                                          *BufferSize,
     62   OUT UINT32                                            *AuthenticationStatus
     63   );
     64 
     65 typedef
     66 EFI_STATUS
     67 (EFIAPI *EFI_CLOSE_SECTION_STREAM) (
     68   IN EFI_SECTION_EXTRACTION_PROTOCOL                    * This,
     69   IN UINTN                                              SectionStreamHandle
     70   );
     71 
     72 //
     73 // Protocol definition
     74 //
     75 struct _EFI_SECTION_EXTRACTION_PROTOCOL {
     76   EFI_OPEN_SECTION_STREAM   OpenSectionStream;
     77   EFI_GET_SECTION           GetSection;
     78   EFI_CLOSE_SECTION_STREAM  CloseSectionStream;
     79 };
     80 
     81 extern EFI_GUID gEfiSectionExtractionProtocolGuid;
     82 
     83 #endif
     84