libamxs
0.6.0
Data Model Synchronization C API
|
Functions | |
amxs_status_t | amxs_sync_object_new (amxs_sync_object_t **object, const char *object_a, const char *object_b, int attributes, amxs_translation_cb_t translation_cb, amxs_action_cb_t action_cb, void *priv) |
Synchronization object constructor function. More... | |
amxs_status_t | amxs_sync_object_new_copy (amxs_sync_object_t **object, const char *object_a, const char *object_b, int attributes) |
Synchronization object constructor function. More... | |
void | amxs_sync_object_delete (amxs_sync_object_t **object) |
Synchronization object destructor function. More... | |
amxs_status_t | amxs_sync_object_add_param (amxs_sync_object_t *object, amxs_sync_param_t *param) |
Adds a synchronization parameter to a synchronization object. More... | |
amxs_status_t | amxs_sync_object_add_new_param (amxs_sync_object_t *object, const char *param_a, const char *param_b, int attributes, amxs_translation_cb_t translation_cb, amxs_action_cb_t action_cb, void *priv) |
Creates and adds a synchronization parameter to a synchronization object. More... | |
amxs_status_t | amxs_sync_object_add_new_copy_param (amxs_sync_object_t *object, const char *param_a, const char *param_b, int attributes) |
Creates and adds a synchronization parameter to a synchronization object. More... | |
amxs_status_t | amxs_sync_object_add_object (amxs_sync_object_t *parent, amxs_sync_object_t *child) |
Adds a synchronization object to a synchronization object. More... | |
amxs_status_t | amxs_sync_object_add_new_object (amxs_sync_object_t *parent, const char *object_a, const char *object_b, int attributes, amxs_translation_cb_t translation_cb, amxs_action_cb_t action_cb, void *priv) |
Creates and adds a synchronization object to a synchronization object. More... | |
amxs_status_t | amxs_sync_object_add_new_copy_object (amxs_sync_object_t *parent, const char *object_a, const char *object_b, int attributes) |
Creates and adds a synchronization object to a synchronization object. More... | |
amxs_status_t amxs_sync_object_add_new_copy_object | ( | amxs_sync_object_t * | parent, |
const char * | object_a, | ||
const char * | object_b, | ||
int | attributes | ||
) |
Creates and adds a synchronization object to a synchronization object.
Allocates memory for a new synchronization object and initializes this object. Then adds it to the parent synchronization object.
Adding the synchronization object fails when:
If the parent attributes are more strict than those of the child, the child attributes will be updated to match those of the parent.
Uses default translation amxs_sync_object_copy_trans_cb and action amxs_sync_object_copy_action_cb callbacks.
parent | Pointer to the parent synchronization object. |
object_a | Name of the object in object A |
object_b | Name of the object in object B |
attributes | Bitwise OR of zero or more of the following attributes: |
Definition at line 195 of file amxs_sync_object.c.
amxs_status_t amxs_sync_object_add_new_copy_param | ( | amxs_sync_object_t * | object, |
const char * | param_a, | ||
const char * | param_b, | ||
int | attributes | ||
) |
Creates and adds a synchronization parameter to a synchronization object.
Allocates memory for a new synchronization parameter and initializes this parameter. Then adds it to the synchronization object.
Adding the synchronization parameter fails when:
If the object attributes are more strict than those of the parameter, the parameter attributes will be updated to match those of the object.
Uses default translation amxs_sync_batch_param_copy_trans_cb and action amxs_sync_param_copy_action_cb callbacks.
object | Pointer to a synchronization object. |
param_a | Name of the parameter in object A |
param_b | Name of the parameter in object B |
attributes | Bitwise OR of zero or more of the following attributes: |
Definition at line 147 of file amxs_sync_object.c.
amxs_status_t amxs_sync_object_add_new_object | ( | amxs_sync_object_t * | parent, |
const char * | object_a, | ||
const char * | object_b, | ||
int | attributes, | ||
amxs_translation_cb_t | translation_cb, | ||
amxs_action_cb_t | action_cb, | ||
void * | priv | ||
) |
Creates and adds a synchronization object to a synchronization object.
Allocates memory for a new synchronization object and initializes this object. Then adds it to the parent synchronization object.
Adding the synchronization object fails when:
If the parent attributes are more strict than those of the child, the child attributes will be updated to match those of the parent.
parent | Pointer to the parent synchronization object. |
object_a | Name of the object in object A |
object_b | Name of the object in object B |
attributes | Bitwise OR of zero or more of the following attributes: |
translation_cb | Callback function to translate data coming from an object event. The output data of this function will be passed to the action callback function if this function executes succesfully. If this argument is NULL, the data from the event will be passed directly to the action callback function. |
action_cb | Callback function to act on an object event. |
priv | Pointer to user data which will be passed to the translation and action callbacks. |
Definition at line 173 of file amxs_sync_object.c.
amxs_status_t amxs_sync_object_add_new_param | ( | amxs_sync_object_t * | object, |
const char * | param_a, | ||
const char * | param_b, | ||
int | attributes, | ||
amxs_translation_cb_t | translation_cb, | ||
amxs_action_cb_t | action_cb, | ||
void * | priv | ||
) |
Creates and adds a synchronization parameter to a synchronization object.
Allocates memory for a new synchronization parameter and initializes this parameter. Then adds it to the synchronization object.
Adding the synchronization parameter fails when:
If the object attributes are more strict than those of the parameter, the parameter attributes will be updated to match those of the object.
object | Pointer to a synchronization object. |
param_a | Name of the parameter in object A |
param_b | Name of the parameter in object B |
attributes | Bitwise OR of zero or more of the following attributes: |
translation_cb | Callback function to translate data coming from a parameter changed event. The output data of this function will be passed to the action callback function if this function executes succesfully. If this argument is NULL, the data from the event will be passed directly to the action callback function. |
action_cb | Callback function to act on a parameter changed event. |
priv | Pointer to user data which will be passed to the translation and action callbacks. |
Definition at line 125 of file amxs_sync_object.c.
amxs_status_t amxs_sync_object_add_object | ( | amxs_sync_object_t * | parent, |
amxs_sync_object_t * | child | ||
) |
Adds a synchronization object to a synchronization object.
The synchronization object can be be created using amxs_sync_object_new.
Adding the synchronization object fails when:
If the parent attributes are more strict than those of the child, the child attributes will be updated to match those of the parent.
parent | Pointer to the parent synchronization object. |
child | Pointer to the child synchronization object. |
Definition at line 160 of file amxs_sync_object.c.
amxs_status_t amxs_sync_object_add_param | ( | amxs_sync_object_t * | object, |
amxs_sync_param_t * | param | ||
) |
Adds a synchronization parameter to a synchronization object.
The synchronization parameter can be be created using amxs_sync_param_new.
Adding the synchronization parameter fails when:
If the object attributes are more strict than those of the parameter, the parameter attributes will be updated to match those of the object.
object | Pointer to a synchronization object. |
param | Pointer to a synchronization parameter. |
Definition at line 112 of file amxs_sync_object.c.
void amxs_sync_object_delete | ( | amxs_sync_object_t ** | object | ) |
Synchronization object destructor function.
Frees all memory allocated for a synchronization object. Also removes the synchronization object from any synchronization object or context it was attached to. All attached synchronization objects and parameters will be freed as well.
object | Pointer to a synchronization object pointer. |
Definition at line 101 of file amxs_sync_object.c.
amxs_status_t amxs_sync_object_new | ( | amxs_sync_object_t ** | object, |
const char * | object_a, | ||
const char * | object_b, | ||
int | attributes, | ||
amxs_translation_cb_t | translation_cb, | ||
amxs_action_cb_t | action_cb, | ||
void * | priv | ||
) |
Synchronization object constructor function.
Allocates memory for a new synchronization object and initializes this object.
Use amxs_sync_object_delete to remove the synchronization object and free all allocated memory.
object | Pointer to a synchronization object pointer. The address of the new allocated synchronization object is stored in this pointer. |
object_a | Name of the object in object A |
object_b | Name of the object in object B |
attributes | Bitwise OR of zero or more of the following attributes: |
translation_cb | Callback function to translate data coming from an object event. The output data of this function will be passed to the action callback function if this function executes succesfully. If this argument is NULL, the data from the event will be passed directly to the action callback function. |
action_cb | Callback function to act on an object event. |
priv | Pointer to user data which will be passed to the translation and action callbacks. |
Definition at line 71 of file amxs_sync_object.c.
amxs_status_t amxs_sync_object_new_copy | ( | amxs_sync_object_t ** | object, |
const char * | object_a, | ||
const char * | object_b, | ||
int | attributes | ||
) |
Synchronization object constructor function.
Allocates memory for a new synchronization object and initializes this object.
Use amxs_sync_object_delete to remove the synchronization object and free all allocated memory.
Uses default translation amxs_sync_object_copy_trans_cb and action amxs_sync_object_copy_action_cb callbacks.
object | Pointer to a synchronization object pointer. The address of the new allocated synchronization object is stored in this pointer. |
object_a | Name of the object in object A |
object_b | Name of the object in object B |
attributes | Bitwise OR of zero or more of the following attributes: |
Definition at line 88 of file amxs_sync_object.c.