]> git.proxmox.com Git - mirror_edk2.git/commitdiff
RedfishPkg/Include: PlatformHostInterfaceLib header file
authorAbner Chang <abner.chang@hpe.com>
Tue, 13 Oct 2020 01:23:04 +0000 (09:23 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 2 Nov 2020 05:50:17 +0000 (05:50 +0000)
Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Fan Wang <fan.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
RedfishPkg/Include/Library/RedfishHostInterfaceLib.h [new file with mode: 0644]

diff --git a/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h
new file mode 100644 (file)
index 0000000..fe37b27
--- /dev/null
@@ -0,0 +1,52 @@
+/** @file\r
+  Definitinos of RedfishHostInterfaceDxe driver.\r
+\r
+  (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
+\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+#ifndef REDFISH_HOST_INTERFACE_LIB_H_\r
+#define REDFISH_HOST_INTERFACE_LIB_H_\r
+\r
+#include <Uefi.h>\r
+#include <IndustryStandard/RedfishHostInterface.h>\r
+#include <IndustryStandard/SmBios.h>\r
+\r
+#include <Protocol/Smbios.h>\r
+\r
+/**\r
+  Get platform Redfish host interface device descriptor.\r
+\r
+  @param[in] DeviceType         Pointer to retrieve device type.\r
+  @param[out] DeviceDescriptor  Pointer to retrieve REDFISH_INTERFACE_DATA, caller has to free\r
+                                this memory using FreePool().\r
+  @retval EFI_SUCCESS     Device descriptor is returned successfully in DeviceDescriptor.\r
+  @retval EFI_NOT_FOUND   No Redfish host interface descriptor provided on this platform.\r
+  @retval Others          Fail to get device descriptor.\r
+**/\r
+EFI_STATUS\r
+RedfishPlatformHostInterfaceDeviceDescriptor (\r
+  IN UINT8 *DeviceType,\r
+  OUT REDFISH_INTERFACE_DATA  **DeviceDescriptor\r
+);\r
+/**\r
+  Get platform Redfish host interface protocol data.\r
+  Caller should pass NULL in ProtocolRecord to retrive the first protocol record.\r
+  Then continuously pass previous ProtocolRecord for retrieving the next ProtocolRecord.\r
+\r
+  @param[in, out] ProtocolRecord  Pointer to retrieve the first or the next protocol record.\r
+                                  caller has to free the new protocol record returned from\r
+                                  this function using FreePool().\r
+  param[in] IndexOfProtocolData   The index of protocol data.\r
+\r
+  @retval EFI_SUCESS      Protocol records are all returned.\r
+  @retval EFI_NOT_FOUND   No more protocol records.\r
+  @retval Others          Fail to get protocol records.\r
+**/\r
+EFI_STATUS\r
+RedfishPlatformHostInterfaceProtocolData (\r
+  IN OUT MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord,\r
+  IN UINT8  IndexOfProtocolData\r
+);\r
+#endif\r