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