Basic FreeDesktop.Org Methods

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

Modules | Macros | Typedefs | Functions
Basic FreeDesktop.Org Methods
Eldbus

## Modules
| org.freedesktop.DBus.Peer
| org.freedesktop.DBus.Introspectable
| org.freedesktop.DBus.Properties
| org.freedesktop.DBus.ObjectManager

## Macros
#define | ELDBUS_NAME_REQUEST_FLAG_ALLOW_REPLACEMENT 0x1
| Allow another service to become the primary owner if requested.
#define | ELDBUS_NAME_REQUEST_FLAG_REPLACE_EXISTING 0x2
| Request to replace the current primary owner.
#define | ELDBUS_NAME_REQUEST_FLAG_DO_NOT_QUEUE 0x4
| If we can not become the primary owner do not place us in the queue.
#define | ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER 1
| Service has become the primary owner of the requested name.
#define | ELDBUS_NAME_REQUEST_REPLY_IN_QUEUE 2
| Service could not become the primary owner and has been placed in the queue.
#define | ELDBUS_NAME_REQUEST_REPLY_EXISTS 3
| Service is already in the queue.
#define | ELDBUS_NAME_REQUEST_REPLY_ALREADY_OWNER 4
| Service is already the primary owner.
#define | ELDBUS_NAME_RELEASE_REPLY_RELEASED 1
| Service was released from the given name.
#define | ELDBUS_NAME_RELEASE_REPLY_NON_EXISTENT 2
| The given name does not exist on the bus.
#define | ELDBUS_NAME_RELEASE_REPLY_NOT_OWNER 3
| Service is not an owner of the given name.
#define | ELDBUS_NAME_START_REPLY_SUCCESS 1
| Service was auto started.
#define | ELDBUS_NAME_START_REPLY_ALREADY_RUNNING 2
| Service was already running.

## Typedefs
typedef void(* | Eldbus_Name_Owner_Changed_Cb) (void *data, const char *bus, const char *old_id, const char *new_id)
| Callback called when unique id of a bus name changed.

## Functions
Eldbus_Pending * | eldbus_name_request (Eldbus_Connection *conn, const char *bus, unsigned int flags, Eldbus_Message_Cb cb, const void *cb_data)
| Send a "RequestName" method call in proxy. More...
Eldbus_Pending * | eldbus_name_release (Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data)
| Send a "ReleaseName" method call in proxy. More...
Eldbus_Pending * | eldbus_name_owner_get (Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data)
| Send a "GetNameOwner" method call in proxy. More...
Eldbus_Pending * | eldbus_name_owner_has (Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data)
| Send a "NameHasOwner" method call in proxy. More...
Eldbus_Pending * | eldbus_names_list (Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data)
| Send a "ListNames" method call in proxy. More...
Eldbus_Pending * | eldbus_names_activatable_list (Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data)
| Send a "ListActivatableNames" method call in proxy. More...
Eldbus_Pending * | eldbus_hello (Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data)
| Send a "Hello" method call in proxy. More...
Eldbus_Pending * | eldbus_name_start (Eldbus_Connection *conn, const char *bus, unsigned int flags, Eldbus_Message_Cb cb, const void *cb_data)
| Send a "StartServiceByName" method call in proxy. More...
void | eldbus_name_owner_changed_callback_add (Eldbus_Connection *conn, const char *bus, Eldbus_Name_Owner_Changed_Cb cb, const void *cb_data, Eina_Bool allow_initial_call)
| Add a callback to be called when unique id of a bus name changed. More...
void | eldbus_name_owner_changed_callback_del (Eldbus_Connection *conn, const char *bus, Eldbus_Name_Owner_Changed_Cb cb, const void *cb_data)
| Remove callback added with eldbus_name_owner_changed_callback_add(). More...

## Detailed Description

## Function Documentation

Eldbus_Pending* eldbus_name_request | ( | Eldbus_Connection * | conn,
|  | const char * | bus,
|  | unsigned int | flags,
|  | Eldbus_Message_Cb | cb,
|  | const void * | cb_data
| ) |  |

Send a "RequestName" method call in proxy.

Parameters

  conn | Connection object.
  bus | Name of the bus
  flags | Parameter of the "RequestName" method.
  cb | Callback to call when receiving answer.
  cb_data | Data passed to callback.

Returns
  The Eldbus_Pending corresponding to the message sent.

References eldbus_proxy_call().

Eldbus_Pending* eldbus_name_release | ( | Eldbus_Connection * | conn,
|  | const char * | bus,
|  | Eldbus_Message_Cb | cb,
|  | const void * | cb_data
| ) |  |

Send a "ReleaseName" method call in proxy.

