From: "Nickle Wang" <nicklew@nvidia.com>
To: <devel@edk2.groups.io>
Cc: Abner Chang <abner.chang@amd.com>, Igor Kulchytskyy <igork@ami.com>
Subject: [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: Reduce the header file dependency.
Date: Fri, 12 May 2023 11:47:24 +0800 [thread overview]
Message-ID: <20230512034724.8714-1-nicklew@nvidia.com> (raw)
Move REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG and
REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST from
RedfishFeatureUtilityLib.h to
EdkIIRedfishInterchangeData.h. Also, remove
unnecessary jansson.h in RedfishDataTypeDef.h.
Signed-off-by: Simon Wang <simowang@nvidia.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
.../ConverterLib/include/RedfishDataTypeDef.h | 3 +--
.../Include/Library/RedfishFeatureUtilityLib.h | 17 +----------------
.../Protocol/EdkIIRedfishInterchangeData.h | 17 ++++++++++++++++-
3 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h b/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h
index 96eebc66..c759428a 100644
--- a/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h
+++ b/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h
@@ -1,6 +1,7 @@
/** @file
(C) Copyright 2018-2021 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -12,8 +13,6 @@
#ifndef REDFISH_CS_DATA_TYPE_H_
#define REDFISH_CS_DATA_TYPE_H_
-#include <jansson.h>
-
typedef char RedfishCS_char;
typedef int RedfishCS_bool;
typedef signed char RedfishCS_int8;
diff --git a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
index 14296432..e2f728b2 100644
--- a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
+++ b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
@@ -13,26 +13,11 @@
#include <Library/RedfishLib.h>
#include <Protocol/EdkIIRedfishPlatformConfig.h>
+#include <Protocol/EdkIIRedfishInterchangeData.h>
#include <RedfishJsonStructure/RedfishCsCommon.h>
#define REDFISH_ENABLE_SYSTEM_REBOOT() PcdSetBoolS(PcdRedfishSystemRebootRequired, TRUE)
-//
-// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG
-//
-typedef struct {
- UINTN Index;
- EFI_STRING ConfigureLang;
-} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG;
-
-//
-// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST
-//
-typedef struct {
- UINTN Count;
- REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG *List;
-} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST;
-
/**
Read redfish resource by given resource URI.
diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h
index b2841b66..89708eb8 100644
--- a/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h
+++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h
@@ -2,6 +2,7 @@
This file defines the EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL interface.
(C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -10,7 +11,21 @@
#ifndef EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_H_
#define EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_H_
-#include <Library/RedfishFeatureUtilityLib.h>
+//
+// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG
+//
+typedef struct {
+ UINTN Index;
+ EFI_STRING ConfigureLang;
+} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG;
+
+//
+// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST
+//
+typedef struct {
+ UINTN Count;
+ REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG *List;
+} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST;
typedef struct _EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL;
--
2.17.1
next reply other threads:[~2023-05-12 3:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 3:47 Nickle Wang [this message]
2023-05-12 4:12 ` [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: Reduce the header file dependency Chang, Abner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230512034724.8714-1-nicklew@nvidia.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox