mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-30 04:44:16 +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
@@ -1058,7 +1058,7 @@ on_properties_changed (GDBusConnection *connection,
|
||||
g_dbus_connection_call (proxy->priv->connection,
|
||||
proxy->priv->name_owner,
|
||||
proxy->priv->object_path,
|
||||
"org.freedesktop.DBus.Properties",
|
||||
DBUS_INTERFACE_PROPERTIES,
|
||||
"Get",
|
||||
g_variant_new ("(ss)", proxy->priv->interface_name, data->prop_name),
|
||||
G_VARIANT_TYPE ("(v)"),
|
||||
@@ -1330,7 +1330,7 @@ on_name_owner_changed (GDBusConnection *connection,
|
||||
g_dbus_connection_call (proxy->priv->connection,
|
||||
data->name_owner,
|
||||
proxy->priv->object_path,
|
||||
"org.freedesktop.DBus.Properties",
|
||||
DBUS_INTERFACE_PROPERTIES,
|
||||
"GetAll",
|
||||
g_variant_new ("(s)", proxy->priv->interface_name),
|
||||
G_VARIANT_TYPE ("(a{sv})"),
|
||||
@@ -1424,7 +1424,7 @@ async_init_data_set_name_owner (GTask *task,
|
||||
g_dbus_connection_call (proxy->priv->connection,
|
||||
name_owner,
|
||||
proxy->priv->object_path,
|
||||
"org.freedesktop.DBus.Properties",
|
||||
DBUS_INTERFACE_PROPERTIES,
|
||||
"GetAll",
|
||||
g_variant_new ("(s)", proxy->priv->interface_name),
|
||||
G_VARIANT_TYPE ("(a{sv})"),
|
||||
@@ -1688,7 +1688,7 @@ async_initable_init_first (GAsyncInitable *initable)
|
||||
proxy->priv->properties_changed_subscription_id =
|
||||
g_dbus_connection_signal_subscribe (proxy->priv->connection,
|
||||
proxy->priv->name,
|
||||
"org.freedesktop.DBus.Properties",
|
||||
DBUS_INTERFACE_PROPERTIES,
|
||||
"PropertiesChanged",
|
||||
proxy->priv->object_path,
|
||||
proxy->priv->interface_name,
|
||||
|
Reference in New Issue
Block a user