]>
Commit | Line | Data |
---|---|---|
632820d1 | 1 | /** @file\r |
ba0014b9 | 2 | Defines MemImage - 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_MEM_IMAGE_H_\r | |
11 | #define _LIB_MEM_IMAGE_H_\r | |
12 | \r | |
13 | #include "HexEditor.h"\r | |
14 | \r | |
a1d4bfcc | 15 | /**\r |
16 | Initialization function for HDiskImage.\r | |
17 | \r | |
18 | @retval EFI_SUCCESS The operation was successful.\r | |
a048af3c | 19 | @retval EFI_LOAD_ERROR A load error occurred.\r |
a1d4bfcc | 20 | **/\r |
632820d1 | 21 | EFI_STATUS\r |
22 | HMemImageInit (\r | |
23 | VOID\r | |
24 | );\r | |
a1d4bfcc | 25 | \r |
26 | /**\r | |
ba0014b9 | 27 | Backup function for HDiskImage. Only a few fields need to be backup.\r |
a1d4bfcc | 28 | This is for making the Disk buffer refresh as few as possible.\r |
29 | \r | |
30 | @retval EFI_SUCCESS The operation was successful.\r | |
31 | **/\r | |
632820d1 | 32 | EFI_STATUS\r |
33 | HMemImageBackup (\r | |
34 | VOID\r | |
35 | );\r | |
36 | \r | |
a1d4bfcc | 37 | /**\r |
38 | Set FileName field in HFileImage.\r | |
39 | \r | |
40 | @param[in] Offset The offset.\r | |
41 | @param[in] Size The size.\r | |
42 | \r | |
43 | @retval EFI_SUCCESS The operation was successful.\r | |
44 | @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r | |
45 | **/\r | |
632820d1 | 46 | EFI_STATUS\r |
47 | HMemImageSetMemOffsetSize (\r | |
47d20b54 MK |
48 | IN UINTN Offset,\r |
49 | IN UINTN Size\r | |
632820d1 | 50 | );\r |
51 | \r | |
a1d4bfcc | 52 | /**\r |
53 | Read a disk from disk into HBufferImage.\r | |
54 | \r | |
55 | @param[in] Offset The offset.\r | |
56 | @param[in] Size The size.\r | |
57 | @param[in] Recover if is for recover, no information print.\r | |
58 | \r | |
a048af3c | 59 | @retval EFI_LOAD_ERROR A load error occurred.\r |
a1d4bfcc | 60 | @retval EFI_SUCCESS The operation was successful.\r |
61 | @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r | |
62 | **/\r | |
632820d1 | 63 | EFI_STATUS\r |
64 | HMemImageRead (\r | |
47d20b54 MK |
65 | IN UINTN Offset,\r |
66 | IN UINTN Size,\r | |
67 | IN BOOLEAN Recover\r | |
632820d1 | 68 | );\r |
a1d4bfcc | 69 | \r |
70 | /**\r | |
71 | Save lines in HBufferImage to disk.\r | |
72 | \r | |
73 | @param[in] Offset The offset.\r | |
74 | @param[in] Size The size.\r | |
75 | \r | |
a048af3c | 76 | @retval EFI_LOAD_ERROR A load error occurred.\r |
a1d4bfcc | 77 | @retval EFI_SUCCESS The operation was successful.\r |
78 | @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r | |
79 | **/\r | |
632820d1 | 80 | EFI_STATUS\r |
81 | HMemImageSave (\r | |
47d20b54 MK |
82 | IN UINTN Offset,\r |
83 | IN UINTN Size\r | |
632820d1 | 84 | );\r |
85 | \r | |
86 | #endif\r |