Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

FormBrowser2.h 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. /** @file
  2. This protocol is defined in UEFI spec.
  3. The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to
  4. leverage the EFI configuration driver interface.
  5. Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
  6. This program and the accompanying materials are licensed and made available under
  7. the terms and conditions of the BSD License that accompanies this distribution.
  8. The full text of the license may be found at
  9. http://opensource.org/licenses/bsd-license.php.
  10. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  12. **/
  13. #ifndef __EFI_FORM_BROWSER2_H__
  14. #define __EFI_FORM_BROWSER2_H__
  15. FILE_LICENCE ( BSD3 );
  16. #include <ipxe/efi/Guid/HiiPlatformSetupFormset.h>
  17. #define EFI_FORM_BROWSER2_PROTOCOL_GUID \
  18. {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }}
  19. typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;
  20. /**
  21. @param LeftColumn The value that designates the text column
  22. where the browser window will begin from
  23. the left-hand side of the screen
  24. @param RightColumn The value that designates the text
  25. column where the browser window will end
  26. on the right-hand side of the screen.
  27. @param TopRow The value that designates the text row from the
  28. top of the screen where the browser window
  29. will start.
  30. @param BottomRow The value that designates the text row from the
  31. bottom of the screen where the browser
  32. window will end.
  33. **/
  34. typedef struct {
  35. UINTN LeftColumn;
  36. UINTN RightColumn;
  37. UINTN TopRow;
  38. UINTN BottomRow;
  39. } EFI_SCREEN_DESCRIPTOR;
  40. typedef UINTN EFI_BROWSER_ACTION_REQUEST;
  41. #define EFI_BROWSER_ACTION_REQUEST_NONE 0
  42. #define EFI_BROWSER_ACTION_REQUEST_RESET 1
  43. #define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
  44. #define EFI_BROWSER_ACTION_REQUEST_EXIT 3
  45. #define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 4
  46. #define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5
  47. #define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6
  48. #define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD 7
  49. /**
  50. Initialize the browser to display the specified configuration forms.
  51. This function is the primary interface to the internal forms-based browser.
  52. The forms browser will display forms associated with the specified Handles.
  53. The browser will select all forms in packages which have the specified Type
  54. and (for EFI_HII_PACKAGE_TYPE_GUID) the specified PackageGuid.
  55. @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance
  56. @param Handles A pointer to an array of Handles. This value should correspond
  57. to the value of the HII form package that is required to be displayed.
  58. @param HandleCount The number of Handles specified in Handle.
  59. @param FormSetGuid This field points to the EFI_GUID which must match the Guid field or one of the
  60. elements of the ClassId field in the EFI_IFR_FORM_SET op-code. If
  61. FormsetGuid is NULL, then this function will display the form set class
  62. EFI_HII_PLATFORM_SETUP_FORMSET_GUID.
  63. @param FormId This field specifies the identifier of the form within the form set to render as the first
  64. displayable page. If this field has a value of 0x0000, then the Forms Browser will
  65. render the first enabled form in the form set.
  66. @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in
  67. characters.
  68. @param ActionRequest Points to the action recommended by the form.
  69. @retval EFI_SUCCESS The function completed successfully
  70. @retval EFI_NOT_FOUND The variable was not found.
  71. @retval EFI_INVALID_PARAMETER One of the parameters has an
  72. invalid value.
  73. **/
  74. typedef
  75. EFI_STATUS
  76. (EFIAPI *EFI_SEND_FORM2)(
  77. IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
  78. IN EFI_HII_HANDLE *Handle,
  79. IN UINTN HandleCount,
  80. IN EFI_GUID *FormSetGuid, OPTIONAL
  81. IN EFI_FORM_ID FormId, OPTIONAL
  82. IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
  83. OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
  84. );
  85. /**
  86. This function is called by a callback handler to retrieve uncommitted state data from the browser.
  87. This routine is called by a routine which was called by the
  88. browser. This routine called this service in the browser to
  89. retrieve or set certain uncommitted state information.
  90. @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
  91. @param ResultsDataSize A pointer to the size of the buffer
  92. associated with ResultsData. On input, the size in
  93. bytes of ResultsData. On output, the size of data
  94. returned in ResultsData.
  95. @param ResultsData A string returned from an IFR browser or
  96. equivalent. The results string will have
  97. no routing information in them.
  98. @param RetrieveData A BOOLEAN field which allows an agent to
  99. retrieve (if RetrieveData = TRUE) data
  100. from the uncommitted browser state
  101. information or set (if RetrieveData =
  102. FALSE) data in the uncommitted browser
  103. state information.
  104. @param VariableGuid An optional field to indicate the target
  105. variable GUID name to use.
  106. @param VariableName An optional field to indicate the target
  107. human-readable variable name.
  108. @retval EFI_SUCCESS The results have been distributed or are
  109. awaiting distribution.
  110. @retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified
  111. was too small to contain the
  112. results data.
  113. **/
  114. typedef
  115. EFI_STATUS
  116. (EFIAPI *EFI_BROWSER_CALLBACK2)(
  117. IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
  118. IN OUT UINTN *ResultsDataSize,
  119. IN OUT EFI_STRING ResultsData,
  120. IN CONST BOOLEAN RetrieveData,
  121. IN CONST EFI_GUID *VariableGuid, OPTIONAL
  122. IN CONST CHAR16 *VariableName OPTIONAL
  123. );
  124. ///
  125. /// This interface will allow the caller to direct the configuration
  126. /// driver to use either the HII database or use the passed-in packet of data.
  127. ///
  128. struct _EFI_FORM_BROWSER2_PROTOCOL {
  129. EFI_SEND_FORM2 SendForm;
  130. EFI_BROWSER_CALLBACK2 BrowserCallback;
  131. } ;
  132. extern EFI_GUID gEfiFormBrowser2ProtocolGuid;
  133. #endif