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

Go to the source code of this file.

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 CHAR8 * EFI_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(EFIAPI * EFI_REST_JSON_STRUCTURE_TO_STRUCTURE) (IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *JsonRsrcIdentifier OPTIONAL, IN CHAR8 *ResourceJsonText, OUT EFI_REST_JSON_STRUCTURE_HEADER **JsonStructure)
 
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)
 
typedef EFI_STATUS(EFIAPI * EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE) (IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader)
 
typedef EFI_STATUS(EFIAPI * EFI_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

Definition in file RestJsonStructure.h.

Macro Definition Documentation

◆ EFI_REST_JSON_STRUCTURE_PROTOCOL_GUID

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

GUID definitions

Definition at line 19 of file RestJsonStructure.h.

Typedef Documentation

◆ EFI_REST_JSON_RESOURCE_TYPE_DATATYPE

typedef CHAR8* EFI_REST_JSON_RESOURCE_TYPE_DATATYPE

Definition at line 25 of file RestJsonStructure.h.

◆ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER

REST resource type identifier

REST resource type consists of name space and data type.

◆ EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE

Structure defintions of resource name space.

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

◆ EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE

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

Definition at line 122 of file RestJsonStructure.h.

◆ EFI_REST_JSON_STRUCTURE_HEADER

The header file of JSON C structure

◆ EFI_REST_JSON_STRUCTURE_PROTOCOL

◆ EFI_REST_JSON_STRUCTURE_REGISTER

typedef EFI_STATUS(EFIAPI * EFI_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)

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.

Definition at line 143 of file RestJsonStructure.h.

◆ EFI_REST_JSON_STRUCTURE_SUPPORTED

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

◆ EFI_REST_JSON_STRUCTURE_TO_JSON

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

Definition at line 104 of file RestJsonStructure.h.

◆ EFI_REST_JSON_STRUCTURE_TO_STRUCTURE

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 OPTIONAL, 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

@retval Others

Definition at line 84 of file RestJsonStructure.h.