OSSIA
Open Scenario System for Interactive Application
|
Device tree management. More...
Device tree management.
Functions | |
OSSIA_EXPORT ossia_device_t | ossia_device_create (ossia_protocol_t protocol, const char *name) |
Create a device. More... | |
OSSIA_EXPORT void | ossia_device_free (ossia_device_t device) |
Free a device instance. More... | |
OSSIA_EXPORT void | ossia_device_reset_static () |
Free the global device table. More... | |
OSSIA_EXPORT int | ossia_device_update_namespace (ossia_device_t device) |
Request the nodes of a server if the protocol handles it. More... | |
OSSIA_EXPORT ossia_node_t | ossia_device_get_root_node (ossia_device_t device) |
Get the root node of a device. More... | |
OSSIA_EXPORT const char * | ossia_device_get_name (ossia_device_t device) |
Get the name of a device. More... | |
OSSIA_EXPORT ossia_node_callback_idx_t | ossia_device_add_node_created_callback (ossia_device_t device, ossia_node_callback_t callback, void *ctx) |
Add a callback called when a node is created in a device. More... | |
OSSIA_EXPORT void | ossia_device_remove_node_created_callback (ossia_device_t device, ossia_node_callback_idx_t index) |
Remove a callback added with ossia_device_add_node_created_callback. More... | |
OSSIA_EXPORT ossia_node_callback_idx_t | ossia_device_add_node_removing_callback (ossia_device_t device, ossia_node_callback_t callback, void *ctx) |
Add a callback called when a node is removed in a device. More... | |
OSSIA_EXPORT void | ossia_device_remove_node_removing_callback (ossia_device_t device, ossia_node_callback_idx_t index) |
Remove a callback added with ossia_device_add_node_removing_callback. More... | |
OSSIA_EXPORT ossia_parameter_callback_idx_t | ossia_device_add_parameter_deleting_callback (ossia_device_t device, ossia_parameter_callback_t callback, void *ctx) |
Add a callback called when a parameter is removed in a device. More... | |
OSSIA_EXPORT void | ossia_device_remove_parameter_deleting_callback (ossia_device_t device, ossia_parameter_callback_idx_t index) |
Remove a callback added with ossia_device_add_parameter_deleting_callback. More... | |
OSSIA_EXPORT ossia_device_t ossia_device_create | ( | ossia_protocol_t | protocol, |
const char * | name | ||
) |
Create a device.
ossia_device_create takes ownership of the protocol ; it must not be used afterwards.
OSSIA_EXPORT void ossia_device_free | ( | ossia_device_t | device | ) |
Free a device instance.
OSSIA_EXPORT void ossia_device_reset_static | ( | ) |
Free the global device table.
The devices are automatically registered in a table. This function frees and removes all the registered devices.
OSSIA_EXPORT int ossia_device_update_namespace | ( | ossia_device_t | device | ) |
Request the nodes of a server if the protocol handles it.
device | The device which must be updated. |
OSSIA_EXPORT ossia_node_t ossia_device_get_root_node | ( | ossia_device_t | device | ) |
Get the root node of a device.
OSSIA_EXPORT const char* ossia_device_get_name | ( | ossia_device_t | device | ) |
Get the name of a device.
OSSIA_EXPORT ossia_node_callback_idx_t ossia_device_add_node_created_callback | ( | ossia_device_t | device, |
ossia_node_callback_t | callback, | ||
void * | ctx | ||
) |
Add a callback called when a node is created in a device.
device | Device on which the callback must be added. |
callback | Function to be called. |
ctx | Will be passed to the callback. |
OSSIA_EXPORT void ossia_device_remove_node_created_callback | ( | ossia_device_t | device, |
ossia_node_callback_idx_t | index | ||
) |
Remove a callback added with ossia_device_add_node_created_callback.
device | Device on which the callback must be removed. |
index | Index of the callback to remove. |
OSSIA_EXPORT ossia_node_callback_idx_t ossia_device_add_node_removing_callback | ( | ossia_device_t | device, |
ossia_node_callback_t | callback, | ||
void * | ctx | ||
) |
Add a callback called when a node is removed in a device.
device | Device on which the callback must be added. |
callback | Function to be called. |
ctx | Will be passed to the callback. |
OSSIA_EXPORT void ossia_device_remove_node_removing_callback | ( | ossia_device_t | device, |
ossia_node_callback_idx_t | index | ||
) |
Remove a callback added with ossia_device_add_node_removing_callback.
device | Device on which the callback must be removed. |
index | Index of the callback to remove. |
OSSIA_EXPORT ossia_parameter_callback_idx_t ossia_device_add_parameter_deleting_callback | ( | ossia_device_t | device, |
ossia_parameter_callback_t | callback, | ||
void * | ctx | ||
) |
Add a callback called when a parameter is removed in a device.
device | Device on which the callback must be added. |
callback | Function to be called. |
ctx | Will be passed to the callback. |
OSSIA_EXPORT void ossia_device_remove_parameter_deleting_callback | ( | ossia_device_t | device, |
ossia_parameter_callback_idx_t | index | ||
) |
Remove a callback added with ossia_device_add_parameter_deleting_callback.
device | Device on which the callback must be removed. |
index | Index of the callback to remove. |