TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishLib.h
Go to the documentation of this file.
1
70#ifndef REDFISH_LIB_H_
71#define REDFISH_LIB_H_
72
73#include <RedfishServiceData.h>
74#include <Library/JsonLib.h>
75
76#include <Protocol/Http.h>
78
79#define ODATA_TYPE_NAME_MAX_SIZE 128
80#define ODATA_TYPE_MAX_SIZE 128
81
85typedef struct {
86 CONST CHAR8 OdataTypeName[ODATA_TYPE_NAME_MAX_SIZE];
87 CONST CHAR8 OdataType[ODATA_TYPE_MAX_SIZE];
89
103REDFISH_SERVICE
104EFIAPI
106 IN REDFISH_CONFIG_SERVICE_INFORMATION *RedfishConfigServiceInfo
107 );
108
115VOID
116EFIAPI
118 IN REDFISH_SERVICE RedfishService
119 );
120
136REDFISH_PAYLOAD
137EFIAPI
139 IN EDKII_JSON_VALUE Value,
140 IN REDFISH_SERVICE RedfishService
141 );
142
149VOID
150EFIAPI
152 IN REDFISH_PAYLOAD Payload
153 );
154
166EDKII_JSON_VALUE
167EFIAPI
169 IN REDFISH_PAYLOAD Payload
170 );
171
183REDFISH_SERVICE
184EFIAPI
186 IN REDFISH_PAYLOAD Payload
187 );
188
208CHAR8 *
209EFIAPI
211 IN CONST CHAR8 *RedPath,
212 IN BOOLEAN FromSmbios,
213 IN CHAR8 *IdString OPTIONAL
214 );
215
240EFIAPI
242 IN REDFISH_SERVICE RedfishService,
243 IN CONST CHAR8 *RedPath,
244 OUT REDFISH_RESPONSE *RedResponse
245 );
246
270EFIAPI
272 IN REDFISH_SERVICE RedfishService,
273 IN CONST CHAR8 *Uri,
274 OUT REDFISH_RESPONSE *RedResponse
275 );
276
304EFIAPI
306 IN REDFISH_PAYLOAD Payload,
307 IN CONST CHAR8 *RedPath,
308 OUT REDFISH_RESPONSE *RedResponse
309 );
310
342EFIAPI
344 IN REDFISH_SERVICE RedfishService,
345 IN CONST CHAR8 *Uri,
346 IN CONST CHAR8 *Content,
347 OUT REDFISH_RESPONSE *RedResponse
348 );
349
379EFIAPI
381 IN REDFISH_PAYLOAD Target,
382 IN REDFISH_PAYLOAD Payload,
383 OUT REDFISH_RESPONSE *RedResponse
384 );
385
417EFIAPI
419 IN REDFISH_SERVICE RedfishService,
420 IN CONST CHAR8 *Uri,
421 IN CONST CHAR8 *Content,
422 IN UINTN ContentSize OPTIONAL,
423 IN CONST CHAR8 *ContentType OPTIONAL,
424 OUT REDFISH_RESPONSE *RedResponse
425 );
426
455EFIAPI
457 IN REDFISH_PAYLOAD Target,
458 IN REDFISH_PAYLOAD Payload,
459 OUT REDFISH_RESPONSE *RedResponse
460 );
461
490EFIAPI
492 IN REDFISH_SERVICE RedfishService,
493 IN CONST CHAR8 *Uri,
494 OUT REDFISH_RESPONSE *RedResponse
495 );
496
526EFIAPI
528 IN REDFISH_SERVICE RedfishService,
529 IN CONST CHAR8 *Uri,
530 IN CONST CHAR8 *Content,
531 OUT REDFISH_RESPONSE *RedResponse
532 );
533
567EFIAPI
569 IN REDFISH_SERVICE RedfishService,
570 IN CONST CHAR8 *Uri,
571 IN CONST CHAR8 *Content,
572 IN UINTN ContentSize OPTIONAL,
573 IN CONST CHAR8 *ContentType OPTIONAL,
574 OUT REDFISH_RESPONSE *RedResponse
575 );
576
583VOID
585 IN CHAR8 *String
586 );
587
594VOID
596 IN REDFISH_PAYLOAD Payload
597 );
598
605VOID
607 IN EDKII_JSON_VALUE JsonValue
608 );
609
619VOID
621 IN EFI_HTTP_STATUS_CODE *StatusCode,
622 IN UINTN HeaderCount,
623 IN EFI_HTTP_HEADER *Headers,
624 IN REDFISH_PAYLOAD Payload
625 );
626
638BOOLEAN
640 IN REDFISH_PAYLOAD Payload,
641 IN CONST CHAR8 *OdataTypeName,
642 IN REDFISH_ODATA_TYPE_MAPPING *OdataTypeMappingList,
643 IN UINTN OdataTypeMappingListSize
644 );
645
654BOOLEAN
656 IN REDFISH_PAYLOAD Payload
657 );
658
670 IN REDFISH_PAYLOAD Payload,
671 IN UINTN *CollectionSize
672 );
673
683REDFISH_PAYLOAD
685 IN REDFISH_PAYLOAD Payload,
686 IN UINTN Index
687 );
688
700 IN REDFISH_SERVICE RedfishService,
701 IN CHAR8 *Redpath,
702 IN REDFISH_RESPONSE *Response OPTIONAL
703 );
704
716 IN REDFISH_SERVICE RedfishService,
717 OUT CHAR8 **ServiceVersionStr
718 );
719
734 IN CHAR8 *ServiceVersionStr,
735 IN CHAR8 *Url,
736 IN CHAR8 *Id,
737 OUT CHAR8 **Redpath
738 );
739
740#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_HTTP_STATUS_CODE
Definition: Http.h:59
REDFISH_SERVICE EFIAPI RedfishServiceInPayload(IN REDFISH_PAYLOAD Payload)
Definition: RedfishLib.c:184
EFI_STATUS EFIAPI RedfishGetByUri(IN REDFISH_SERVICE RedfishService, IN CONST CHAR8 *Uri, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:345
VOID EFIAPI RedfishCleanupPayload(IN REDFISH_PAYLOAD Payload)
Definition: RedfishLib.c:136
EFI_STATUS EFIAPI RedfishDeleteByUri(IN REDFISH_SERVICE RedfishService, IN CONST CHAR8 *Uri, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:808
EFI_STATUS EFIAPI RedfishGetByPayload(IN REDFISH_PAYLOAD Payload, IN CONST CHAR8 *RedPath, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:412
VOID EFIAPI RedfishCleanupService(IN REDFISH_SERVICE RedfishService)
EFI_STATUS EFIAPI RedfishPostToPayload(IN REDFISH_PAYLOAD Target, IN REDFISH_PAYLOAD Payload, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:740
VOID RedfishFreeResponse(IN EFI_HTTP_STATUS_CODE *StatusCode, IN UINTN HeaderCount, IN EFI_HTTP_HEADER *Headers, IN REDFISH_PAYLOAD Payload)
Definition: RedfishLib.c:1065
EFI_STATUS EFIAPI RedfishPatchToUri(IN REDFISH_SERVICE RedfishService, IN CONST CHAR8 *Uri, IN CONST CHAR8 *Content, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:482
BOOLEAN RedfishIsPayloadCollection(IN REDFISH_PAYLOAD Payload)
Definition: RedfishLib.c:1146
EFI_STATUS EFIAPI RedfishDeleteByUriEx(IN REDFISH_SERVICE RedfishService, IN CONST CHAR8 *Uri, IN CONST CHAR8 *Content, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:896
EFI_STATUS RedfishBuildRedpathUseId(IN CHAR8 *ServiceVersionStr, IN CHAR8 *Url, IN CHAR8 *Id, OUT CHAR8 **Redpath)
Definition: RedfishMisc.c:182
VOID RedfishDumpPayload(IN REDFISH_PAYLOAD Payload)
Definition: RedfishLib.c:1027
CHAR8 *EFIAPI RedfishBuildPathWithSystemUuid(IN CONST CHAR8 *RedPath, IN BOOLEAN FromSmbios, IN CHAR8 *IdString OPTIONAL)
Definition: RedfishLib.c:216
VOID RedfishDumpJson(IN EDKII_JSON_VALUE JsonValue)
Definition: RedfishLib.c:1005
EDKII_JSON_VALUE EFIAPI RedfishJsonInPayload(IN REDFISH_PAYLOAD Payload)
EFI_STATUS RedfishGetCollectionSize(IN REDFISH_PAYLOAD Payload, IN UINTN *CollectionSize)
Definition: RedfishLib.c:1163
REDFISH_SERVICE EFIAPI RedfishCreateService(IN REDFISH_CONFIG_SERVICE_INFORMATION *RedfishConfigServiceInfo)
EFI_STATUS RedfishCheckIfRedpathExist(IN REDFISH_SERVICE RedfishService, IN CHAR8 *Redpath, IN REDFISH_RESPONSE *Response OPTIONAL)
Definition: RedfishLib.c:1218
REDFISH_PAYLOAD RedfishGetPayloadByIndex(IN REDFISH_PAYLOAD Payload, IN UINTN Index)
Definition: RedfishLib.c:1190
EFI_STATUS EFIAPI RedfishPutToUri(IN REDFISH_SERVICE RedfishService, IN CONST CHAR8 *Uri, IN CONST CHAR8 *Content, IN UINTN ContentSize OPTIONAL, IN CONST CHAR8 *ContentType OPTIONAL, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:1284
EFI_STATUS EFIAPI RedfishPostToUri(IN REDFISH_SERVICE RedfishService, IN CONST CHAR8 *Uri, IN CONST CHAR8 *Content, IN UINTN ContentSize OPTIONAL, IN CONST CHAR8 *ContentType OPTIONAL, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:645
EFI_STATUS EFIAPI RedfishGetByService(IN REDFISH_SERVICE RedfishService, IN CONST CHAR8 *RedPath, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:285
VOID RedfishDumpJsonStringFractions(IN CHAR8 *String)
Definition: RedfishLib.c:963
REDFISH_PAYLOAD EFIAPI RedfishCreatePayload(IN EDKII_JSON_VALUE Value, IN REDFISH_SERVICE RedfishService)
Definition: RedfishLib.c:117
EFI_STATUS RedfishGetServiceVersion(IN REDFISH_SERVICE RedfishService, OUT CHAR8 **ServiceVersionStr)
Definition: RedfishMisc.c:26
EFI_STATUS EFIAPI RedfishPatchToPayload(IN REDFISH_PAYLOAD Target, IN REDFISH_PAYLOAD Payload, OUT REDFISH_RESPONSE *RedResponse)
Definition: RedfishLib.c:574
BOOLEAN RedfishIsValidOdataType(IN REDFISH_PAYLOAD Payload, IN CONST CHAR8 *OdataTypeName, IN REDFISH_ODATA_TYPE_MAPPING *OdataTypeMappingList, IN UINTN OdataTypeMappingListSize)
Definition: RedfishLib.c:1100
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29