mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
GDBusMethodInvocation: add 'property_info'
Add a field on GDBusMethodInvocation for GDBusPropertyInfo. For now, it is always %NULL. It will be set in future patches. https://bugzilla.gnome.org/show_bug.cgi?id=698375
This commit is contained in:
parent
14dc028003
commit
c691f7b6ca
@ -4841,6 +4841,7 @@ schedule_method_call (GDBusConnection *connection,
|
||||
guint subtree_registration_id,
|
||||
const GDBusInterfaceInfo *interface_info,
|
||||
const GDBusMethodInfo *method_info,
|
||||
const GDBusPropertyInfo *property_info,
|
||||
GVariant *parameters,
|
||||
const GDBusInterfaceVTable *vtable,
|
||||
GMainContext *main_context,
|
||||
@ -4854,6 +4855,7 @@ schedule_method_call (GDBusConnection *connection,
|
||||
g_dbus_message_get_interface (message),
|
||||
g_dbus_message_get_member (message),
|
||||
method_info,
|
||||
property_info,
|
||||
connection,
|
||||
message,
|
||||
parameters,
|
||||
@ -4950,7 +4952,7 @@ validate_and_maybe_schedule_method_call (GDBusConnection *connection,
|
||||
|
||||
/* schedule the call in idle */
|
||||
schedule_method_call (connection, message, registration_id, subtree_registration_id,
|
||||
interface_info, method_info, parameters,
|
||||
interface_info, method_info, NULL, parameters,
|
||||
vtable, main_context, user_data);
|
||||
g_variant_unref (parameters);
|
||||
handled = TRUE;
|
||||
|
@ -86,6 +86,7 @@ struct _GDBusMethodInvocation
|
||||
gchar *interface_name;
|
||||
gchar *method_name;
|
||||
GDBusMethodInfo *method_info;
|
||||
GDBusPropertyInfo *property_info;
|
||||
GDBusConnection *connection;
|
||||
GDBusMessage *message;
|
||||
GVariant *parameters;
|
||||
@ -193,6 +194,24 @@ g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation)
|
||||
return invocation->method_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_dbus_method_invocation_get_property_info:
|
||||
* @invocation: A #GDBusMethodInvocation
|
||||
*
|
||||
* Gets information about the property that this method call is for, if
|
||||
* any.
|
||||
*
|
||||
* Returns: (transfer none): a #GDBusPropertyInfo or %NULL
|
||||
*
|
||||
* Since: 2.38
|
||||
*/
|
||||
const GDBusPropertyInfo *
|
||||
g_dbus_method_invocation_get_property_info (GDBusMethodInvocation *invocation)
|
||||
{
|
||||
g_return_val_if_fail (G_IS_DBUS_METHOD_INVOCATION (invocation), NULL);
|
||||
return invocation->property_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_dbus_method_invocation_get_method_name:
|
||||
* @invocation: A #GDBusMethodInvocation.
|
||||
@ -293,6 +312,7 @@ g_dbus_method_invocation_get_user_data (GDBusMethodInvocation *invocation)
|
||||
* @interface_name: The name of the D-Bus interface the method was invoked on.
|
||||
* @method_name: The name of the method that was invoked.
|
||||
* @method_info: (allow-none): Information about the method call or %NULL.
|
||||
* @property_info: (allow-none): Information about the property or %NULL.
|
||||
* @connection: The #GDBusConnection the method was invoked on.
|
||||
* @message: The D-Bus message as a #GDBusMessage.
|
||||
* @parameters: The parameters as a #GVariant tuple.
|
||||
@ -310,6 +330,7 @@ _g_dbus_method_invocation_new (const gchar *sender,
|
||||
const gchar *interface_name,
|
||||
const gchar *method_name,
|
||||
const GDBusMethodInfo *method_info,
|
||||
const GDBusPropertyInfo *property_info,
|
||||
GDBusConnection *connection,
|
||||
GDBusMessage *message,
|
||||
GVariant *parameters,
|
||||
@ -332,6 +353,8 @@ _g_dbus_method_invocation_new (const gchar *sender,
|
||||
invocation->method_name = g_strdup (method_name);
|
||||
if (method_info)
|
||||
invocation->method_info = g_dbus_method_info_ref ((GDBusMethodInfo *)method_info);
|
||||
if (property_info)
|
||||
invocation->property_info = g_dbus_property_info_ref ((GDBusPropertyInfo *)property_info);
|
||||
invocation->connection = g_object_ref (connection);
|
||||
invocation->message = g_object_ref (message);
|
||||
invocation->parameters = g_variant_ref (parameters);
|
||||
|
@ -47,6 +47,8 @@ GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_method_invocation_get_method_name (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const GDBusMethodInfo *g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
const GDBusPropertyInfo *g_dbus_method_invocation_get_property_info (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
|
@ -124,6 +124,7 @@ GDBusMethodInvocation *_g_dbus_method_invocation_new (const gchar *sen
|
||||
const gchar *interface_name,
|
||||
const gchar *method_name,
|
||||
const GDBusMethodInfo *method_info,
|
||||
const GDBusPropertyInfo *property_info,
|
||||
GDBusConnection *connection,
|
||||
GDBusMessage *message,
|
||||
GVariant *parameters,
|
||||
|
Loading…
Reference in New Issue
Block a user