Diffusion C API
6.8.3
|
Functions | |
bool | diffusion_recordv2_as_model (const DIFFUSION_VALUE_T *value, const DIFFUSION_RECORDV2_SCHEMA_T *schema, DIFFUSION_RECORDV2_RECORD_MODEL_T **record_model, DIFFUSION_API_ERROR *error) |
Parses the value into a model based upon a specified schema. More... | |
bool | diffusion_recordv2_as_validated_model (const DIFFUSION_VALUE_T *value, const DIFFUSION_RECORDV2_SCHEMA_T *schema, DIFFUSION_RECORDV2_RECORD_MODEL_T **record_model, DIFFUSION_API_ERROR *error) |
Parses the value into a model based upon a specified schema. More... | |
bool | diffusion_recordv2_as_records (const DIFFUSION_VALUE_T *value, LIST_T **as_records, DIFFUSION_API_ERROR *error) |
Get a list of lists where each element represents a record within the RecordV2 diffusion value. More... | |
bool | diffusion_recordv2_to_string (const DIFFUSION_VALUE_T *value, char **recordv2_as_string, DIFFUSION_API_ERROR *error) |
Get a stringified representation of the RecordV2 diffusion value. More... | |
bool | write_diffusion_recordv2_value (const void *recordv2, const BUF_T *buf) |
Write a recordv2 value into a BUF_T for an update. More... | |
bool diffusion_recordv2_as_model | ( | const DIFFUSION_VALUE_T * | value, |
const DIFFUSION_RECORDV2_SCHEMA_T * | schema, | ||
DIFFUSION_RECORDV2_RECORD_MODEL_T ** | record_model, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Parses the value into a model based upon a specified schema.
This assumes that data is compatible with the schema and does not do any validation. There is no need to validate the data if this has been done on entry or at the server. However, if the data is invalid then issues may occur when attempting to access it.
value | the diffusion value to be read |
schema | the schema to retrieve the model from |
record_model | a pointer to a pointer which has its value populated with a DIFFUSION_RECORDV2_RECORD_MODEL_T . Must be freed. |
error | populated if an error occurs. Can be NULL. |
record_model
parameter was populated with a record_model. False, otherwise. bool diffusion_recordv2_as_records | ( | const DIFFUSION_VALUE_T * | value, |
LIST_T ** | as_records, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Get a list of lists where each element represents a record within the RecordV2 diffusion value.
value | diffusion value to be read |
as_records | pointer to a LIST_T to be populated |
error | error populated if an error occurs. Can be NULL. |
as_records
was populated with lists of all the records contained in the RecordV2 diffusion value. False otherwise. bool diffusion_recordv2_as_validated_model | ( | const DIFFUSION_VALUE_T * | value, |
const DIFFUSION_RECORDV2_SCHEMA_T * | schema, | ||
DIFFUSION_RECORDV2_RECORD_MODEL_T ** | record_model, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Parses the value into a model based upon a specified schema.
value | the diffusion value to be read |
schema | the schema to be validated against and retrieve the model from |
record_model | a pointer to a pointer which has its value populated with a DIFFUSION_RECORDV2_RECORD_MODEL_T . Must be freed. |
error | populated if an error occurs. Can be NULL. |
record_model
parameter was populated with a record_model. False, otherwise. bool diffusion_recordv2_to_string | ( | const DIFFUSION_VALUE_T * | value, |
char ** | recordv2_as_string, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Get a stringified representation of the RecordV2 diffusion value.
value | diffusion value to be read. |
recordv2_as_string | pointer to a pointer where the stringified RecordV2 data will be stored |
error | populated if an error occurs. Can be NULL. |
recordv2_as_string
was set to a pointer. containing the stringified representation of the RecordV2 diffusion value. False otherwise. bool write_diffusion_recordv2_value | ( | const void * | recordv2, |
const BUF_T * | buf | ||
) |
Write a recordv2 value into a BUF_T
for an update.
recordv2 | recordv2 bytes to be written into the BUF_T |
buf | BUFT_T to write the recordv2 value into |
BUF_T
. False is returned if recordv2 or buf are NULL.