]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.h
ShellPkg: Clean up source files
[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 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _LIB_FILE_IMAGE_H_
17 #define _LIB_FILE_IMAGE_H_
18
19 #include "HexEditor.h"
20
21 /**
22 Initialization function for HFileImage
23
24 @retval EFI_SUCCESS The operation was successful.
25 **/
26 EFI_STATUS
27 HFileImageInit (
28 VOID
29 );
30
31 /**
32 Cleanup function for HFileImage.
33
34 @retval EFI_SUCCESS The operation was successful.
35 **/
36 EFI_STATUS
37 HFileImageCleanup (
38 VOID
39 );
40
41 /**
42 Backup function for HFileImage. Only a few fields need to be backup.
43 This is for making the file buffer refresh as few as possible.
44
45 @retval EFI_SUCCESS The operation was successful.
46 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
47 **/
48 EFI_STATUS
49 HFileImageBackup (
50 VOID
51 );
52
53 /**
54 Read a file from disk into HBufferImage.
55
56 @param[in] FileName filename to read.
57 @param[in] Recover if is for recover, no information print.
58
59 @retval EFI_SUCCESS The operation was successful.
60 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
61 @retval EFI_LOAD_ERROR A load error occured.
62 **/
63 EFI_STATUS
64 HFileImageRead (
65 IN CONST CHAR16 *FileName,
66 IN BOOLEAN Recover
67 );
68
69 /**
70 Save lines in HBufferImage to disk.
71
72 @param[in] FileName The file name.
73
74 @retval EFI_SUCCESS The operation was successful.
75 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
76 @retval EFI_LOAD_ERROR A load error occured.
77 **/
78 EFI_STATUS
79 HFileImageSave (
80 IN CHAR16 *FileName
81 );
82
83 #endif