summaryrefslogtreecommitdiffstats
path: root/RedfishPkg/Library
Commit message (Collapse)AuthorAgeFilesLines
* RedfishPkg/RedfishContentCodingLib: EDKII Redfish En/Decode libraryAbner Chang2021-02-242-0/+112
| | | | | | | | | | | | | | | | | | | BZ#:3174 Platform library to provide the encoding/decoding algorithms for the Redfish packets. The supported value could be one of below or any which is platform-specific. - HTTP_CONTENT_ENCODING_IDENTITY "identity" - HTTP_CONTENT_ENCODING_GZIP "gzip" - HTTP_CONTENT_ENCODING_COMPRESS "compress" - HTTP_CONTENT_ENCODING_DEFLATE "deflate" - HTTP_CONTENT_ENCODING_BROTLI "br" Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/JsonLib: Ignore the build error of conditional expression.Abner Chang2021-02-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore the build error of assignment within conditional expression. Add build option to ignore the build error of "assignment within conditional expression". This build error is caused by the macros defined in open source project jansson header file jansson.h. - json_object_foreach - json_object_foreach_safe - json_array_foreach We use build option to avoid the build errors on Visual Studio (GCC doesn't havvve this problem) for now. Already sent an email to jansson open source community to revise these macro as Leif's suggestion as below, for (key = json_object_iter_key(json_object_iter(object)); \        key; \        key = json_object_iter_key(                            \             json_object_iter_next(object, json_object_key_to_iter(key)))) { \   value = json_object_iter_value(json_object_key_to_iter(key));        \ if (!value) \ break; \ } \ We will remove this build option once the patch is accepted and upstreamed. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/JsonLib: Fix the mistake of removing code by a accidentAbner Chang2021-02-241-2/+2
| | | | | | | | | | | | | json_string_value() in JsonValueGetAsciiString () is removed by a accident when clean up the code. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/JsonLib: Add JsonLoadString functionAbner Chang2021-02-241-0/+26
| | | | | | | | | | | Add JsonLoadString function to load a NULL terminated-string JSON Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/library: EDK2 port of jansson libraryAbner Chang2021-01-096-0/+2249
| | | | | | | | | | | | | | | | | edk2 JsonLib which is the edk2 port of open source jansson library. (https://github.com/akheron/jansson) jansson library is the open source project to manipulate JSON data structure. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com> Acked-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* edk2: jansson submodule for edk2 JSON libraryAbner Chang2021-01-091-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Add git submodule "jansson" library, which is the open source project (https://github.com/akheron/jansson) used to manipulate JSON data structure. jansson library is wrapped as edk2 JsonLib and the use cases will be the edk2 Redfish feature drivers and edk2 port of libredfish (https://github.com/DMTF/libredfish). jansson open source project is under MIT license. (refer to ReadMe.rst under edk2). Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com> Acked-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* RedfishPkg/Ucs2Utf8lib: UCS2 to UFT8 manipulation libraryAbner Chang2021-01-092-0/+452
| | | | | | | | | | | | | | | | This library provides UCS2 to UFT8 or vise versa functions to manipulate UCS2/UTF8 strings. This library is currently used by edk2 port of open source jansson library. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com> Acked-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* RedfishPkg/DxeRestExLib: DxeRestExLibAbner Chang2020-12-242-0/+210
| | | | | | | | | | | | | | | Add EFI REST EX helper library to create child instance of REST EX service. 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> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/RedfishCredentialDxe: EDKII Redfish Credential DXE driverAbner Chang2020-12-162-0/+131
| | | | | | | | | | | | | | | EDKII Redfish Credential DXE driver which abstracts platform Redfish credential implementation. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Ting Ye <ting.ye@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Fan Wang <fan.wang@intel.com> Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* RedfishPkg/PlatformHostInterfaceLib: Platform NULL libAbner Chang2020-11-022-0/+85
NULL instance of PlatformHostInterfaceLib. 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>