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:
Simon McVittie
2024-05-13 12:55:04 +01:00
committed by Philip Withnall
parent b0e8612a3b
commit 7401577074
8 changed files with 32 additions and 47 deletions

View File

@@ -28,18 +28,9 @@
#include <gio/gio.h>
#include "gdbusprivate.h"
#include "gdbus-tests.h"
#ifdef HAVE_DBUS1
# include <dbus/dbus-shared.h>
#else
# define DBUS_INTERFACE_DBUS "org.freedesktop.DBus"
# define DBUS_PATH_DBUS "/org/freedesktop/DBus"
# define DBUS_SERVICE_DBUS "org.freedesktop.DBus"
# define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1
# define DBUS_RELEASE_NAME_REPLY_RELEASED 1
#endif
#define MY_NAME "com.example.Test.Myself"
/* This many threads create and destroy GDBusProxy instances, in addition
* to the main thread processing their NameOwnerChanged signals.