]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / HexEdit / FileImage.h
CommitLineData
632820d1 1/** @file\r
ba0014b9 2 Defines FileImage - the view of the file that is visible at any point,\r
632820d1 3 as well as the event handlers for editing the file\r
ba0014b9
LG
4\r
5 Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>\r
56ba3746 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
632820d1 7\r
8**/\r
9\r
10#ifndef _LIB_FILE_IMAGE_H_\r
11#define _LIB_FILE_IMAGE_H_\r
12\r
13#include "HexEditor.h"\r
14\r
a1d4bfcc 15/**\r
16 Initialization function for HFileImage\r
ba0014b9 17\r
a1d4bfcc 18 @retval EFI_SUCCESS The operation was successful.\r
19**/\r
632820d1 20EFI_STATUS\r
21HFileImageInit (\r
22 VOID\r
23 );\r
a1d4bfcc 24\r
25/**\r
26 Cleanup function for HFileImage.\r
27\r
28 @retval EFI_SUCCESS The operation was successful.\r
29**/\r
632820d1 30EFI_STATUS\r
31HFileImageCleanup (\r
32 VOID\r
33 );\r
a1d4bfcc 34\r
35/**\r
ba0014b9 36 Backup function for HFileImage. Only a few fields need to be backup.\r
a1d4bfcc 37 This is for making the file buffer refresh as few as possible.\r
38\r
39 @retval EFI_SUCCESS The operation was successful.\r
40 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
41**/\r
632820d1 42EFI_STATUS\r
43HFileImageBackup (\r
44 VOID\r
45 );\r
46\r
a1d4bfcc 47/**\r
48 Read a file from disk into HBufferImage.\r
632820d1 49\r
a1d4bfcc 50 @param[in] FileName filename to read.\r
51 @param[in] Recover if is for recover, no information print.\r
632820d1 52\r
a1d4bfcc 53 @retval EFI_SUCCESS The operation was successful.\r
54 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
a048af3c 55 @retval EFI_LOAD_ERROR A load error occurred.\r
a1d4bfcc 56**/\r
632820d1 57EFI_STATUS\r
58HFileImageRead (\r
a1d4bfcc 59 IN CONST CHAR16 *FileName,\r
47d20b54 60 IN BOOLEAN Recover\r
632820d1 61 );\r
a1d4bfcc 62\r
63/**\r
64 Save lines in HBufferImage to disk.\r
65\r
66 @param[in] FileName The file name.\r
67\r
68 @retval EFI_SUCCESS The operation was successful.\r
69 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
a048af3c 70 @retval EFI_LOAD_ERROR A load error occurred.\r
a1d4bfcc 71**/\r
632820d1 72EFI_STATUS\r
73HFileImageSave (\r
47d20b54 74 IN CHAR16 *FileName\r
632820d1 75 );\r
76\r
77#endif\r