]> git.proxmox.com Git - mirror_edk2.git/blob - RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishPayload.h
RedfishPkg/RefishCrtLib: Public RefishCrtLib
[mirror_edk2.git] / RedfishPkg / PrivateLibrary / RedfishLib / edk2libredfish / include / redfishPayload.h
1 /** @file
2 This file is cloned from DMTF libredfish library tag v1.0.0 and maintained
3 by EDKII.
4
5 //----------------------------------------------------------------------------
6 // Copyright Notice:
7 // Copyright 2017 Distributed Management Task Force, Inc. All rights reserved.
8 // License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libredfish/LICENSE.md
9 //----------------------------------------------------------------------------
10
11 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
12 (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
13
14 SPDX-License-Identifier: BSD-2-Clause-Patent
15
16 **/
17 #ifndef LIBREDFISH_REDFISH_PAYLOAD_H_
18 #define LIBREDFISH_REDFISH_PAYLOAD_H_
19
20 #include <Include/Library/RedfishCrtLib.h>
21
22 #include <jansson.h>
23 #include <redfishService.h>
24 #include <redpath.h>
25
26 redfishPayload* createRedfishPayload(json_t* value, redfishService* service);
27 redfishPayload* getPayloadByNodeName(redfishPayload* payload, const char* nodeName, EFI_HTTP_STATUS_CODE** StatusCode);
28 redfishPayload* getPayloadByIndex(redfishPayload* payload, size_t index, EFI_HTTP_STATUS_CODE** StatusCode);
29 redfishPayload* getPayloadForPath(redfishPayload* payload, redPathNode* redpath, EFI_HTTP_STATUS_CODE** StatusCode);
30 redfishPayload* getPayloadForPathString(redfishPayload* payload, const char* string, EFI_HTTP_STATUS_CODE** StatusCode);
31 redfishPayload* patchPayload(redfishPayload* target, redfishPayload* payload, EFI_HTTP_STATUS_CODE** StatusCode);
32 redfishPayload* postContentToPayload(redfishPayload* target, const char* data, size_t dataSize, const char* contentType, EFI_HTTP_STATUS_CODE** StatusCode);
33 redfishPayload* postPayload(redfishPayload* target, redfishPayload* payload, EFI_HTTP_STATUS_CODE** StatusCode);
34 void cleanupPayload(redfishPayload* payload);
35 bool isPayloadCollection (redfishPayload *Payload);
36 size_t getCollectionSize(redfishPayload* payload);
37 redfishPayload* getPayloadByIndex (redfishPayload* payload, size_t index, EFI_HTTP_STATUS_CODE** StatusCode);
38
39 #endif