TianoCore EDK2 master
|
#include "RedfishHttpDxe.h"
Go to the source code of this file.
Data Structures | |
struct | REDFISH_SERVICE_PRIVATE |
struct | REDFISH_PAYLOAD_PRIVATE |
struct | REDFISH_HTTP_CACHE_DATA |
struct | REDFISH_HTTP_CACHE_LIST |
struct | REDFISH_HTTP_RETRY_SETTING |
struct | REDFISH_HTTP_CACHE_PRIVATE |
Macros | |
#define | REDFISH_HTTP_DRIVER_SIGNATURE SIGNATURE_32 ('r', 'f', 'h', 'p') |
#define | REDFISH_HTTP_CACHE_SIGNATURE SIGNATURE_32 ('r', 'f', 'c', 'h') |
#define | REDFISH_HTTP_SERVICE_SIGNATURE SIGNATURE_32 ('r', 'f', 's', 'v') |
#define | REDFISH_HTTP_PAYLOAD_SIGNATURE SIGNATURE_32 ('r', 'f', 'p', 'l') |
#define | REDFISH_HTTP_BASIC_AUTH_STR "Basic " |
#define | REDFISH_HTTP_CACHE_FROM_LIST(a) CR (a, REDFISH_HTTP_CACHE_DATA, List, REDFISH_HTTP_CACHE_SIGNATURE) |
#define | REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS(a) CR (a, REDFISH_HTTP_CACHE_PRIVATE, Protocol, REDFISH_HTTP_DRIVER_SIGNATURE) |
Definitions of RedfishHttpData
Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RedfishHttpData.h.
#define REDFISH_HTTP_BASIC_AUTH_STR "Basic " |
Definition at line 19 of file RedfishHttpData.h.
#define REDFISH_HTTP_CACHE_FROM_LIST | ( | a | ) | CR (a, REDFISH_HTTP_CACHE_DATA, List, REDFISH_HTTP_CACHE_SIGNATURE) |
Definition at line 53 of file RedfishHttpData.h.
#define REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS | ( | a | ) | CR (a, REDFISH_HTTP_CACHE_PRIVATE, Protocol, REDFISH_HTTP_DRIVER_SIGNATURE) |
Definition at line 90 of file RedfishHttpData.h.
#define REDFISH_HTTP_CACHE_SIGNATURE SIGNATURE_32 ('r', 'f', 'c', 'h') |
Definition at line 16 of file RedfishHttpData.h.
#define REDFISH_HTTP_DRIVER_SIGNATURE SIGNATURE_32 ('r', 'f', 'h', 'p') |
Definition at line 15 of file RedfishHttpData.h.
#define REDFISH_HTTP_PAYLOAD_SIGNATURE SIGNATURE_32 ('r', 'f', 'p', 'l') |
Definition at line 18 of file RedfishHttpData.h.
#define REDFISH_HTTP_SERVICE_SIGNATURE SIGNATURE_32 ('r', 'f', 's', 'v') |
Definition at line 17 of file RedfishHttpData.h.
EFI_STATUS AddHttpCacheData | ( | IN REDFISH_HTTP_CACHE_LIST * | List, |
IN EFI_STRING | Uri, | ||
IN REDFISH_RESPONSE * | Response | ||
) |
Add new cache by given URI and HTTP response to specify List.
[in] | List | Target cache list to add. |
[in] | Uri | The URI string matching to this cache data. |
[in] | Response | HTTP response. |
EFI_SUCCESS | Cache data is added. |
Others | Fail to add cache data. |
Definition at line 571 of file RedfishHttpData.c.
EFI_STATUS CopyRedfishResponse | ( | IN REDFISH_RESPONSE * | SrcResponse, |
OUT REDFISH_RESPONSE * | DstResponse | ||
) |
This function copy the data in SrcResponse to DstResponse.
[in] | SrcResponse | Source Response to copy. |
[out] | DstResponse | Destination Response. |
EFI_SUCCESS | Response is copied successfully. |
Others | Error occurs. |
Definition at line 250 of file RedfishHttpData.c.
REDFISH_PAYLOAD_PRIVATE * CreateRedfishPayload | ( | IN REDFISH_SERVICE_PRIVATE * | Service, |
IN EDKII_JSON_VALUE | JsonValue | ||
) |
This function creat new payload. Server and JsonObj are copied to newly created payload.
[in] | Service | Pointer to Service instance. |
[in] | JsonObj | Pointer to JSON object. |
REDFISH_PAYLOAD_PRIVATE | Newly created payload. |
NULL | Error occurs. |
This function creat new payload. Server and JsonObj are copied to newly created payload.
[in] | Service | Pointer to Service instance. |
[in] | JsonValue | Pointer to JSON value. |
REDFISH_PAYLOAD_PRIVATE | Newly created payload. |
NULL | Error occurs. |
Definition at line 203 of file RedfishHttpData.c.
REDFISH_SERVICE_PRIVATE * CreateRedfishService | ( | IN CHAR8 * | Host, |
IN CHAR8 * | HostName, | ||
IN CHAR8 *BasicAuth | OPTIONAL, | ||
IN CHAR8 *SessionToken | OPTIONAL, | ||
IN EFI_REST_EX_PROTOCOL * | RestEx | ||
) |
This function creat new service. Host and HostName are copied to newly created service instance.
[in] | Host | Host string. |
[in] | HostName | Hostname string. |
[in] | BasicAuth | Basic Authorization string. |
[in] | SessionToken | Session token string. |
[in] | RestEx | Rest EX protocol instance. |
REDFISH_PAYLOAD_PRIVATE | Newly created service. |
NULL | Error occurs. |
Definition at line 101 of file RedfishHttpData.c.
EFI_STATUS DeleteHttpCacheData | ( | IN REDFISH_HTTP_CACHE_LIST * | List, |
IN REDFISH_HTTP_CACHE_DATA * | Data | ||
) |
Delete a cache data by given cache instance.
[in] | List | Target cache list to be removed. |
[in] | Data | Pointer to the instance to be deleted. |
EFI_SUCCESS | Cache data is removed. |
Others | Fail to remove cache data. |
Definition at line 542 of file RedfishHttpData.c.
REDFISH_HTTP_CACHE_DATA * FindHttpCacheData | ( | IN LIST_ENTRY * | ListHeader, |
IN EFI_STRING | Uri | ||
) |
Search on given ListHeader for given URI string.
[in] | ListHeader | Target list to search. |
[in] | Uri | Target URI to search. |
REDFISH_HTTP_CACHE_DATA | Target cache data is found. |
NULL | No cache data with given URI is found. |
Definition at line 453 of file RedfishHttpData.c.
EFI_STATUS ReleaseCacheList | ( | IN REDFISH_HTTP_CACHE_LIST * | CacheList | ) |
Release all cache from list.
[in] | CacheList | The list to be released. |
EFI_SUCCESS | All cache data are released. |
EFI_INVALID_PARAMETER | CacheList is NULL. |
Definition at line 638 of file RedfishHttpData.c.
EFI_STATUS ReleaseRedfishPayload | ( | IN REDFISH_PAYLOAD_PRIVATE * | Payload | ) |
This function release Redfish Payload.
[in] | Payload | Pointer to payload instance. |
EFI_SUCCESS | Payload is released. |
Others | Error occurs. |
Definition at line 170 of file RedfishHttpData.c.
EFI_STATUS ReleaseRedfishService | ( | IN REDFISH_SERVICE_PRIVATE * | Service | ) |
This function release Redfish Service.
[in] | Service | Pointer to service instance. |
EFI_SUCCESS | Service is released. |
Others | Error occurs. |
Definition at line 55 of file RedfishHttpData.c.
EFI_STATUS UpdateSessionToken | ( | IN REDFISH_SERVICE_PRIVATE * | Service, |
IN CHAR8 * | Token | ||
) |
This function update session token in Redfish Service.
[in] | Service | Pointer to service instance. |
[in] | Token | Session token. |
EFI_SUCCESS | Session token is updated. |
Others | Error occurs. |
Definition at line 24 of file RedfishHttpData.c.