- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Data Structures | Typedefs | Enumerations | Functions
Object Mapper
Eldbus

## 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
typedef struct _Eldbus_Object_Event_Interface_Removed | Eldbus_Object_Event_Interface_Removed
typedef struct _Eldbus_Object_Event_Property_Changed | Eldbus_Object_Event_Property_Changed
typedef struct _Eldbus_Object_Event_Property_Removed | Eldbus_Object_Event_Property_Removed
typedef void(* | Eldbus_Object_Event_Cb )(void *data, Eldbus_Object *obj, void *event_info)

## 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 }

## 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.
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().
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)
const char * | eldbus_object_bus_name_get (const Eldbus_Object *obj)
const char * | eldbus_object_path_get (const Eldbus_Object *obj)
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)

## Detailed Description

## Enumeration Type Documentation

enum Eldbus_Object_Event_Type

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_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

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

void eldbus_object_unref | ( | Eldbus_Object * | obj | ) |

Decrease object reference.

If reference == 0 object will be freed and all its children.

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

Referenced by eldbus_proxy_get().

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

References eina_inlist_append(), EINA_INLIST_GET, and eldbus_pending_free_cb_add().

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

References eina_list_append(), and eldbus_signal_handler_free_cb_add().

Referenced by eldbus_object_event_callback_add().