Tizen Native API
4.0
|
Functions | |
Eldbus_Service_Interface * | eldbus_service_interface_register (Eldbus_Connection *conn, const char *path, const Eldbus_Service_Interface_Desc *desc) |
Register an interface in the given path and connection. | |
Eldbus_Service_Interface * | eldbus_service_interface_fallback_register (Eldbus_Connection *conn, const char *path, const Eldbus_Service_Interface_Desc *desc) |
Register a fallback interface handler for a given subsection of the object hierarchy. Note: Use eldbus_service_interface_unregister() to unregister a interface. | |
Eldbus_Service_Interface * | eldbus_service_interface_register2 (Eldbus_Connection *conn, const char *path, const Eldbus_Service_Interface_Desc2 *desc) |
Register an interface in the given path and connection. This extended register function allows the registration of stateful methods, with void* data. | |
Eldbus_Service_Interface * | eldbus_service_interface_fallback_register2 (Eldbus_Connection *conn, const char *path, const Eldbus_Service_Interface_Desc2 *desc) |
Register a fallback interface handler for a given subsection of the object hierarchy. This extended register function allows the registration of stateful methods, with void* data. | |
void | eldbus_service_interface_unregister (Eldbus_Service_Interface *iface) |
Unregister a interface. Note: This doesn't unregister the object path if interface count reaches 0. Use eldbus_service_object_unregister() to unregister the object. | |
void | eldbus_service_object_unregister (Eldbus_Service_Interface *iface) |
Unregister all interfaces of the object path that this interface belongs and the object path. | |
Eldbus_Connection * | eldbus_service_connection_get (const Eldbus_Service_Interface *iface) |
const char * | eldbus_service_object_path_get (const Eldbus_Service_Interface *iface) |
Eina_Bool | eldbus_service_signal_emit (const Eldbus_Service_Interface *iface, unsigned int signal_id,...) |
Emit a signal handler of the interface with non-complex types. Each signal handler have a internal id, the first signal handler of interface is = 0 the second = 1 and go on. | |
Eldbus_Message * | eldbus_service_signal_new (const Eldbus_Service_Interface *iface, unsigned int signal_id) |
Create signal message. Each signal handler have a internal id, the first signal handler of interface is = 0 the second = 1 and go on. This function is used when the signal has complex types. | |
Eina_Bool | eldbus_service_signal_send (const Eldbus_Service_Interface *iface, Eldbus_Message *signal_msg) |
Send a signal message. | |
void | eldbus_service_object_data_set (Eldbus_Service_Interface *iface, const char *key, const void *data) |
Store data at object path, this data can be obtained from all interfaces of the same object. | |
void * | eldbus_service_object_data_get (const Eldbus_Service_Interface *iface, const char *key) |
Get data stored in object path. | |
void * | eldbus_service_object_data_del (Eldbus_Service_Interface *iface, const char *key) |
Del data stored in object path. | |
Eina_Bool | eldbus_service_property_changed (const Eldbus_Service_Interface *iface, const char *name) |
Add property to list of changed properties A DBus.PropertiesChanged signal will be sent in an idler with all properties that have changed. | |
Eina_Bool | eldbus_service_property_invalidate_set (const Eldbus_Service_Interface *iface, const char *name, Eina_Bool is_invalidate) |
Eina_Bool | eldbus_service_object_manager_attach (Eldbus_Service_Interface *iface) |
Eina_Bool | eldbus_service_object_manager_detach (Eldbus_Service_Interface *iface) |
Typedefs | |
typedef Eina_Bool(* | Eldbus_Property_Get_Cb )(const Eldbus_Service_Interface *iface, const char *propname, Eldbus_Message_Iter *iter, const Eldbus_Message *request_msg, Eldbus_Message **error) |
typedef Eldbus_Message *(* | Eldbus_Property_Set_Cb )(const Eldbus_Service_Interface *iface, const char *propname, Eldbus_Message_Iter *iter, const Eldbus_Message *input_msg) |
Defines | |
#define | ELDBUS_ARGS(args...) (const Eldbus_Arg_Info[]){ args, { NULL, NULL } } |
Used to insert complete types to signature of methods or signals. |
#define ELDBUS_ARGS | ( | args... | ) | (const Eldbus_Arg_Info[]){ args, { NULL, NULL } } |
Used to insert complete types to signature of methods or signals.
Example: ELDBUS_ARGS({"s", "interface"}, {"s", "property"}) The signature will be "ss" and each string will have a tag name on introspect XML with the respective name.
typedef Eina_Bool(* Eldbus_Property_Get_Cb)(const Eldbus_Service_Interface *iface, const char *propname, Eldbus_Message_Iter *iter, const Eldbus_Message *request_msg, Eldbus_Message **error) |
Callback function to append property value to message.
iface | interface of property |
propname | name of property |
iter | variant iterator in which value must be appended |
request_msg | message that request property |
error | if a error happen you must set a message error to be send caller |
typedef Eldbus_Message*(* Eldbus_Property_Set_Cb)(const Eldbus_Service_Interface *iface, const char *propname, Eldbus_Message_Iter *iter, const Eldbus_Message *input_msg) |
Callback function to set property value from message.
iface | interface of property |
propname | name of property |
input_msg | message call where you have to get value |
Eldbus_Connection* eldbus_service_connection_get | ( | const Eldbus_Service_Interface * | iface | ) |
Eldbus_Service_Interface* eldbus_service_interface_fallback_register | ( | Eldbus_Connection * | conn, |
const char * | path, | ||
const Eldbus_Service_Interface_Desc * | desc | ||
) |
Register a fallback interface handler for a given subsection of the object hierarchy. Note: Use eldbus_service_interface_unregister() to unregister a interface.
conn | where the interface should listen |
path | a '/' delimited string of path elements |
desc | description of interface |
Eldbus_Service_Interface* eldbus_service_interface_fallback_register2 | ( | Eldbus_Connection * | conn, |
const char * | path, | ||
const Eldbus_Service_Interface_Desc2 * | desc | ||
) |
Register a fallback interface handler for a given subsection of the object hierarchy. This extended register function allows the registration of stateful methods, with void* data.
Note: Use eldbus_service_interface_unregister() to unregister a interface.
conn | where the interface should listen |
path | a '/' delimited string of path elements |
desc | description of interface |
Eldbus_Service_Interface* eldbus_service_interface_register | ( | Eldbus_Connection * | conn, |
const char * | path, | ||
const Eldbus_Service_Interface_Desc * | desc | ||
) |
Register an interface in the given path and connection.
conn | where the interface should listen |
path | object path |
desc | description of interface |
Eldbus_Service_Interface* eldbus_service_interface_register2 | ( | Eldbus_Connection * | conn, |
const char * | path, | ||
const Eldbus_Service_Interface_Desc2 * | desc | ||
) |
Register an interface in the given path and connection. This extended register function allows the registration of stateful methods, with void* data.
Note: Use eldbus_service_interface_unregister() to unregister a interface.
conn | where the interface should listen |
path | object path |
desc | description of interface |
void eldbus_service_interface_unregister | ( | Eldbus_Service_Interface * | iface | ) |
Unregister a interface. Note: This doesn't unregister the object path if interface count reaches 0. Use eldbus_service_object_unregister() to unregister the object.
void* eldbus_service_object_data_del | ( | Eldbus_Service_Interface * | iface, |
const char * | key | ||
) |
Del data stored in object path.
iface | interface that belongs to the object path where data are stored |
key | that identify data |
void* eldbus_service_object_data_get | ( | const Eldbus_Service_Interface * | iface, |
const char * | key | ||
) |
Get data stored in object path.
iface | interface that belongs to the object path where data are stored |
key | that identify data |
void eldbus_service_object_data_set | ( | Eldbus_Service_Interface * | iface, |
const char * | key, | ||
const void * | data | ||
) |
Store data at object path, this data can be obtained from all interfaces of the same object.
iface | interface that belong to the object path where data will be stored |
key | to identify data |
data |
Eina_Bool eldbus_service_object_manager_attach | ( | Eldbus_Service_Interface * | iface | ) |
iface | ObjectManager will be attach in object path of this interface. |
Eina_Bool eldbus_service_object_manager_detach | ( | Eldbus_Service_Interface * | iface | ) |
iface | ObjectManager of object path of this interface will be detach. |
const char* eldbus_service_object_path_get | ( | const Eldbus_Service_Interface * | iface | ) |
void eldbus_service_object_unregister | ( | Eldbus_Service_Interface * | iface | ) |
Unregister all interfaces of the object path that this interface belongs and the object path.
Eina_Bool eldbus_service_property_changed | ( | const Eldbus_Service_Interface * | iface, |
const char * | name | ||
) |
Add property to list of changed properties A DBus.PropertiesChanged signal will be sent in an idler with all properties that have changed.
iface | Interface containing the changed property |
name | Property name |
Eina_Bool eldbus_service_property_invalidate_set | ( | const Eldbus_Service_Interface * | iface, |
const char * | name, | ||
Eina_Bool | is_invalidate | ||
) |
Eina_Bool eldbus_service_signal_emit | ( | const Eldbus_Service_Interface * | iface, |
unsigned int | signal_id, | ||
... | |||
) |
Emit a signal handler of the interface with non-complex types. Each signal handler have a internal id, the first signal handler of interface is = 0 the second = 1 and go on.
iface | interface of the signal |
signal_id | id of signal |
... | values that will be send on signal |
Eldbus_Message* eldbus_service_signal_new | ( | const Eldbus_Service_Interface * | iface, |
unsigned int | signal_id | ||
) |
Create signal message. Each signal handler have a internal id, the first signal handler of interface is = 0 the second = 1 and go on. This function is used when the signal has complex types.
iface | interface of the signal |
signal_id | id of signal |
Eina_Bool eldbus_service_signal_send | ( | const Eldbus_Service_Interface * | iface, |
Eldbus_Message * | signal_msg | ||
) |
Send a signal message.
On success this will call eldbus_message_unref() on the
signal_msg,which | is the intended behavior in 99% of the cases. Remember to increment the refcount if you want to keep it alive. |