Diffusion C API  6.4.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
diffusion-recordv2-schema.h File Reference

Typedefs

typedef struct
DIFFUSION_RECORDV2_SCHEMA_T 
DIFFUSION_RECORDV2_SCHEMA_T
 Opaque recordv2 schema data type.
 

Functions

DIFFUSION_RECORDV2_MUTABLE_RECORD_MODEL_Tdiffusion_recordv2_schema_create_mutable_model (const DIFFUSION_RECORDV2_SCHEMA_T *recordv2_schema)
 Create a mutable model based upon the schema. More...
 
LIST_Tdiffusion_recordv2_schema_get_records (const DIFFUSION_RECORDV2_SCHEMA_T *recordv2_schema)
 Returns an immutable, ordered list of record definitions. More...
 
char * diffusion_recordv2_schema_as_json_string (const DIFFUSION_RECORDV2_SCHEMA_T *recordv2_schema)
 Returns the schema in a JSON format. More...
 
void diffusion_recordv2_schema_free (DIFFUSION_RECORDV2_SCHEMA_T *recordv2_schema)
 Free a recordv2 schema. More...
 

Function Documentation

char* diffusion_recordv2_schema_as_json_string ( const DIFFUSION_RECORDV2_SCHEMA_T recordv2_schema)

Returns the schema in a JSON format.

Parameters
recordv2_schemathe recordv2 schema.
Returns
schema in JSON string format - must be freed after use. NULL if the recordv2_schema is NULL.
DIFFUSION_RECORDV2_MUTABLE_RECORD_MODEL_T* diffusion_recordv2_schema_create_mutable_model ( const DIFFUSION_RECORDV2_SCHEMA_T recordv2_schema)

Create a mutable model based upon the schema.

The model will be created with all mandatory record occurrences and all mandatory field occurrences initialized to default values. Such a model may be mutated and used to generate updated RecordV2 occurrences for updating purposes. diffusion_recordv2_mutable_record_model_free should be called on this pointer when no longer needed.

Parameters
recordv2_schemathe recordv2 schema
Returns
a mutable recordv2 model. NULL if recordv2_schema is NULL.
void diffusion_recordv2_schema_free ( DIFFUSION_RECORDV2_SCHEMA_T recordv2_schema)

Free a recordv2 schema.

Parameters
recordv2_schemarecordv2 schema to be freed
LIST_T* diffusion_recordv2_schema_get_records ( const DIFFUSION_RECORDV2_SCHEMA_T recordv2_schema)

Returns an immutable, ordered list of record definitions.

There will be at least one.

Parameters
recordv2_schemathe recordv2 schema
Returns
a list of DIFFUSION_RECORDV2_SCHEMA_RECORD_Ts in the schema. NULL if the recordv2_schema is NULL.