Data Structures | Typedefs | Enumerations | Functions
Object Mapper

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_Objecteldbus_object_get (Eldbus_Connection *conn, const char *bus, const char *path)
 Get an object of the given bus and path. More...
 
Eldbus_Objecteldbus_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_Connectioneldbus_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_Pendingeldbus_object_send (Eldbus_Object *obj, Eldbus_Message *msg, Eldbus_Message_Cb cb, const void *cb_data, double timeout)
 Send a message. More...
 
Eldbus_Signal_Handlereldbus_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_Messageeldbus_object_method_call_new (Eldbus_Object *obj, const char *interface, const char *member)
 Call a dbus method on the Eldbus_Object. More...
 

Detailed Description

Typedef Documentation

◆ Eldbus_Object_Event_Cb

Eldbus_Object_Event_Cb

Callback that will be called when an Eldbus_Object event happens.

Parameters
dataContext data.
objThe Eldbus_Object.
event_infoInformation about the event that triggered the callback.

Enumeration Type Documentation

◆ 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_get()

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

Get an object of the given bus and path.

Parameters
connconnection where object belongs
busname of bus or unique-id of who listens for calls of this object
pathobject 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_ref()

Eldbus_Object * eldbus_object_ref ( Eldbus_Object obj)

Increase object reference.

Parameters
objAn Eldbus_Object.
Returns
The same Eldbus_Object with an increased refcount.

References DBG.

Referenced by eldbus_object_get().

◆ eldbus_object_unref()

void eldbus_object_unref ( Eldbus_Object obj)

Decrease object reference.

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

Parameters
objAn Eldbus_Object.

References DBG.

Referenced by efl_net_connman_shutdown().

◆ eldbus_object_free_cb_add()

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
objobject that you want to monitor
cbcallback that will be executed
datapassed to callback

References EINA_SAFETY_ON_NULL_RETURN.

Referenced by eldbus_proxy_get().

◆ eldbus_object_free_cb_del()

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
objObject monitored.
cbCallback that was registered.
dataData that was passed to callback.

References EINA_SAFETY_ON_NULL_RETURN.

◆ eldbus_object_event_callback_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.

Parameters
objThe Eldbus_Object on which to register a callback.
typeThe type of the event.
cbThe callback to call.
cb_dataThe 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().

◆ eldbus_object_event_callback_del()

void eldbus_object_event_callback_del ( Eldbus_Object obj,
Eldbus_Object_Event_Type  type,
Eldbus_Object_Event_Cb  cb,
const void *  cb_data 
)

◆ eldbus_object_connection_get()

Eldbus_Connection * eldbus_object_connection_get ( const Eldbus_Object obj)

Get the Eldbus_Connection object associated with a Eldbus_Object.

Parameters
objThe Eldbus_Object.
Returns
The corresponding Eldbus_Connection object.

◆ eldbus_object_bus_name_get()

const char * eldbus_object_bus_name_get ( const Eldbus_Object obj)

Get the name associated with a Eldbus_Object.

Parameters
objThe Eldbus_Object.
Returns
A string corresponding to the Eldbus_Object name.

Referenced by eldbus_proxy_method_call_new(), and eldbus_proxy_signal_handler_add().

◆ eldbus_object_path_get()

const char * eldbus_object_path_get ( const Eldbus_Object obj)

Get the path associated with a Eldbus_Object.

Parameters
objThe 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_object_send()

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
objthe msg will be sent in connection to this object
msgmessage that will be sent
cbif msg is a method call a callback should be passed to be executed when a response arrives
cb_datadata passed to callback
timeouttimeout 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_object_signal_handler_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
objwhere the signal is emitted
interfaceof the signal
membername of the signal
cbcallback that will be called when this signal is received
cb_datadata 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_object_method_call_new()

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
objThe Eldbus_Object on which to call the method.
interfaceInterface name.
memberName 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().