MemImage.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /** @file
  2. Defines MemImage - the view of the file that is visible at any point,
  3. as well as the event handlers for editing the file
  4. Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef _LIB_MEM_IMAGE_H_
  8. #define _LIB_MEM_IMAGE_H_
  9. #include "HexEditor.h"
  10. /**
  11. Initialization function for HDiskImage.
  12. @retval EFI_SUCCESS The operation was successful.
  13. @retval EFI_LOAD_ERROR A load error occurred.
  14. **/
  15. EFI_STATUS
  16. HMemImageInit (
  17. VOID
  18. );
  19. /**
  20. Backup function for HDiskImage. Only a few fields need to be backup.
  21. This is for making the Disk buffer refresh as few as possible.
  22. @retval EFI_SUCCESS The operation was successful.
  23. **/
  24. EFI_STATUS
  25. HMemImageBackup (
  26. VOID
  27. );
  28. /**
  29. Set FileName field in HFileImage.
  30. @param[in] Offset The offset.
  31. @param[in] Size The size.
  32. @retval EFI_SUCCESS The operation was successful.
  33. @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
  34. **/
  35. EFI_STATUS
  36. HMemImageSetMemOffsetSize (
  37. IN UINTN Offset,
  38. IN UINTN Size
  39. );
  40. /**
  41. Read a disk from disk into HBufferImage.
  42. @param[in] Offset The offset.
  43. @param[in] Size The size.
  44. @param[in] Recover if is for recover, no information print.
  45. @retval EFI_LOAD_ERROR A load error occurred.
  46. @retval EFI_SUCCESS The operation was successful.
  47. @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
  48. **/
  49. EFI_STATUS
  50. HMemImageRead (
  51. IN UINTN Offset,
  52. IN UINTN Size,
  53. IN BOOLEAN Recover
  54. );
  55. /**
  56. Save lines in HBufferImage to disk.
  57. @param[in] Offset The offset.
  58. @param[in] Size The size.
  59. @retval EFI_LOAD_ERROR A load error occurred.
  60. @retval EFI_SUCCESS The operation was successful.
  61. @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
  62. **/
  63. EFI_STATUS
  64. HMemImageSave (
  65. IN UINTN Offset,
  66. IN UINTN Size
  67. );
  68. #endif