public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: Reduce the header file dependency.
@ 2023-05-12  3:47 Nickle Wang
  2023-05-12  4:12 ` Chang, Abner
  0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2023-05-12  3:47 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Igor Kulchytskyy

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: Reduce the header file dependency.
  2023-05-12  3:47 [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: Reduce the header file dependency Nickle Wang
@ 2023-05-12  4:12 ` Chang, Abner
  0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner @ 2023-05-12  4:12 UTC (permalink / raw)
  To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy

[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Friday, May 12, 2023 11:47 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>
> Subject: [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: Reduce the
> header file dependency.
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-12  4:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12  3:47 [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: Reduce the header file dependency Nickle Wang
2023-05-12  4:12 ` Chang, Abner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox