Tizen Native API  4.0
Connection

Functions

Eldbus_Connectioneldbus_connection_get (Eldbus_Connection_Type type)
Eldbus_Connectioneldbus_private_connection_get (Eldbus_Connection_Type type)
Eldbus_Connectioneldbus_address_connection_get (const char *address)
Eldbus_Connectioneldbus_private_address_connection_get (const char *address)
Eldbus_Connectioneldbus_connection_ref (Eldbus_Connection *conn)
 Increment connection reference count.
void eldbus_connection_unref (Eldbus_Connection *conn)
 Decrement connection reference count.
void eldbus_connection_free_cb_add (Eldbus_Connection *conn, Eldbus_Free_Cb cb, const void *data)
 Add a callback function to be called when connection is freed.
void eldbus_connection_free_cb_del (Eldbus_Connection *conn, Eldbus_Free_Cb cb, const void *data)
 Remove callback registered in eldbus_connection_free_cb_add().
void eldbus_connection_data_set (Eldbus_Connection *conn, const char *key, const void *data)
 Set an attached data pointer to an object with a given string key.
void * eldbus_connection_data_get (const Eldbus_Connection *conn, const char *key)
 Get data stored in connection.
void * eldbus_connection_data_del (Eldbus_Connection *conn, const char *key)
 Del data stored in connection.
void eldbus_connection_event_callback_add (Eldbus_Connection *conn, Eldbus_Connection_Event_Type type, Eldbus_Connection_Event_Cb cb, const void *cb_data)
 Add a callback function to be called when an event occurs of the type passed.
void eldbus_connection_event_callback_del (Eldbus_Connection *conn, Eldbus_Connection_Event_Type type, Eldbus_Connection_Event_Cb cb, const void *cb_data)
 Remove callback registered in eldbus_connection_event_callback_add().
Eldbus_Pendingeldbus_connection_send (Eldbus_Connection *conn, Eldbus_Message *msg, Eldbus_Message_Cb cb, const void *cb_data, double timeout)
 Send a message.
const char * eldbus_connection_unique_name_get (Eldbus_Connection *conn)
 Gets unique name assigned by the message bus.

Typedefs

typedef void(* Eldbus_Connection_Event_Cb )(void *data, Eldbus_Connection *conn, void *event_info)

Defines

#define ELDBUS_TIMEOUT_INFINITE   ((int) 0x7fffffff)

Define Documentation

#define ELDBUS_TIMEOUT_INFINITE   ((int) 0x7fffffff)

Infinite timeout definition


Typedef Documentation

Callback called when we receive an event.


Enumeration Type Documentation

Enum of several Eldbus connection events.

Enumerator:
ELDBUS_CONNECTION_EVENT_LAST 

sentinel, not a real event type

Enum of several Eldbus connection types.

Enumerator:
ELDBUS_CONNECTION_TYPE_UNKNOWN 

sentinel, not a real type

ELDBUS_CONNECTION_TYPE_LAST 

sentinel, not a real type


Function Documentation

Deprecated:
Deprecated since 4.0. Establish a connection to bus and integrate it with the ecore main loop. If a connection of given type was already created before, its reference counter is incremented and the connection is returned.
Parameters:
addressthe address which will be passed to dbus_connection_open()
Returns:
connection with bus
Since :
3.0
void* eldbus_connection_data_del ( Eldbus_Connection conn,
const char *  key 
)

Del data stored in connection.

Deprecated:
Deprecated since 4.0.
Parameters:
connconnection where data is stored
keythat identifies data
Returns:
pointer to data if found otherwise NULL
Since :
3.0
void* eldbus_connection_data_get ( const Eldbus_Connection conn,
const char *  key 
)

Get data stored in connection.

Deprecated:
Deprecated since 4.0.
Parameters:
connconnection where data is stored
keykey that identifies data
Returns:
pointer to data if found otherwise NULL
Since :
3.0
void eldbus_connection_data_set ( Eldbus_Connection conn,
const char *  key,
const void *  data 
)

Set an attached data pointer to an object with a given string key.

Deprecated:
Deprecated since 4.0.
Parameters:
connThe connection object to store data to
keyto identify data
datadata that will be stored
Since :
3.0

Add a callback function to be called when an event occurs of the type passed.

Deprecated:
Deprecated since 4.0.
Since :
3.0

Remove callback registered in eldbus_connection_event_callback_add().

Deprecated:
Deprecated since 4.0.
Since :
3.0
void eldbus_connection_free_cb_add ( Eldbus_Connection conn,
Eldbus_Free_Cb  cb,
const void *  data 
)

Add a callback function to be called when connection is freed.

Deprecated:
Deprecated since 4.0.
Parameters:
connThe connection object to add the callback to.
cbcallback to be called
datadata passed to callback
Since :
3.0
void eldbus_connection_free_cb_del ( Eldbus_Connection conn,
Eldbus_Free_Cb  cb,
const void *  data 
)

Remove callback registered in eldbus_connection_free_cb_add().

Deprecated:
Deprecated since 4.0.
Since :
3.0
Deprecated:
Deprecated since 4.0. Establish a connection to bus and integrate it with the ecore main loop. If a connection of given type was already created before, its reference counter is incremented and the connection is returned.
Parameters:
typetype of connection e.g ELDBUS_CONNECTION_TYPE_SESSION, ELDBUS_CONNECTION_TYPE_SYSTEM or ELDBUS_CONNECTION_TYPE_STARTER
Returns:
connection with bus
Since :
3.0

Increment connection reference count.

Deprecated:
Deprecated since 4.0.
Parameters:
connThe given Eldbus_Connection object to reference.
Returns:
The Eldbus_Connection object given as parameter.
Since :
3.0
Eldbus_Pending* eldbus_connection_send ( Eldbus_Connection conn,
Eldbus_Message msg,
Eldbus_Message_Cb  cb,
const void *  cb_data,
double  timeout 
)

Send a message.

Deprecated:
Deprecated since 4.0.
Parameters:
connthe connection where the message will be sent
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 use default internal value or ELDBUS_TIMEOUT_INFINITE for no timeout
Returns:
A Eldbus_Pending struct.
Since :
3.0

Gets unique name assigned by the message bus.

Deprecated:
Deprecated since 4.0.
Parameters:
connconnection object to get unique name from.
Returns:
pointer to unique name string or NULL or error. Returned value remains valid until connection is free.
Since :
3.0

Decrement connection reference count.

Deprecated:
Deprecated since 4.0.

If reference count reaches 0, the connection to bus will be dropped and all its children will be invalidated.

Parameters:
connThe given Eldbus_Connection object to unreference.
Since :
3.0
Deprecated:
Deprecated since 4.0. Always create and establish a new connection to bus and integrate it with the ecore main loop. Differently from eldbus_connection_get(), this function guarantees to create a new connection to the D-Bus daemon and the connection is not shared by any means.
Parameters:
addressthe address which will be passed to dbus_connection_open_private()
Returns:
connection with bus
Since :
3.0
Deprecated:
Deprecated since 4.0. Always create and establish a new connection to bus and integrate it with the ecore main loop. Differently from eldbus_connection_get(), this function guarantees to create a new connection to the D-Bus daemon and the connection is not shared by any means.
Parameters:
typetype of connection e.g ELDBUS_CONNECTION_TYPE_SESSION, ELDBUS_CONNECTION_TYPE_SYSTEM or ELDBUS_CONNECTION_TYPE_STARTER
Returns:
connection with bus
Since :
3.0