2011-03-25 22:15:07 +01:00
|
|
|
/** @file
|
2018-06-27 15:13:38 +02:00
|
|
|
Defines FileImage - the view of the file that is visible at any point,
|
2011-03-25 22:15:07 +01:00
|
|
|
as well as the event handlers for editing the file
|
2018-06-27 15:13:38 +02:00
|
|
|
|
|
|
|
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
|
2019-04-04 01:07:06 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2011-03-25 22:15:07 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef _LIB_FILE_IMAGE_H_
|
|
|
|
#define _LIB_FILE_IMAGE_H_
|
|
|
|
|
|
|
|
#include "HexEditor.h"
|
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
/**
|
|
|
|
Initialization function for HFileImage
|
2018-06-27 15:13:38 +02:00
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HFileImageInit (
|
|
|
|
VOID
|
|
|
|
);
|
2011-04-05 22:55:45 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Cleanup function for HFileImage.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HFileImageCleanup (
|
|
|
|
VOID
|
|
|
|
);
|
2011-04-05 22:55:45 +02:00
|
|
|
|
|
|
|
/**
|
2018-06-27 15:13:38 +02:00
|
|
|
Backup function for HFileImage. Only a few fields need to be backup.
|
2011-04-05 22:55:45 +02:00
|
|
|
This is for making the file buffer refresh as few as possible.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HFileImageBackup (
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
/**
|
|
|
|
Read a file from disk into HBufferImage.
|
2011-03-25 22:15:07 +01:00
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
@param[in] FileName filename to read.
|
|
|
|
@param[in] Recover if is for recover, no information print.
|
2011-03-25 22:15:07 +01:00
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
2020-08-01 02:52:32 +02:00
|
|
|
@retval EFI_LOAD_ERROR A load error occurred.
|
2011-04-05 22:55:45 +02:00
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HFileImageRead (
|
2011-04-05 22:55:45 +02:00
|
|
|
IN CONST CHAR16 *FileName,
|
|
|
|
IN BOOLEAN Recover
|
2011-03-25 22:15:07 +01:00
|
|
|
);
|
2011-04-05 22:55:45 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Save lines in HBufferImage to disk.
|
|
|
|
|
|
|
|
@param[in] FileName The file name.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
2020-08-01 02:52:32 +02:00
|
|
|
@retval EFI_LOAD_ERROR A load error occurred.
|
2011-04-05 22:55:45 +02:00
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HFileImageSave (
|
2011-04-05 22:55:45 +02:00
|
|
|
IN CHAR16 *FileName
|
2011-03-25 22:15:07 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|