Eldbus_Object_Mapper(3)

NAME
Eldbus_Object_Mapper - Object Mapper

SYNOPSIS

  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.

  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.

  Functions
Eldbus_Object * eldbus_object_get (Eldbus_Connection *conn, const char *bus, const char *path)
Get an object of the given bus and path.
Eldbus_Object * eldbus_object_ref (Eldbus_Object *obj)
Increase object reference.
void eldbus_object_unref (Eldbus_Object *obj)
Decrease object reference.
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.
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().
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.
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().
Eldbus_Connection * eldbus_object_connection_get (const Eldbus_Object *obj)
Get the Eldbus_Connection object associated with a Eldbus_Object.
const char * eldbus_object_bus_name_get (const Eldbus_Object *obj)
Get the name associated with a Eldbus_Object.
const char * eldbus_object_path_get (const Eldbus_Object *obj)
Get the path associated with a Eldbus_Object.
Eldbus_Pending * eldbus_object_send (Eldbus_Object *obj, Eldbus_Message *msg, Eldbus_Message_Cb cb, const void *cb_data, double timeout)
Send a message.
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.
Eldbus_Message * eldbus_object_method_call_new (Eldbus_Object *obj, const char *interface, const char *member)
Call a dbus method on the Eldbus_Object.

Detailed Description

Typedef Documentation

  Eldbus_Object_Event_Cb

Callback that will be called when an Eldbus_Object event happens.

Parameters
    data Context data.
    obj The Eldbus_Object.
    event_info Information about the event that triggered the callback.

Enumeration Type Documentation

  enum Eldbus_Object_Event_Type

An enumeration containing several Eldbus_Object event types.

Enumerator

ELDBUS_OBJECT_EVENT_IFACE_ADDED
    a parent path must have a ObjectManager interface

ELDBUS_OBJECT_EVENT_IFACE_REMOVED
    a parent path must have a ObjectManager interface

ELDBUS_OBJECT_EVENT_PROPERTY_CHANGED
    a property has changes

ELDBUS_OBJECT_EVENT_PROPERTY_REMOVED
    a property was removed

ELDBUS_OBJECT_EVENT_LAST
    sentinel, not a real event type

Function Documentation

  Eldbus_Object* eldbus_object_get (Eldbus_Connection * conn, const char * bus, const char * path)

Get an object of the given bus and path.

Parameters
    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

Returns
    The corresponding Eldbus_Object.

References eina_hash_string_small_new(), EINA_MAGIC_SET, EINA_SAFETY_ON_NULL_GOTO, EINA_SAFETY_ON_NULL_RETURN_VAL, eina_stringshare_add(), eina_stringshare_del(), eldbus_connection_free_cb_add(), ELDBUS_FDO_INTERFACE_PROPERTIES, eldbus_object_ref(), and eldbus_proxy_get().

Referenced by efl_net_connman_access_point_new(), and efl_net_connman_technology_new().

  Eldbus_Object* eldbus_object_ref (Eldbus_Object * obj)

Increase object reference.

Parameters
    obj An Eldbus_Object.

Returns
    The same Eldbus_Object with an increased refcount.

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.

Parameters
    obj An Eldbus_Object.

References DBG.

Referenced by efl_net_connman_shutdown().

  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.

Parameters
    obj object that you want to monitor
    cb callback that will be executed
    data passed to callback

References EINA_SAFETY_ON_NULL_RETURN.

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().

Parameters
    obj Object monitored.
    cb Callback that was registered.
    data Data that was passed to callback.

References EINA_SAFETY_ON_NULL_RETURN.

  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.

Parameters
    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_SAFETY_ON_NULL_RETURN, EINA_SAFETY_ON_TRUE_RETURN, ELDBUS_FDO_INTERFACE_OBJECT_MANAGER, ELDBUS_FDO_INTERFACE_PROPERTIES, ELDBUS_OBJECT_EVENT_IFACE_ADDED, ELDBUS_OBJECT_EVENT_IFACE_REMOVED, ELDBUS_OBJECT_EVENT_LAST, 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().

Parameters
    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_SAFETY_ON_NULL_RETURN, EINA_SAFETY_ON_TRUE_RETURN, EINA_TRUE, ELDBUS_OBJECT_EVENT_IFACE_ADDED, ELDBUS_OBJECT_EVENT_IFACE_REMOVED, ELDBUS_OBJECT_EVENT_LAST, 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.

Parameters
    obj The Eldbus_Object.

Returns
    The corresponding Eldbus_Connection object.

  const char* eldbus_object_bus_name_get (const Eldbus_Object * obj)

Get the name associated with a Eldbus_Object.

Parameters
    obj The Eldbus_Object.

Returns
    A string corresponding to the Eldbus_Object name.

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.

Parameters
    obj The Eldbus_Object.

Returns
    A string corresponding to the Eldbus_Object path.

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.

Parameters
    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

Returns
    A Eldbus_Pending object.

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.

Parameters
    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

Returns
    A listener to the desired signal.

References eina_list_append(), EINA_SAFETY_ON_NULL_RETURN_VAL, 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.

Parameters
    obj The Eldbus_Object on which to call the method.
    interface Interface name.
    member Name of the method to be called.

Returns
    a new Eldbus_Message, free with eldbus_message_unref()

References EINA_SAFETY_ON_NULL_RETURN_VAL, and eldbus_message_method_call_new().

Referenced by eldbus_object_introspect(), eldbus_object_managed_objects_get(), eldbus_object_peer_machine_id_get(), and eldbus_object_peer_ping().

Author

Generated automatically by Doxygen for EFL from the source code.