RedfishClientPkg/RedfishClientLibs.dsc.inc | 1 + .../ConverterCommonLib/ConverterCommonLib.inf | 44 +++++++++++++++++++ .../ConverterCommonLib/RedfishCsCommon.h | 14 ++++++ .../ConverterCommonLib/RedfishDataTypeDef.h | 14 ++++++ 4 files changed, 73 insertions(+) create mode 100644 RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterCommonLib.inf create mode 100644 RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishCsCommon.h create mode 100644 RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishDataTypeDef.h
From: Abner Chang <abner.chang@amd.com>
Add the helper library of JSON to C structure converter
common functions.
Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
RedfishClientPkg/RedfishClientLibs.dsc.inc | 1 +
.../ConverterCommonLib/ConverterCommonLib.inf | 44 +++++++++++++++++++
.../ConverterCommonLib/RedfishCsCommon.h | 14 ++++++
.../ConverterCommonLib/RedfishDataTypeDef.h | 14 ++++++
4 files changed, 73 insertions(+)
create mode 100644 RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterCommonLib.inf
create mode 100644 RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishCsCommon.h
create mode 100644 RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishDataTypeDef.h
diff --git a/RedfishClientPkg/RedfishClientLibs.dsc.inc b/RedfishClientPkg/RedfishClientLibs.dsc.inc
index 4655dd7081..a23b9478af 100644
--- a/RedfishClientPkg/RedfishClientLibs.dsc.inc
+++ b/RedfishClientPkg/RedfishClientLibs.dsc.inc
@@ -20,4 +20,5 @@
RedfishFeatureUtilityLib|RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.inf
RedfishPlatformConfigLib|RedfishPkg/Library/RedfishPlatformConfigLib/RedfishPlatformConfigLib.inf
RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLibNull.inf
+ ConverterCommonLib|RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterCommonLib.inf
diff --git a/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterCommonLib.inf b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterCommonLib.inf
new file mode 100644
index 0000000000..589c864815
--- /dev/null
+++ b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterCommonLib.inf
@@ -0,0 +1,44 @@
+## @file
+# This is the helper library of converter
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+#
+[Defines]
+INF_VERSION = 0x00010006
+BASE_NAME = ConverterCommonLib
+FILE_GUID = B70BDFAE-4D07-9B07-FD24-42AA235D6108
+MODULE_TYPE = BASE
+VERSION_STRING = 1.0
+LIBRARY_CLASS = ConverterCommonLib | DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC RISCV64
+#
+
+[Sources]
+ ../../src/RedfishCsCommon.c
+ ../../src/RedfishCsMemory.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ RedfishPkg/RedfishPkg.dec
+ RedfishClientPkg/RedfishClientPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ BaseMemoryLib
+ DebugLib
+ MemoryAllocationLib
+ JsonLib
+
+[BuildOptions]
+ #
+ # Disables the following Visual Studio compiler warnings
+ # so we do not break the build with /WX option:
+ # C4706: assignment within conditional expression
+ #
+ MSFT:*_*_*_CC_FLAGS = /wd4706
+
diff --git a/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishCsCommon.h b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishCsCommon.h
new file mode 100644
index 0000000000..8567284ee4
--- /dev/null
+++ b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishCsCommon.h
@@ -0,0 +1,14 @@
+/** @file
+ Wrapper file for RedfishCsCommon.h
+
+ (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef WRAPPER_REDFISH_CS_COMMON_H_
+#define WRAPPER_REDFISH_CS_COMMON_H_
+
+#include "../../include/RedfishCsCommon.h"
+
+#endif
diff --git a/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishDataTypeDef.h b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishDataTypeDef.h
new file mode 100644
index 0000000000..9d29342972
--- /dev/null
+++ b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishDataTypeDef.h
@@ -0,0 +1,14 @@
+/** @file
+ Wrapper file for RedfishDataTypeDef.h
+
+ (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef WRAPPER_REDFISH_DATA_TYPE_H_
+#define WRAPPER_REDFISH_DATA_TYPE_H_
+
+#include "../../include/RedfishDataTypeDef.h"
+
+#endif
--
2.37.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104082): https://edk2.groups.io/g/devel/message/104082
Mute This Topic: https://groups.io/mt/98698225/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Nickle Wang <nicklew@nvidia.com> No comments because this was reviewed in edk2-staging before. Regards, Nickle > -----Original Message----- > From: abner.chang@amd.com <abner.chang@amd.com> > Sent: Friday, May 5, 2023 10:54 AM > To: devel@edk2.groups.io > Cc: Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com> > Subject: [edk2-redfish-client][PATCH] RedfishClientPkg: Add converter helper > library > > External email: Use caution opening links or attachments > > > From: Abner Chang <abner.chang@amd.com> > > Add the helper library of JSON to C structure converter common functions. > > Signed-off-by: Abner Chang <abner.chang@amd.com> > Cc: Nickle Wang <nicklew@nvidia.com> > Cc: Igor Kulchytskyy <igork@ami.com> > --- > RedfishClientPkg/RedfishClientLibs.dsc.inc | 1 + > .../ConverterCommonLib/ConverterCommonLib.inf | 44 +++++++++++++++++++ > .../ConverterCommonLib/RedfishCsCommon.h | 14 ++++++ > .../ConverterCommonLib/RedfishDataTypeDef.h | 14 ++++++ > 4 files changed, 73 insertions(+) > create mode 100644 > RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterCo > mmonLib.inf > create mode 100644 > RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishCsCo > mmon.h > create mode 100644 > RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishDataT > ypeDef.h > > diff --git a/RedfishClientPkg/RedfishClientLibs.dsc.inc > b/RedfishClientPkg/RedfishClientLibs.dsc.inc > index 4655dd7081..a23b9478af 100644 > --- a/RedfishClientPkg/RedfishClientLibs.dsc.inc > +++ b/RedfishClientPkg/RedfishClientLibs.dsc.inc > @@ -20,4 +20,5 @@ > > RedfishFeatureUtilityLib|RedfishClientPkg/Library/RedfishFeatureUtilityLib/Redf > ishFeatureUtilityLib.inf > > RedfishPlatformConfigLib|RedfishPkg/Library/RedfishPlatformConfigLib/Redfish > PlatformConfigLib.inf > > RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/Red > fishContentCodingLibNull.inf > + > + ConverterCommonLib|RedfishClientPkg/ConverterLib/edk2library/Converter > + CommonLib/ConverterCommonLib.inf > > diff --git > a/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterC > ommonLib.inf > b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/ConverterC > ommonLib.inf > new file mode 100644 > index 0000000000..589c864815 > --- /dev/null > +++ b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/Conve > +++ rterCommonLib.inf > @@ -0,0 +1,44 @@ > +## @file > +# This is the helper library of converter # # (C) Copyright 2021 > +Hewlett Packard Enterprise Development LP<BR> # > +SPDX-License-Identifier: BSD-2-Clause-Patent # # [Defines] > +INF_VERSION = 0x00010006 > +BASE_NAME = ConverterCommonLib > +FILE_GUID = B70BDFAE-4D07-9B07-FD24-42AA235D6108 > +MODULE_TYPE = BASE > +VERSION_STRING = 1.0 > +LIBRARY_CLASS = ConverterCommonLib | DXE_DRIVER > DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER > +# > +# The following information is for reference only and not required by the build > tools. > +# > +# VALID_ARCHITECTURES = IA32 X64 IPF EBC RISCV64 > +# > + > +[Sources] > + ../../src/RedfishCsCommon.c > + ../../src/RedfishCsMemory.c > + > +[Packages] > + MdePkg/MdePkg.dec > + RedfishPkg/RedfishPkg.dec > + RedfishClientPkg/RedfishClientPkg.dec > + > +[LibraryClasses] > + BaseLib > + BaseMemoryLib > + DebugLib > + MemoryAllocationLib > + JsonLib > + > +[BuildOptions] > + # > + # Disables the following Visual Studio compiler warnings > + # so we do not break the build with /WX option: > + # C4706: assignment within conditional expression > + # > + MSFT:*_*_*_CC_FLAGS = /wd4706 > + > diff --git > a/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishCsC > ommon.h > b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishCsC > ommon.h > new file mode 100644 > index 0000000000..8567284ee4 > --- /dev/null > +++ b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/Redfi > +++ shCsCommon.h > @@ -0,0 +1,14 @@ > +/** @file > + Wrapper file for RedfishCsCommon.h > + > + (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR> > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef WRAPPER_REDFISH_CS_COMMON_H_ > +#define WRAPPER_REDFISH_CS_COMMON_H_ > + > +#include "../../include/RedfishCsCommon.h" > + > +#endif > diff --git > a/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishDat > aTypeDef.h > b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/RedfishDat > aTypeDef.h > new file mode 100644 > index 0000000000..9d29342972 > --- /dev/null > +++ b/RedfishClientPkg/ConverterLib/edk2library/ConverterCommonLib/Redfi > +++ shDataTypeDef.h > @@ -0,0 +1,14 @@ > +/** @file > + Wrapper file for RedfishDataTypeDef.h > + > + (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR> > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef WRAPPER_REDFISH_DATA_TYPE_H_ > +#define WRAPPER_REDFISH_DATA_TYPE_H_ > + > +#include "../../include/RedfishDataTypeDef.h" > + > +#endif > -- > 2.37.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104083): https://edk2.groups.io/g/devel/message/104083 Mute This Topic: https://groups.io/mt/98698225/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.