adbus_Misc

Miscellaneous functions. More...

Functions

int adbus_connect_address (adbus_BusType type, char *buf, size_t sz)
 Gets the address to connect to for the given bus type.
int adbus_bind_address (adbus_BusType type, char *buf, size_t sz)
 Gets the address to bind to for the given bus type.

Detailed Description

Miscellaneous functions.


Function Documentation

int adbus_bind_address ( adbus_BusType  type,
char *  buf,
size_t  sz 
)

Gets the address to bind to for the given bus type.

The address is copied into the supplied buffer. It is truncated if the buffer is too small. In general having a buffer size of 256 is sufficient for any reasonable address.

The lookup rules for ADBUS_DEFAULT_BUS are:

  1. DBUS_STARTER_ADDRESS environment variable
  2. DBUS_SESSION_BUS_ADDRESS environment variable
  3. The hardcoded string "autostart:"

For ADBUS_SESSION_BUS:

  1. DBUS_SESSION_BUS_ADDRESS environment variable
  2. The hardcoded string "autostart:"

For ADBUS_SYSTEM_BUS:

  1. DBUS_SYSTEM_BUS_ADDRESS environment variable
  2. On unix: the hardcoded string "unix:file=/var/run/dbus/system_bus_socket"
  3. On windows: the hardcoded string "autostart:"
Returns:
non-zero on error
int adbus_connect_address ( adbus_BusType  type,
char *  buf,
size_t  sz 
)

Gets the address to connect to for the given bus type.

The address is copied into the supplied buffer. It is truncated if the buffer is too small. In general having a buffer size of 256 is sufficient for any reasonable address.

The lookup rules for ADBUS_DEFAULT_BUS are:

  1. DBUS_STARTER_ADDRESS environment variable
  2. DBUS_SESSION_BUS_ADDRESS environment variable
  3. On windows: the shared memory segment "Local\DBUS_SESSION_BUS_ADDRESS"
  4. The hardcoded string "autostart:"

For ADBUS_SESSION_BUS:

  1. DBUS_SESSION_BUS_ADDRESS environment variable
  2. On windows: the shared memory segment "Local\DBUS_SESSION_BUS_ADDRESS"
  3. The hardcoded string "autostart:"

For ADBUS_SYSTEM_BUS:

  1. DBUS_SYSTEM_BUS_ADDRESS environment variable
  2. On unix: the hardcoded string "unix:file=/var/run/dbus/system_bus_socket"
  3. On windows: the hardcoded string "autostart:"
Returns:
non-zero on error
 All Data Structures Files Functions Variables Friends Defines

Generated on Mon Mar 22 00:10:02 2010 for adbus by  doxygen 1.6.1