X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/638f9a561e8353ae9bd7e07e4f42e4c4f53f617e..90ae7775002ba75cb890f14e15653e42ebecce35:/src/modules/reserve.h diff --git a/src/modules/reserve.h b/src/modules/reserve.h index 9ae49cf5..6527bd7f 100644 --- a/src/modules/reserve.h +++ b/src/modules/reserve.h @@ -51,7 +51,7 @@ typedef int (*rd_request_cb_t)( * the error was caused D-Bus. */ int rd_acquire( rd_device **d, /* On success a pointer to the newly allocated rd_device object will be filled in here */ - DBusConnection *connection, /* Session bus (when D-Bus learns about user busses we should switchg to user busses) */ + DBusConnection *connection, /* Session bus (when D-Bus learns about user busses we should switch to user busses) */ const char *device_name, /* The device to lock, e.g. "Audio0" */ const char *application_name, /* A human readable name of the application, e.g. "PulseAudio Sound Server" */ int32_t priority, /* The priority for this application. If unsure use 0 */ @@ -72,6 +72,15 @@ void rd_set_userdata(rd_device *d, void *userdata); * userdata was set. */ void* rd_get_userdata(rd_device *d); +/* Helper function to get the unique connection name owning a given + * name. Returns 0 on success, a negative errno style return value on + * error. */ +int rd_dbus_get_name_owner( + DBusConnection *connection, + const char *name, + char **name_owner, + DBusError *error); + #ifdef __cplusplus } #endif