mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-15 04:05:11 +01:00
Merge branch 'issues/1620' into 'master'
Issues/1620 See merge request GNOME/glib!554
This commit is contained in:
commit
ea0da960ab
@ -2967,6 +2967,7 @@ g_dbus_connection_flush_sync
|
|||||||
g_dbus_connection_get_exit_on_close
|
g_dbus_connection_get_exit_on_close
|
||||||
g_dbus_connection_set_exit_on_close
|
g_dbus_connection_set_exit_on_close
|
||||||
g_dbus_connection_get_stream
|
g_dbus_connection_get_stream
|
||||||
|
g_dbus_connection_get_flags
|
||||||
g_dbus_connection_get_guid
|
g_dbus_connection_get_guid
|
||||||
g_dbus_connection_get_unique_name
|
g_dbus_connection_get_unique_name
|
||||||
GDBusCapabilityFlags
|
GDBusCapabilityFlags
|
||||||
|
@ -728,6 +728,10 @@ g_dbus_connection_get_property (GObject *object,
|
|||||||
g_value_set_flags (value, g_dbus_connection_get_capabilities (connection));
|
g_value_set_flags (value, g_dbus_connection_get_capabilities (connection));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PROP_FLAGS:
|
||||||
|
g_value_set_flags (value, g_dbus_connection_get_flags (connection));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -874,6 +878,7 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
|
|||||||
P_("Flags"),
|
P_("Flags"),
|
||||||
G_TYPE_DBUS_CONNECTION_FLAGS,
|
G_TYPE_DBUS_CONNECTION_FLAGS,
|
||||||
G_DBUS_CONNECTION_FLAGS_NONE,
|
G_DBUS_CONNECTION_FLAGS_NONE,
|
||||||
|
G_PARAM_READABLE |
|
||||||
G_PARAM_WRITABLE |
|
G_PARAM_WRITABLE |
|
||||||
G_PARAM_CONSTRUCT_ONLY |
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
G_PARAM_STATIC_NAME |
|
G_PARAM_STATIC_NAME |
|
||||||
@ -1186,6 +1191,28 @@ g_dbus_connection_get_capabilities (GDBusConnection *connection)
|
|||||||
return connection->capabilities;
|
return connection->capabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_dbus_connection_get_flags:
|
||||||
|
* @connection: a #GDBusConnection
|
||||||
|
*
|
||||||
|
* Gets the flags used to construct this connection
|
||||||
|
*
|
||||||
|
* Returns: zero or more flags from the #GDBusConnectionFlags enumeration
|
||||||
|
*
|
||||||
|
* Since: 2.60
|
||||||
|
*/
|
||||||
|
GDBusConnectionFlags
|
||||||
|
g_dbus_connection_get_flags (GDBusConnection *connection)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), G_DBUS_CONNECTION_FLAGS_NONE);
|
||||||
|
|
||||||
|
/* do not use g_return_val_if_fail(), we want the memory barrier */
|
||||||
|
if (!check_initialized (connection))
|
||||||
|
return G_DBUS_CONNECTION_FLAGS_NONE;
|
||||||
|
|
||||||
|
return connection->flags;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* Called in a temporary thread without holding locks. */
|
/* Called in a temporary thread without holding locks. */
|
||||||
|
@ -114,6 +114,8 @@ void g_dbus_connection_set_exit_on_close (GDBusConnection
|
|||||||
gboolean exit_on_close);
|
gboolean exit_on_close);
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
GDBusCapabilityFlags g_dbus_connection_get_capabilities (GDBusConnection *connection);
|
GDBusCapabilityFlags g_dbus_connection_get_capabilities (GDBusConnection *connection);
|
||||||
|
GLIB_AVAILABLE_IN_2_60
|
||||||
|
GDBusConnectionFlags g_dbus_connection_get_flags (GDBusConnection *connection);
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@ -1768,7 +1768,8 @@ async_initable_init_first (GAsyncInitable *initable)
|
|||||||
(GDestroyNotify) signal_subscription_unref);
|
(GDestroyNotify) signal_subscription_unref);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (proxy->priv->name != NULL)
|
if (proxy->priv->name != NULL &&
|
||||||
|
(g_dbus_connection_get_flags (proxy->priv->connection) & G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION))
|
||||||
{
|
{
|
||||||
proxy->priv->name_owner_changed_subscription_id =
|
proxy->priv->name_owner_changed_subscription_id =
|
||||||
g_dbus_connection_signal_subscribe (proxy->priv->connection,
|
g_dbus_connection_signal_subscribe (proxy->priv->connection,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user