ServiceMetadata Struct Reference

A datatype for describing the type of application that a Service provides. More...

#include <service_metadata.h>

Collaboration diagram for ServiceMetadata:
[legend]

Public Member Functions

ServiceMetadataAllocateServiceMetadata (SchemaTerm *category_p, SchemaTerm *subcategory_p)
 Allocate a ServiceMetadata object. More...
 
void FreeServiceMetadata (ServiceMetadata *metadata_p)
 Free a ServiceMetadata object. More...
 
void ClearServiceMetadata (ServiceMetadata *metadata_p)
 Clear any data within a ServiceMetadata object. More...
 
void SetServiceMetadataValues (ServiceMetadata *metadata_p, SchemaTerm *category_p, SchemaTerm *subcategory_p)
 Set the values of a ServiceMetadata object. More...
 
bool AddServiceMetadataToJSON (const ServiceMetadata *metadata_p, json_t *service_json_p)
 Add the information from a ServiceMetadata object to a JSON fragment describing a Service. More...
 
ServiceMetadataGetServiceMetadataFromJSON (const json_t *service_json_p)
 Get a ServiceMetadata object from a JSON fragment. More...
 

Data Fields

SchemaTermsm_application_category_p
 This is the value used for defining the category of the Service. More...
 
SchemaTermsm_application_subcategory_p
 This is the value used for defining the sub-category of the Service. More...
 
LinkedListsm_input_types_p
 A LinkedList of SchemaTermNodes defining the types of input that the Service can take. More...
 
LinkedListsm_output_types_p
 A LinkedList of SchemaTermNodes defining the types of output that the Service can generate. More...
 

Detailed Description

A datatype for describing the type of application that a Service provides.

Examples
long_running_service.c.

Member Function Documentation

◆ AllocateServiceMetadata()

ServiceMetadata * AllocateServiceMetadata ( SchemaTerm category_p,
SchemaTerm subcategory_p 
)

Allocate a ServiceMetadata object.

Parameters
category_pThe top-level application category to use.
subcategory_pThe application subcategory to use.
Returns
The new ServiceMetadata or NULL upon error.
Examples
long_running_service.c.

◆ FreeServiceMetadata()

void FreeServiceMetadata ( ServiceMetadata metadata_p)

Free a ServiceMetadata object.

Parameters
metadata_pThe ServiceMetadata to free.

◆ ClearServiceMetadata()

void ClearServiceMetadata ( ServiceMetadata metadata_p)

Clear any data within a ServiceMetadata object.

Parameters
metadata_pThe ServiceMetadata to clear.

◆ SetServiceMetadataValues()

void SetServiceMetadataValues ( ServiceMetadata metadata_p,
SchemaTerm category_p,
SchemaTerm subcategory_p 
)

Set the values of a ServiceMetadata object.

Parameters
metadata_pThe ServiceMetadata to set.
category_pThe top-level application category to use.
subcategory_pThe application subcategory to use.

◆ AddServiceMetadataToJSON()

bool AddServiceMetadataToJSON ( const ServiceMetadata metadata_p,
json_t *  service_json_p 
)

Add the information from a ServiceMetadata object to a JSON fragment describing a Service.

Parameters
metadata_pThe ServiceMetadata to get the values from.
service_json_pThe JSON fragment where the metadata information will be added.
Returns
true if the ServiceMetadata information was added successfully, false if it was not.

◆ GetServiceMetadataFromJSON()

ServiceMetadata * GetServiceMetadataFromJSON ( const json_t *  service_json_p)

Get a ServiceMetadata object from a JSON fragment.

Parameters
service_json_pThe JSON fragment for a Service to get the ServiceMetadata from.
Returns
The new ServiceMetadata or NULL upon error.

Field Documentation

◆ sm_application_category_p

SchemaTerm* sm_application_category_p

This is the value used for defining the category of the Service.

◆ sm_application_subcategory_p

SchemaTerm* sm_application_subcategory_p

This is the value used for defining the sub-category of the Service.

◆ sm_input_types_p

LinkedList* sm_input_types_p

A LinkedList of SchemaTermNodes defining the types of input that the Service can take.

◆ sm_output_types_p

LinkedList* sm_output_types_p

A LinkedList of SchemaTermNodes defining the types of output that the Service can generate.


The documentation for this struct was generated from the following file: