MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RestJsonStructure.h File Reference

Data Structures

struct  _EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE
 
struct  _EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER
 
struct  _EFI_REST_JSON_STRUCTURE_SUPPORTED
 
struct  _EFI_REST_JSON_STRUCTURE_HEADER
 
struct  _EFI_REST_JSON_STRUCTURE_PROTOCOL
 

Macros

#define EFI_REST_JSON_STRUCTURE_PROTOCOL_GUID
 

Typedefs

typedef struct
_EFI_REST_JSON_STRUCTURE_PROTOCOL 
EFI_REST_JSON_STRUCTURE_PROTOCOL
 
typedef CHAR8EFI_REST_JSON_RESOURCE_TYPE_DATATYPE
 
typedef struct
_EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE 
EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE
 
typedef struct
_EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER 
EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER
 
typedef struct
_EFI_REST_JSON_STRUCTURE_SUPPORTED 
EFI_REST_JSON_STRUCTURE_SUPPORTED
 
typedef struct
_EFI_REST_JSON_STRUCTURE_HEADER 
EFI_REST_JSON_STRUCTURE_HEADER
 
typedef EFI_STATUS(EFIAPIEFI_REST_JSON_STRUCTURE_TO_STRUCTURE )(IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *JsonRsrcIdentifier, IN CHAR8 *ResourceJsonText, OUT EFI_REST_JSON_STRUCTURE_HEADER **JsonStructure)
 
typedef EFI_STATUS(EFIAPIEFI_REST_JSON_STRUCTURE_TO_JSON )(IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader, OUT CHAR8 **ResourceJsonText)
 
typedef EFI_STATUS(EFIAPIEFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE )(IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader)
 
typedef EFI_STATUS(EFIAPIEFI_REST_JSON_STRUCTURE_REGISTER )(IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_STRUCTURE_SUPPORTED *JsonStructureSupported, IN EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure, IN EFI_REST_JSON_STRUCTURE_TO_JSON ToJson, IN EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestroyStructure)
 

Detailed Description

This file defines the EFI REST JSON Structure Protocol interface.

(C) Copyright 2020 Hewlett Packard Enterprise Development LP

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

Revision Reference:
This Protocol is introduced in UEFI Specification 2.8

Macro Definition Documentation

#define EFI_REST_JSON_STRUCTURE_PROTOCOL_GUID
Value:
{ \
0xa9a048f6, 0x48a0, 0x4714, {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 } \
}

GUID definitions

Typedef Documentation

REST resource type identifier

REST resource type consists of name space and data type.

Structure defintions of resource name space.

The fields declared in this structure define the name and revision of payload delievered throught REST API.

typedef EFI_STATUS(EFIAPI * EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE)(IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader)

This function destroys the REST JSON structure.

Parameters
[in]ThisThis is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
[in]JsonStructureHeaderJSON structure to destroy.
Return values
EFI_SUCCESS
Others

The header file of JSON C structure

This function provides REST JSON resource to structure converter registration.

Parameters
[in]ThisThis is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
[in]JsonStructureSupportedThe type and version of REST JSON resource which this converter supports.
[in]ToStructureThe function to convert REST JSON resource to structure.
[in]ToJsonThe function to convert REST JSON structure to JSON in text format.
[in]DestroyStructureDestroy REST JSON structure returned in ToStructure() function.
Return values
EFI_SUCCESSRegister successfully.
OthersFail to register.

List of JSON to C structure conversions which this convertor supports.

typedef EFI_STATUS(EFIAPI * EFI_REST_JSON_STRUCTURE_TO_JSON)(IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader, OUT CHAR8 **ResourceJsonText)

Convert the given REST JSON structure into JSON text.

Parameters
[in]ThisThis is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
[in]JsonStructureHeaderThe point to EFI_REST_JSON_STRUCTURE_HEADER structure.
[out]ResourceJsonTextPointer to receive REST JSON resource in text format.
Return values
EFI_SUCCESS
Others
typedef EFI_STATUS(EFIAPI * EFI_REST_JSON_STRUCTURE_TO_STRUCTURE)(IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *JsonRsrcIdentifier, IN CHAR8 *ResourceJsonText, OUT EFI_REST_JSON_STRUCTURE_HEADER **JsonStructure)

JSON-IN C Structure-OUT function. Convert the given REST JSON resource into structure.

Parameters
[in]ThisThis is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
[in]JsonRsrcIdentifierThis indicates the resource type and version is given in ResourceJsonText.
[in]ResourceJsonTextREST JSON resource in text format.
[out]JsonStructurePointer to receive the pointer to EFI_REST_JSON_STRUCTURE_HEADER
Return values
EFI_SUCCESS

Others