reserve: Move get_name_owner() to the public rd_device API

The function is interesting for both rd_device and rd_monitor so make
it part of the rd_device public API to avoid duplicated code.

The decision to move the function to reserve.c is motivated by the fact
that other projects (i.e. jack) use reserve.c only. Therefore, adding a
reserve->reserve-monitor dependency should be avoided.
This commit is contained in:
Mikel Astiz 2013-01-30 09:30:30 +01:00 committed by Tanu Kaskinen
parent 849161f086
commit cb0f3d2878
3 changed files with 67 additions and 57 deletions

View file

@ -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