mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 23:48:44 +02:00
gdbus: Move protocol constants from gdbusdaemon into gdbusprivate.h
These well-known flags and replies are part of the D-Bus Specification, and also exist with the same names in libdbus header files. Moving them into a private header means that unit tests like gdbus-proxy-threads and gdbus-subscribe don't have to reinvent them. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
committed by
Philip Withnall
parent
b0e8612a3b
commit
7401577074
@@ -319,20 +319,20 @@ request_name_cb (GObject *source_object,
|
||||
|
||||
switch (request_name_reply)
|
||||
{
|
||||
case 1: /* DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER */
|
||||
case DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER:
|
||||
/* We got the name - now listen for NameLost and NameAcquired */
|
||||
call_acquired_handler (client);
|
||||
break;
|
||||
|
||||
case 2: /* DBUS_REQUEST_NAME_REPLY_IN_QUEUE */
|
||||
case DBUS_REQUEST_NAME_REPLY_IN_QUEUE:
|
||||
/* Waiting in line - listen for NameLost and NameAcquired */
|
||||
call_lost_handler (client);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* assume we couldn't get the name - explicit fallthrough */
|
||||
case 3: /* DBUS_REQUEST_NAME_REPLY_EXISTS */
|
||||
case 4: /* DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER */
|
||||
case DBUS_REQUEST_NAME_REPLY_EXISTS:
|
||||
case DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER:
|
||||
/* Some other part of the process is already owning the name */
|
||||
call_lost_handler (client);
|
||||
unsubscribe = TRUE;
|
||||
@@ -954,7 +954,7 @@ g_bus_unown_name (guint owner_id)
|
||||
else
|
||||
{
|
||||
g_variant_get (result, "(u)", &release_name_reply);
|
||||
if (release_name_reply != 1 /* DBUS_RELEASE_NAME_REPLY_RELEASED */)
|
||||
if (release_name_reply != DBUS_RELEASE_NAME_REPLY_RELEASED)
|
||||
{
|
||||
g_warning ("Unexpected reply %d when releasing name %s", release_name_reply, client->name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user