NeKernel dev
Loading...
Searching...
No Matches
Boot::BootFileReader Class Referencefinal

BootKit File Reader class Reads the Firmware Boot partition and filesystem. More...

#include <BootKit.h>

Public Types

enum  {
  kOperationOkay , kNotSupported , kEmptyDirectory , kNoSuchEntry ,
  kIsDirectory , kTooSmall , kCount
}

Public Member Functions

BootFileReaderoperator= (const BootFileReader &)=default
 BootFileReader (const BootFileReader &)=default
BootFileReader class

Reads the file as a blob.

 BootFileReader (const CharacterTypeUTF16 *path, EfiHandlePtr ImageHandle)
 ~BootFileReader ()
Void ReadAll (SizeT until, SizeT chunk=kib_cast(4), UIntPtr out_address=0UL)
 Reads all of the file into a buffer.
Int32Error ()
 error code getter.
VoidPtr Blob ()
 blob getter.
UInt64Size ()

Private Attributes

Int32 mErrorCode {kOperationOkay}
VoidPtr mBlob {nullptr}
CharacterTypeUTF16 mPath [kPathLen]
BootTextWriter mWriter
EfiFileProtocolmFile {nullptr}
UInt64 mSizeFile {0}
EfiFileProtocolmRootFs

Detailed Description

BootKit File Reader class Reads the Firmware Boot partition and filesystem.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kOperationOkay 
kNotSupported 
kEmptyDirectory 
kNoSuchEntry 
kIsDirectory 
kTooSmall 
kCount 

Constructor & Destructor Documentation

◆ BootFileReader() [1/2]

Boot::BootFileReader::BootFileReader ( const CharacterTypeUTF16 * path,
EfiHandlePtr ImageHandle )
explicit

Load protocols with their GUIDs.

Start doing disk I/O

◆ ~BootFileReader()

Boot::BootFileReader::~BootFileReader ( )

◆ BootFileReader() [2/2]

Boot::BootFileReader::BootFileReader ( const BootFileReader & )
default

Member Function Documentation

◆ Blob()

VoidPtr Boot::BootFileReader::Blob ( )

blob getter.

Returns
the blob.

◆ Error()

Int32 & Boot::BootFileReader::Error ( )

error code getter.

Returns
the error code.

◆ operator=()

BootFileReader & Boot::BootFileReader::operator= ( const BootFileReader & )
default

◆ ReadAll()

Void Boot::BootFileReader::ReadAll ( SizeT readUntil,
SizeT chunkToRead = kib_cast(4),
UIntPtr out_address = 0UL )

Reads all of the file into a buffer.

Parameters
**readUntil**size of file
**chunkToRead**chunk to read each time.

◆ Size()

UInt64 & Boot::BootFileReader::Size ( )

@breif Size getter.

Returns
the size of the file.

Member Data Documentation

◆ mBlob

VoidPtr Boot::BootFileReader::mBlob {nullptr}
private

◆ mErrorCode

Int32 Boot::BootFileReader::mErrorCode {kOperationOkay}
private

◆ mFile

EfiFileProtocol* Boot::BootFileReader::mFile {nullptr}
private

◆ mPath

CharacterTypeUTF16 Boot::BootFileReader::mPath[kPathLen]
private

◆ mRootFs

EfiFileProtocol* Boot::BootFileReader::mRootFs
private

◆ mSizeFile

UInt64 Boot::BootFileReader::mSizeFile {0}
private

◆ mWriter

BootTextWriter Boot::BootFileReader::mWriter
private

The documentation for this class was generated from the following files: