TianoCore EDK2 master
Loading...
Searching...
No Matches
redfishService.h File Reference

Go to the source code of this file.

Data Structures

struct  redfishService
 
struct  redfishPayload
 
struct  enumeratorAuthentication
 

Macros

#define REDFISH_AUTH_BASIC   0
 
#define REDFISH_AUTH_BEARER_TOKEN   1
 
#define REDFISH_AUTH_SESSION   2
 
#define REDFISH_HTTP_RESPONSE_TIMEOUT   5000
 
#define HTTP_FLAG   L"http://"
 
#define HTTPS_FLAG   L"https://"
 
#define REDFISH_FIRST_URL   L"/redfish/v1"
 
#define REDFISH_FLAG_SERVICE_NO_VERSION_DOC   0x00000001
 

Functions

redfishServicecreateServiceEnumerator (REDFISH_CONFIG_SERVICE_INFORMATION *RedfishConfigServiceInfo, const char *rootUri, enumeratorAuthentication *auth, unsigned int flags)
 
json_t * getUriFromService (redfishService *service, const char *uri, EFI_HTTP_STATUS_CODE **StatusCode)
 
json_t * getUriFromServiceEx (redfishService *service, const char *uri, EFI_HTTP_HEADER **Headers, UINTN *HeaderCount, EFI_HTTP_STATUS_CODE **StatusCode)
 
json_t * patchUriFromService (redfishService *service, const char *uri, const char *content, EFI_HTTP_STATUS_CODE **StatusCode)
 
json_t * patchUriFromServiceEx (redfishService *service, const char *uri, const char *content, EFI_HTTP_HEADER **Headers, UINTN *HeaderCount, EFI_HTTP_STATUS_CODE **StatusCode)
 
json_t * postUriFromService (redfishService *service, const char *uri, const char *content, size_t contentLength, const char *contentType, EFI_HTTP_STATUS_CODE **StatusCode)
 
json_t * postUriFromServiceEx (redfishService *service, const char *uri, const char *content, size_t contentLength, const char *contentType, EFI_HTTP_HEADER **Headers, UINTN *HeaderCount, EFI_HTTP_STATUS_CODE **StatusCode)
 
json_t * putUriFromServiceEx (redfishService *service, const char *uri, const char *content, size_t contentLength, const char *contentType, EFI_HTTP_HEADER **Headers, UINTN *HeaderCount, EFI_HTTP_STATUS_CODE **StatusCode)
 
json_t * deleteUriFromService (redfishService *service, const char *uri, EFI_HTTP_STATUS_CODE **StatusCode)
 
json_t * deleteUriFromServiceEx (redfishService *service, const char *uri, const char *content, EFI_HTTP_STATUS_CODE **StatusCode)
 
redfishPayloadgetRedfishServiceRoot (redfishService *service, const char *version, EFI_HTTP_STATUS_CODE **StatusCode)
 
redfishPayloadgetPayloadByPath (redfishService *service, const char *path, EFI_HTTP_STATUS_CODE **StatusCode)
 
void cleanupServiceEnumerator (redfishService *service)
 

Detailed Description

This file is cloned from DMTF libredfish library tag v1.0.0 and maintained by EDKII.


Copyright Notice: Copyright 2017 Distributed Management Task Force, Inc. All rights reserved.

License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libredfish/LICENSE.md

Copyright (c) 2019, Intel Corporation. All rights reserved.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file redfishService.h.

Macro Definition Documentation

◆ HTTP_FLAG

#define HTTP_FLAG   L"http://"

Library class public defines

Definition at line 69 of file redfishService.h.

◆ HTTPS_FLAG

#define HTTPS_FLAG   L"https://"

Definition at line 70 of file redfishService.h.

◆ REDFISH_AUTH_BASIC

#define REDFISH_AUTH_BASIC   0

Definition at line 60 of file redfishService.h.

◆ REDFISH_AUTH_BEARER_TOKEN

#define REDFISH_AUTH_BEARER_TOKEN   1

Definition at line 61 of file redfishService.h.

◆ REDFISH_AUTH_SESSION

#define REDFISH_AUTH_SESSION   2

Definition at line 62 of file redfishService.h.

◆ REDFISH_FIRST_URL

#define REDFISH_FIRST_URL   L"/redfish/v1"

The redfish first URL should be "/redfish/v1/", while we use "/redfish/v1" here without "/" in the end is to avoid the 301 Perment redirect response from Redfish profile simulator.

Definition at line 76 of file redfishService.h.

◆ REDFISH_FLAG_SERVICE_NO_VERSION_DOC

#define REDFISH_FLAG_SERVICE_NO_VERSION_DOC   0x00000001

Definition at line 92 of file redfishService.h.

◆ REDFISH_HTTP_RESPONSE_TIMEOUT

#define REDFISH_HTTP_RESPONSE_TIMEOUT   5000

Definition at line 64 of file redfishService.h.

Function Documentation

◆ cleanupServiceEnumerator()

void cleanupServiceEnumerator ( redfishService service)

Definition at line 1513 of file service.c.

◆ createServiceEnumerator()

redfishService * createServiceEnumerator ( REDFISH_CONFIG_SERVICE_INFORMATION RedfishConfigServiceInfo,
const char *  rootUri,
enumeratorAuthentication auth,
unsigned int  flags 
)

Definition at line 339 of file service.c.

◆ deleteUriFromService()

json_t * deleteUriFromService ( redfishService service,
const char *  uri,
EFI_HTTP_STATUS_CODE **  StatusCode 
)

Definition at line 1405 of file service.c.

◆ deleteUriFromServiceEx()

json_t * deleteUriFromServiceEx ( redfishService service,
const char *  uri,
const char *  content,
EFI_HTTP_STATUS_CODE **  StatusCode 
)

Definition at line 1246 of file service.c.

◆ getPayloadByPath()

redfishPayload * getPayloadByPath ( redfishService service,
const char *  path,
EFI_HTTP_STATUS_CODE **  StatusCode 
)

Definition at line 1453 of file service.c.

◆ getRedfishServiceRoot()

redfishPayload * getRedfishServiceRoot ( redfishService service,
const char *  version,
EFI_HTTP_STATUS_CODE **  StatusCode 
)

Definition at line 1415 of file service.c.

◆ getUriFromService()

json_t * getUriFromService ( redfishService service,
const char *  uri,
EFI_HTTP_STATUS_CODE **  StatusCode 
)

Definition at line 1212 of file service.c.

◆ patchUriFromService()

json_t * patchUriFromService ( redfishService service,
const char *  uri,
const char *  content,
EFI_HTTP_STATUS_CODE **  StatusCode 
)

Definition at line 1222 of file service.c.

◆ postUriFromService()

json_t * postUriFromService ( redfishService service,
const char *  uri,
const char *  content,
size_t  contentLength,
const char *  contentType,
EFI_HTTP_STATUS_CODE **  StatusCode 
)

Definition at line 1233 of file service.c.