mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +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,
|
guint subtree_registration_id,
|
||||||
const GDBusInterfaceInfo *interface_info,
|
const GDBusInterfaceInfo *interface_info,
|
||||||
const GDBusMethodInfo *method_info,
|
const GDBusMethodInfo *method_info,
|
||||||
|
const GDBusPropertyInfo *property_info,
|
||||||
GVariant *parameters,
|
GVariant *parameters,
|
||||||
const GDBusInterfaceVTable *vtable,
|
const GDBusInterfaceVTable *vtable,
|
||||||
GMainContext *main_context,
|
GMainContext *main_context,
|
||||||
@ -4854,6 +4855,7 @@ schedule_method_call (GDBusConnection *connection,
|
|||||||
g_dbus_message_get_interface (message),
|
g_dbus_message_get_interface (message),
|
||||||
g_dbus_message_get_member (message),
|
g_dbus_message_get_member (message),
|
||||||
method_info,
|
method_info,
|
||||||
|
property_info,
|
||||||
connection,
|
connection,
|
||||||
message,
|
message,
|
||||||
parameters,
|
parameters,
|
||||||
@ -4950,7 +4952,7 @@ validate_and_maybe_schedule_method_call (GDBusConnection *connection,
|
|||||||
|
|
||||||
/* schedule the call in idle */
|
/* schedule the call in idle */
|
||||||
schedule_method_call (connection, message, registration_id, subtree_registration_id,
|
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);
|
vtable, main_context, user_data);
|
||||||
g_variant_unref (parameters);
|
g_variant_unref (parameters);
|
||||||
handled = TRUE;
|
handled = TRUE;
|
||||||
|
@ -86,6 +86,7 @@ struct _GDBusMethodInvocation
|
|||||||
gchar *interface_name;
|
gchar *interface_name;
|
||||||
gchar *method_name;
|
gchar *method_name;
|
||||||
GDBusMethodInfo *method_info;
|
GDBusMethodInfo *method_info;
|
||||||
|
GDBusPropertyInfo *property_info;
|
||||||
GDBusConnection *connection;
|
GDBusConnection *connection;
|
||||||
GDBusMessage *message;
|
GDBusMessage *message;
|
||||||
GVariant *parameters;
|
GVariant *parameters;
|
||||||
@ -193,6 +194,24 @@ g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation)
|
|||||||
return invocation->method_info;
|
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:
|
* g_dbus_method_invocation_get_method_name:
|
||||||
* @invocation: A #GDBusMethodInvocation.
|
* @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.
|
* @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_name: The name of the method that was invoked.
|
||||||
* @method_info: (allow-none): Information about the method call or %NULL.
|
* @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.
|
* @connection: The #GDBusConnection the method was invoked on.
|
||||||
* @message: The D-Bus message as a #GDBusMessage.
|
* @message: The D-Bus message as a #GDBusMessage.
|
||||||
* @parameters: The parameters as a #GVariant tuple.
|
* @parameters: The parameters as a #GVariant tuple.
|
||||||
@ -305,15 +325,16 @@ g_dbus_method_invocation_get_user_data (GDBusMethodInvocation *invocation)
|
|||||||
* Since: 2.26
|
* Since: 2.26
|
||||||
*/
|
*/
|
||||||
GDBusMethodInvocation *
|
GDBusMethodInvocation *
|
||||||
_g_dbus_method_invocation_new (const gchar *sender,
|
_g_dbus_method_invocation_new (const gchar *sender,
|
||||||
const gchar *object_path,
|
const gchar *object_path,
|
||||||
const gchar *interface_name,
|
const gchar *interface_name,
|
||||||
const gchar *method_name,
|
const gchar *method_name,
|
||||||
const GDBusMethodInfo *method_info,
|
const GDBusMethodInfo *method_info,
|
||||||
GDBusConnection *connection,
|
const GDBusPropertyInfo *property_info,
|
||||||
GDBusMessage *message,
|
GDBusConnection *connection,
|
||||||
GVariant *parameters,
|
GDBusMessage *message,
|
||||||
gpointer user_data)
|
GVariant *parameters,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GDBusMethodInvocation *invocation;
|
GDBusMethodInvocation *invocation;
|
||||||
|
|
||||||
@ -332,6 +353,8 @@ _g_dbus_method_invocation_new (const gchar *sender,
|
|||||||
invocation->method_name = g_strdup (method_name);
|
invocation->method_name = g_strdup (method_name);
|
||||||
if (method_info)
|
if (method_info)
|
||||||
invocation->method_info = g_dbus_method_info_ref ((GDBusMethodInfo *)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->connection = g_object_ref (connection);
|
||||||
invocation->message = g_object_ref (message);
|
invocation->message = g_object_ref (message);
|
||||||
invocation->parameters = g_variant_ref (parameters);
|
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);
|
const gchar *g_dbus_method_invocation_get_method_name (GDBusMethodInvocation *invocation);
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
const GDBusMethodInfo *g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation);
|
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
|
GLIB_AVAILABLE_IN_ALL
|
||||||
GDBusConnection *g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation);
|
GDBusConnection *g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation);
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
|
@ -119,15 +119,16 @@ gchar *_g_dbus_enum_to_string (GType enum_type, gint value);
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
GDBusMethodInvocation *_g_dbus_method_invocation_new (const gchar *sender,
|
GDBusMethodInvocation *_g_dbus_method_invocation_new (const gchar *sender,
|
||||||
const gchar *object_path,
|
const gchar *object_path,
|
||||||
const gchar *interface_name,
|
const gchar *interface_name,
|
||||||
const gchar *method_name,
|
const gchar *method_name,
|
||||||
const GDBusMethodInfo *method_info,
|
const GDBusMethodInfo *method_info,
|
||||||
GDBusConnection *connection,
|
const GDBusPropertyInfo *property_info,
|
||||||
GDBusMessage *message,
|
GDBusConnection *connection,
|
||||||
GVariant *parameters,
|
GDBusMessage *message,
|
||||||
gpointer user_data);
|
GVariant *parameters,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user