Parameters

  conn | Connection object.
  bus | Name of the bus
  cb | Callback to call when receiving answer.
  cb_data | Data passed to callback.

Returns
  The Eldbus_Pending corresponding to the message sent.

References eldbus_proxy_call().

Eldbus_Pending* eldbus_name_owner_get | ( | Eldbus_Connection * | conn,
|  | const char * | bus,
|  | Eldbus_Message_Cb | cb,
|  | const void * | cb_data
| ) |  |

Send a "GetNameOwner" method call in proxy.

Parameters

  conn | Connection object.
  bus | Name of the bus
  cb | Callback to call when receiving answer.
  cb_data | Data passed to callback.

Returns
  The Eldbus_Pending corresponding to the message sent.

References eldbus_proxy_call().

Eldbus_Pending* eldbus_name_owner_has | ( | Eldbus_Connection * | conn,
|  | const char * | bus,
|  | Eldbus_Message_Cb | cb,
|  | const void * | cb_data
| ) |  |

Send a "NameHasOwner" method call in proxy.

Parameters

  conn | Connection object.
  bus | Name of the bus
  cb | Callback to call when receiving answer.
  cb_data | Data passed to callback.

Returns
  The Eldbus_Pending corresponding to the message sent.

References eldbus_proxy_call().

Eldbus_Pending* eldbus_names_list | ( | Eldbus_Connection * | conn,
|  | Eldbus_Message_Cb | cb,
|  | const void * | cb_data
| ) |  |

Send a "ListNames" method call in proxy.

Parameters

  conn | Connection object.
  cb | Callback to call when receiving answer.
  cb_data | Data passed to callback.

Returns
  The Eldbus_Pending corresponding to the message sent.

References eldbus_proxy_call().

Eldbus_Pending* eldbus_names_activatable_list | ( | Eldbus_Connection * | conn,
|  | Eldbus_Message_Cb | cb,
|  | const void * | cb_data
| ) |  |

Send a "ListActivatableNames" method call in proxy.

Parameters

  conn | Connection object.
  cb | Callback to call when receiving answer.
  cb_data | Data passed to callback.

Returns
  The Eldbus_Pending corresponding to the message sent.

References eldbus_proxy_call().

Eldbus_Pending* eldbus_hello | ( | Eldbus_Connection * | conn,
|  | Eldbus_Message_Cb | cb,
|  | const void * | cb_data
| ) |  |

Send a "Hello" method call in proxy.

Parameters

  conn | Connection object.
  cb | Callback to call when receiving answer.
  cb_data | Data passed to callback.

Returns
  The Eldbus_Pending corresponding to the message sent.

References eldbus_proxy_call().

Eldbus_Pending* eldbus_name_start | ( | Eldbus_Connection * | conn,
|  | const char * | bus,
|  | unsigned int | flags,
|  | Eldbus_Message_Cb | cb,
|  | const void * | cb_data
| ) |  |

Send a "StartServiceByName" method call in proxy.

Parameters

  conn | Connection object.
  bus | Name of the bus.
  flags | Parameter of the "StartServiceByName" method.
  cb | Callback to call when receiving answer.
  cb_data | Data passed to callback.

Returns
  The Eldbus_Pending corresponding to the message sent.

References eldbus_proxy_call().

Referenced by ethumb_client_connect().

void eldbus_name_owner_changed_callback_add | ( | Eldbus_Connection * | conn,
|  | const char * | bus,
|  | Eldbus_Name_Owner_Changed_Cb | cb,
|  | const void * | cb_data,
|  | Eina_Bool | allow_initial_call
| ) |  |

Add a callback to be called when unique id of a bus name changed.

This function implicitly calls eldbus_name_owner_get() in order to be able to monitor the name. If the only interest is to receive notifications when the name in fact changes, pass EINA_FALSE to

Parameters

  allow_initial_call | so your callback will not be called on first retrieval of name owner. If the initial state is important, pass EINA_TRUE to this parameter.
  conn | connection
  bus | name of bus
  cb | callback
  cb_data | context data
  allow_initial_call | allow call callback with actual id of the bus

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

Referenced by ethumb_client_connect().

void eldbus_name_owner_changed_callback_del | ( | Eldbus_Connection * | conn,
|  | const char * | bus,
|  | Eldbus_Name_Owner_Changed_Cb | cb,
|  | const void * | cb_data
| ) |  |

Remove callback added with eldbus_name_owner_changed_callback_add().

Parameters

  conn | connection
  bus | name of bus
  cb | callback
  cb_data | context data

References ecore_idler_del(), eina_hash_find(), EINA_INLIST_FOREACH, EINA_INLIST_GET, eina_inlist_remove(), eina_list_append(), and EINA_TRUE.