Data Structures | |
| struct | _Eldbus_Object_Event_Interface_Added |
| struct | _Eldbus_Object_Event_Interface_Removed |
| struct | _Eldbus_Object_Event_Property_Changed |
| struct | _Eldbus_Object_Event_Property_Removed |
Typedefs | |
| typedef struct _Eldbus_Object_Event_Interface_Added | Eldbus_Object_Event_Interface_Added |
| Structure used with the ELDBUS_OBJECT_EVENT_IFACE_ADDED event. | |
| typedef struct _Eldbus_Object_Event_Interface_Removed | Eldbus_Object_Event_Interface_Removed |
| Structure used with the ELDBUS_OBJECT_EVENT_IFACE_REMOVED event. | |
| typedef struct _Eldbus_Object_Event_Property_Changed | Eldbus_Object_Event_Property_Changed |
| Structure used with the ELDBUS_OBJECT_EVENT_PROPERTY_CHANGED event. | |
| typedef struct _Eldbus_Object_Event_Property_Removed | Eldbus_Object_Event_Property_Removed |
| Structure used with the ELDBUS_OBJECT_EVENT_PROPERTY_REMOVED event. | |
| typedef void(* | Eldbus_Object_Event_Cb) (void *data, Eldbus_Object *obj, void *event_info) |
| Callback that will be called when an Eldbus_Object event happens. More... | |
Enumerations | |
| enum | Eldbus_Object_Event_Type { ELDBUS_OBJECT_EVENT_IFACE_ADDED = 0, ELDBUS_OBJECT_EVENT_IFACE_REMOVED, ELDBUS_OBJECT_EVENT_PROPERTY_CHANGED, ELDBUS_OBJECT_EVENT_PROPERTY_REMOVED, ELDBUS_OBJECT_EVENT_DEL, ELDBUS_OBJECT_EVENT_LAST } |
| An enumeration containing several Eldbus_Object event types. More... | |
Functions | |
| Eldbus_Object * | eldbus_object_get (Eldbus_Connection *conn, const char *bus, const char *path) |
| Get an object of the given bus and path. More... | |
| Eldbus_Object * | eldbus_object_ref (Eldbus_Object *obj) |
| Increase object reference. More... | |
| void | eldbus_object_unref (Eldbus_Object *obj) |
| Decrease object reference. More... | |
| void | eldbus_object_free_cb_add (Eldbus_Object *obj, Eldbus_Free_Cb cb, const void *data) |
| Add a callback function to be called when object will be freed. More... | |
| void | eldbus_object_free_cb_del (Eldbus_Object *obj, Eldbus_Free_Cb cb, const void *data) |
| Remove callback registered in eldbus_object_free_cb_add(). More... | |
| void | eldbus_object_event_callback_add (Eldbus_Object *obj, Eldbus_Object_Event_Type type, Eldbus_Object_Event_Cb cb, const void *cb_data) |
| Add a callback function to be called when an event of the specified type occurs. More... | |
| void | eldbus_object_event_callback_del (Eldbus_Object *obj, Eldbus_Object_Event_Type type, Eldbus_Object_Event_Cb cb, const void *cb_data) |
| Remove callback registered in eldbus_object_event_callback_add(). More... | |
| Eldbus_Connection * | eldbus_object_connection_get (const Eldbus_Object *obj) |
| Get the Eldbus_Connection object associated with a Eldbus_Object. More... | |
| const char * | eldbus_object_bus_name_get (const Eldbus_Object *obj) |
| Get the name associated with a Eldbus_Object. More... | |
| const char * | eldbus_object_path_get (const Eldbus_Object *obj) |
| Get the path associated with a Eldbus_Object. More... | |
| Eldbus_Pending * | eldbus_object_send (Eldbus_Object *obj, Eldbus_Message *msg, Eldbus_Message_Cb cb, const void *cb_data, double timeout) |
| Send a message. More... | |
| Eldbus_Signal_Handler * | eldbus_object_signal_handler_add (Eldbus_Object *obj, const char *interface, const char *member, Eldbus_Signal_Cb cb, const void *cb_data) |
| Add a signal handler. More... | |
| Eldbus_Message * | eldbus_object_method_call_new (Eldbus_Object *obj, const char *interface, const char *member) |
| Call a dbus method on the Eldbus_Object. More... | |
| Eldbus_Object_Event_Cb |
Callback that will be called when an Eldbus_Object event happens.
| data | Context data. |
| obj | The Eldbus_Object. |
| event_info | Information about the event that triggered the callback. |
An enumeration containing several Eldbus_Object event types.
| Eldbus_Object* eldbus_object_get | ( | Eldbus_Connection * | conn, |
| const char * | bus, | ||
| const char * | path | ||
| ) |
Get an object of the given bus and path.
| conn | connection where object belongs |
| bus | name of bus or unique-id of who listens for calls of this object |
| path | object path of this object |
References eina_hash_string_small_new(), EINA_MAGIC_SET, eina_stringshare_add(), eina_stringshare_del(), eldbus_connection_free_cb_add(), eldbus_connection_free_cb_del(), ELDBUS_FDO_INTERFACE_PROPERTIES, eldbus_object_ref(), and eldbus_proxy_get().
Referenced by eldbus_shutdown(), and elocation_init().
| Eldbus_Object* eldbus_object_ref | ( | Eldbus_Object * | obj | ) |
Increase object reference.
| obj | An Eldbus_Object. |
References DBG.
Referenced by eldbus_object_get().
| void eldbus_object_unref | ( | Eldbus_Object * | obj | ) |
Decrease object reference.
If reference == 0 object will be freed and all its children.
| obj | An Eldbus_Object. |
References DBG.
| void eldbus_object_free_cb_add | ( | Eldbus_Object * | obj, |
| Eldbus_Free_Cb | cb, | ||
| const void * | data | ||
| ) |
Add a callback function to be called when object will be freed.
| obj | object that you want to monitor |
| cb | callback that will be executed |
| data | passed to callback |
Referenced by eldbus_proxy_get().
| void eldbus_object_free_cb_del | ( | Eldbus_Object * | obj, |
| Eldbus_Free_Cb | cb, | ||
| const void * | data | ||
| ) |
Remove callback registered in eldbus_object_free_cb_add().
| obj | Object monitored. |
| cb | Callback that was registered. |
| data | Data that was passed to callback. |
References eina_value_flush(), eina_value_free(), eina_value_struct_value_get(), eldbus_message_arguments_get(), eldbus_message_iter_basic_get(), eldbus_message_iter_dict_iterate(), eldbus_message_iter_get_and_next(), ELDBUS_OBJECT_EVENT_IFACE_ADDED, ELDBUS_OBJECT_EVENT_IFACE_REMOVED, ELDBUS_OBJECT_EVENT_PROPERTY_CHANGED, ELDBUS_OBJECT_EVENT_PROPERTY_REMOVED, eldbus_proxy_get(), eldbus_proxy_interface_get(), eldbus_proxy_object_get(), eldbus_proxy_unref(), ERR, _Eldbus_Object_Event_Interface_Removed::interface, _Eldbus_Object_Event_Property_Removed::interface, and _Eldbus_Object_Event_Interface_Added::proxy.
Referenced by eldbus_proxy_get().
| void eldbus_object_event_callback_add | ( | Eldbus_Object * | obj, |
| Eldbus_Object_Event_Type | type, | ||
| Eldbus_Object_Event_Cb | cb, | ||
| const void * | cb_data | ||
| ) |
Add a callback function to be called when an event of the specified type occurs.
| obj | The Eldbus_Object on which to register a callback. |
| type | The type of the event. |
| cb | The callback to call. |
| cb_data | The data to pass to the callback. |
References eina_inlist_append(), EINA_INLIST_GET, eina_inlist_remove(), ELDBUS_FDO_INTERFACE_OBJECT_MANAGER, ELDBUS_FDO_INTERFACE_PROPERTIES, ELDBUS_OBJECT_EVENT_IFACE_ADDED, ELDBUS_OBJECT_EVENT_IFACE_REMOVED, ELDBUS_OBJECT_EVENT_PROPERTY_CHANGED, ELDBUS_OBJECT_EVENT_PROPERTY_REMOVED, eldbus_object_signal_handler_add(), and eldbus_signal_handler_match_extra_set().
| void eldbus_object_event_callback_del | ( | Eldbus_Object * | obj, |
| Eldbus_Object_Event_Type | type, | ||
| Eldbus_Object_Event_Cb | cb, | ||
| const void * | cb_data | ||
| ) |
Remove callback registered in eldbus_object_event_callback_add().
| obj | The Eldbus_Object. |
| type | The type of the event. |
| cb | The callback to call. |
| cb_data | The data to pass to the callback. |
References EINA_INLIST_FOREACH, eina_list_append(), EINA_LIST_FREE, EINA_TRUE, ELDBUS_OBJECT_EVENT_IFACE_ADDED, ELDBUS_OBJECT_EVENT_IFACE_REMOVED, ELDBUS_OBJECT_EVENT_PROPERTY_CHANGED, ELDBUS_OBJECT_EVENT_PROPERTY_REMOVED, and eldbus_signal_handler_del().
| Eldbus_Connection* eldbus_object_connection_get | ( | const Eldbus_Object * | obj | ) |
Get the Eldbus_Connection object associated with a Eldbus_Object.
| obj | The Eldbus_Object. |
| const char* eldbus_object_bus_name_get | ( | const Eldbus_Object * | obj | ) |
Get the name associated with a Eldbus_Object.
| obj | The Eldbus_Object. |
Referenced by eldbus_proxy_method_call_new(), and eldbus_proxy_signal_handler_add().
| const char* eldbus_object_path_get | ( | const Eldbus_Object * | obj | ) |
Get the path associated with a Eldbus_Object.
| obj | The Eldbus_Object. |
References EINA_INLIST_GET, eina_inlist_remove(), and eldbus_pending_data_del().
Referenced by eldbus_proxy_method_call_new(), and eldbus_proxy_signal_handler_add().
| Eldbus_Pending* eldbus_object_send | ( | Eldbus_Object * | obj, |
| Eldbus_Message * | msg, | ||
| Eldbus_Message_Cb | cb, | ||
| const void * | cb_data, | ||
| double | timeout | ||
| ) |
Send a message.
| obj | the msg will be sent in connection to this object |
| msg | message that will be sent |
| cb | if msg is a method call a callback should be passed to be executed when a response arrives |
| cb_data | data passed to callback |
| timeout | timeout in milliseconds, -1 to default internal value or ELDBUS_TIMEOUT_INFINITE for no timeout |
References eina_inlist_append(), EINA_INLIST_GET, eina_list_remove(), and eldbus_pending_data_set().
Referenced by eldbus_object_introspect(), eldbus_object_managed_objects_get(), eldbus_object_peer_machine_id_get(), and eldbus_object_peer_ping().
| Eldbus_Signal_Handler* eldbus_object_signal_handler_add | ( | Eldbus_Object * | obj, |
| const char * | interface, | ||
| const char * | member, | ||
| Eldbus_Signal_Cb | cb, | ||
| const void * | cb_data | ||
| ) |
Add a signal handler.
| obj | where the signal is emitted |
| interface | of the signal |
| member | name of the signal |
| cb | callback that will be called when this signal is received |
| cb_data | data that will be passed to callback |
References eina_list_append(), and eldbus_signal_handler_free_cb_add().
Referenced by eldbus_object_event_callback_add(), eldbus_object_manager_interfaces_added(), and eldbus_object_manager_interfaces_removed().
| Eldbus_Message* eldbus_object_method_call_new | ( | Eldbus_Object * | obj, |
| const char * | interface, | ||
| const char * | member | ||
| ) |
Call a dbus method on the Eldbus_Object.
| obj | The Eldbus_Object on which to call the method. |
| interface | Interface name. |
| member | Name of the method to be called. |
References eina_hash_add(), eina_hash_del(), eina_hash_find(), eldbus_message_method_call_new(), and eldbus_proxy_interface_get().
Referenced by eldbus_object_introspect(), eldbus_object_managed_objects_get(), eldbus_object_peer_machine_id_get(), and eldbus_object_peer_ping().