mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
gdbus: Use symbolic constants for interfaces from dbus-specification
Most D-Bus interfaces are domain-specific, but these interfaces from the D-Bus Specification are intended to be commonly used in any context for which they are found to be appropriate. Most of these use `gdbusprivate.h`. One exception is that `gio/tests/gdbus-example-*` redefine the constants locally: due to these files' dual role as part of the unit tests and as sample code, it seems desirable to ensure that they can still be compiled outside GLib. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
committed by
Philip Withnall
parent
b4f8d4a5d5
commit
7c609f8142
@@ -1,6 +1,8 @@
|
||||
#include <gio/gio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties"
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* The object we want to export */
|
||||
@@ -253,7 +255,7 @@ send_property_change (GObject *obj,
|
||||
g_dbus_connection_emit_signal (connection,
|
||||
NULL,
|
||||
"/org/myorg/MyObject",
|
||||
"org.freedesktop.DBus.Properties",
|
||||
DBUS_INTERFACE_PROPERTIES,
|
||||
"PropertiesChanged",
|
||||
g_variant_new ("(sa{sv}as)",
|
||||
"org.myorg.MyObject",
|
||||
|
Reference in New Issue
Block a user