blob: 73f1469ac62b45dff4e0f7a9555654142f31c627 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/** @file
This file defines the Redfish debug library interface.
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef REDFISH_DEBUG_LIB_H_
#define REDFISH_DEBUG_LIB_H_
#include <Uefi.h>
#include <Library/JsonLib.h>
#include <Library/RedfishLib.h>
#define DEBUG_REDFISH_NETWORK DEBUG_MANAGEABILITY ///< Debug error level for Redfish networking function
#define DEBUG_REDFISH_HOST_INTERFACE DEBUG_MANAGEABILITY ///< Debug error level for Redfish networking function
/**
This function dump the Json string in given error level.
@param[in] ErrorLevel DEBUG macro error level
@param[in] JsonValue Json value to dump.
@retval EFI_SUCCESS Json string is printed.
@retval Others Errors occur.
**/
EFI_STATUS
DumpJsonValue (
IN UINTN ErrorLevel,
IN EDKII_JSON_VALUE JsonValue
);
/**
This function dump the status code, header and body in given
Redfish payload.
@param[in] ErrorLevel DEBUG macro error level
@param[in] Payload Redfish payload to dump
@retval EFI_SUCCESS Redfish payload is printed.
@retval Others Errors occur.
**/
EFI_STATUS
DumpRedfishPayload (
IN UINTN ErrorLevel,
IN REDFISH_PAYLOAD Payload
);
/**
This function dump the status code, header and body in given
Redfish response.
@param[in] Message Message string
@param[in] ErrorLevel DEBUG macro error level
@param[in] Response Redfish response to dump
@retval EFI_SUCCESS Redfish response is printed.
@retval Others Errors occur.
**/
EFI_STATUS
DumpRedfishResponse (
IN CONST CHAR8 *Message,
IN UINTN ErrorLevel,
IN REDFISH_RESPONSE *Response
);
/**
This function dump the HTTP status code.
@param[in] ErrorLevel DEBUG macro error level
@param[in] HttpStatusCode HTTP status code
@retval EFI_SUCCESS HTTP status code is printed
**/
EFI_STATUS
DumpHttpStatusCode (
IN UINTN ErrorLevel,
IN EFI_HTTP_STATUS_CODE HttpStatusCode
);
#endif
|