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