Elektra  0.8.23
Typedefs | Functions
kdbio_adapter_dbus.h File Reference

I/O Adapter for D-Bus. More...

#include <dbus/dbus.h>
#include <stdlib.h>
#include <string.h>
#include <kdbio.h>
Include dependency graph for kdbio_adapter_dbus.h:
This graph shows which files directly or indirectly include this file:

Typedefs

typedef struct _ElektraIoAdapterDbusHandle ElektraIoAdapterDbusHandle
 D-Bus Adapter Handle. More...
 

Functions

ElektraIoAdapterDbusHandleelektraIoAdapterDbusAttach (DBusConnection *connection, ElektraIoInterface *ioBinding)
 Attach D-Bus connection to asynchronous I/O binding. More...
 
int elektraIoAdapterDbusCleanup (ElektraIoAdapterDbusHandle *handle)
 Remove D-Bus connection from I/O binding. More...
 

Detailed Description

I/O Adapter for D-Bus.

Typedef Documentation

◆ ElektraIoAdapterDbusHandle

typedef struct _ElektraIoAdapterDbusHandle ElektraIoAdapterDbusHandle

D-Bus Adapter Handle.

Returned by elektraIoAdapterDbusAttach().

Function Documentation

◆ elektraIoAdapterDbusAttach()

ElektraIoAdapterDbusHandle* elektraIoAdapterDbusAttach ( DBusConnection *  connection,
ElektraIoInterface ioBinding 
)

Attach D-Bus connection to asynchronous I/O binding.

Messages are sent and received using the I/O binding

Parameters
connectionD-Bus connection
ioBindingI/O binding
Returns
handle to be used with elektraIoAdapterDbusCleanup() or NULL on error

◆ elektraIoAdapterDbusCleanup()

int elektraIoAdapterDbusCleanup ( ElektraIoAdapterDbusHandle handle)

Remove D-Bus connection from I/O binding.

This function frees the passed handle.

Currently it is NOT possible to revert all changes made to a connection by elektraIoAdapterDbusAttach(). It is advisable to call dbus_connection_unref() or dbus_connection_close() in case of a private bus connection afterwards.

Parameters
handleadapter handle
Return values
1on success
0on error