RedfishPkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the RedfishPkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Abner Chang <abner.chang@hpe.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:11 -08:00
committed by mergify[bot]
parent 5220bd211d
commit 39de741e2d
56 changed files with 6067 additions and 4616 deletions

View File

@ -38,64 +38,114 @@
#include <jansson.h>
typedef struct {
char* host;
json_t* versions;
unsigned int flags;
char* sessionToken;
char* basicAuthStr;
//
// point to the <HOST> part in above "host" field, which will be put into
// the "Host" header of HTTP request message.
//
char* HostHeaderValue;
EFI_REST_EX_PROTOCOL *RestEx;
char *host;
json_t *versions;
unsigned int flags;
char *sessionToken;
char *basicAuthStr;
//
// point to the <HOST> part in above "host" field, which will be put into
// the "Host" header of HTTP request message.
//
char *HostHeaderValue;
EFI_REST_EX_PROTOCOL *RestEx;
} redfishService;
typedef struct {
json_t* json;
redfishService* service;
json_t *json;
redfishService *service;
} redfishPayload;
#define REDFISH_AUTH_BASIC 0
#define REDFISH_AUTH_BEARER_TOKEN 1
#define REDFISH_AUTH_SESSION 2
#define REDFISH_AUTH_BASIC 0
#define REDFISH_AUTH_BEARER_TOKEN 1
#define REDFISH_AUTH_SESSION 2
#define REDFISH_HTTP_RESPONSE_TIMEOUT 5000 /// 5 seconds in uints of millisecond.
#define REDFISH_HTTP_RESPONSE_TIMEOUT 5000 /// 5 seconds in uints of millisecond.
///
/// Library class public defines
///
#define HTTP_FLAG L"http://"
#define HTTPS_FLAG L"https://"
#define HTTP_FLAG L"http://"
#define HTTPS_FLAG L"https://"
///
/// 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.
///
#define REDFISH_FIRST_URL L"/redfish/v1"
#define REDFISH_FIRST_URL L"/redfish/v1"
typedef struct {
unsigned int authType;
union {
struct {
char* username;
char* password;
} userPass;
struct {
char* token;
} authToken;
} authCodes;
unsigned int authType;
union {
struct {
char *username;
char *password;
} userPass;
struct {
char *token;
} authToken;
} authCodes;
} enumeratorAuthentication;
//Values for flags
#define REDFISH_FLAG_SERVICE_NO_VERSION_DOC 0x00000001 //The Redfish Service lacks the version document (in violation of the Redfish spec)
redfishService* createServiceEnumerator(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* patchUriFromService(redfishService* service, const char* uri, const char* content, 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* deleteUriFromService(redfishService* service, const char* uri, EFI_HTTP_STATUS_CODE** StatusCode);
redfishPayload* getRedfishServiceRoot(redfishService* service, const char* version, EFI_HTTP_STATUS_CODE** StatusCode);
redfishPayload* getPayloadByPath(redfishService* service, const char* path, EFI_HTTP_STATUS_CODE** StatusCode);
void cleanupServiceEnumerator(redfishService* service);
// Values for flags
#define REDFISH_FLAG_SERVICE_NO_VERSION_DOC 0x00000001// The Redfish Service lacks the version document (in violation of the Redfish spec)
redfishService *
createServiceEnumerator (
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 *
patchUriFromService (
redfishService *service,
const char *uri,
const char *content,
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 *
deleteUriFromService (
redfishService *service,
const char *uri,
EFI_HTTP_STATUS_CODE **StatusCode
);
redfishPayload *
getRedfishServiceRoot (
redfishService *service,
const char *version,
EFI_HTTP_STATUS_CODE **StatusCode
);
redfishPayload *
getPayloadByPath (
redfishService *service,
const char *path,
EFI_HTTP_STATUS_CODE **StatusCode
);
void
cleanupServiceEnumerator (
redfishService *service
);
#endif