static gboolean
g_dbus_connection_send_message_unlocked (GDBusConnection *connection,
GDBusMessage *message,
+ GDBusSendMessageFlags flags,
volatile guint32 *out_serial,
GError **error)
{
* g_dbus_connection_send_message:
* @connection: A #GDBusConnection.
* @message: A #GDBusMessage
+ * @flags: Flags affecting how the message is sent (currently unused).
* @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
* @error: Return location for error or %NULL.
*
gboolean
g_dbus_connection_send_message (GDBusConnection *connection,
GDBusMessage *message,
+ GDBusSendMessageFlags flags,
volatile guint32 *out_serial,
GError **error)
{
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
CONNECTION_LOCK (connection);
- ret = g_dbus_connection_send_message_unlocked (connection, message, out_serial, error);
+ ret = g_dbus_connection_send_message_unlocked (connection, message, flags, out_serial, error);
CONNECTION_UNLOCK (connection);
return ret;
}
static void
g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connection,
GDBusMessage *message,
+ GDBusSendMessageFlags flags,
gint timeout_msec,
volatile guint32 *out_serial,
GCancellable *cancellable,
}
error = NULL;
- if (!g_dbus_connection_send_message_unlocked (connection, message, out_serial, &error))
+ if (!g_dbus_connection_send_message_unlocked (connection, message, flags, out_serial, &error))
{
g_simple_async_result_set_from_error (simple, error);
g_simple_async_result_complete_in_idle (simple);
* g_dbus_connection_send_message_with_reply:
* @connection: A #GDBusConnection.
* @message: A #GDBusMessage.
+ * @flags: Flags affecting how the message is sent (currently unused).
* @timeout_msec: The timeout in milliseconds or -1 to use the default timeout.
* @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
* @cancellable: A #GCancellable or %NULL.
void
g_dbus_connection_send_message_with_reply (GDBusConnection *connection,
GDBusMessage *message,
+ GDBusSendMessageFlags flags,
gint timeout_msec,
volatile guint32 *out_serial,
GCancellable *cancellable,
CONNECTION_LOCK (connection);
g_dbus_connection_send_message_with_reply_unlocked (connection,
message,
+ flags,
timeout_msec,
out_serial,
cancellable,
* g_dbus_connection_send_message_with_reply_sync:
* @connection: A #GDBusConnection.
* @message: A #GDBusMessage.
+ * @flags: Flags affecting how the message is sent (currently unused).
* @timeout_msec: The timeout in milliseconds or -1 to use the default timeout.
* @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
* @cancellable: A #GCancellable or %NULL.
GDBusMessage *
g_dbus_connection_send_message_with_reply_sync (GDBusConnection *connection,
GDBusMessage *message,
+ GDBusSendMessageFlags flags,
gint timeout_msec,
volatile guint32 *out_serial,
GCancellable *cancellable,
g_dbus_connection_send_message_with_reply (connection,
message,
+ flags,
timeout_msec,
out_serial,
cancellable,
error = NULL;
if (!g_dbus_connection_send_message_unlocked (connection,
message,
+ G_DBUS_SEND_MESSAGE_FLAGS_NONE,
NULL,
&error))
{
error = NULL;
if (!g_dbus_connection_send_message_unlocked (connection,
message,
+ G_DBUS_SEND_MESSAGE_FLAGS_NONE,
NULL,
&error))
{
"org.freedesktop.DBus.Error.UnknownMethod",
_("No such interface `org.freedesktop.DBus.Properties' on object at path %s"),
g_dbus_message_get_path (data->message));
- g_dbus_connection_send_message (data->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (data->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
goto out;
}
g_variant_ref_sink (value);
reply = g_dbus_message_new_method_reply (data->message);
g_dbus_message_set_body (reply, g_variant_new ("(v)", value));
- g_dbus_connection_send_message (data->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (data->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_variant_unref (value);
g_object_unref (reply);
}
reply = g_dbus_message_new_method_error_literal (data->message,
dbus_error_name,
error->message);
- g_dbus_connection_send_message (data->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (data->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_free (dbus_error_name);
g_error_free (error);
g_object_unref (reply);
out:
g_assert (reply != NULL);
- g_dbus_connection_send_message (data->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (data->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
return FALSE;
"org.freedesktop.DBus.Error.InvalidArgs",
_("No such property `%s'"),
property_name);
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
handled = TRUE;
goto out;
"org.freedesktop.DBus.Error.InvalidArgs",
_("Property `%s' is not readable"),
property_name);
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
handled = TRUE;
goto out;
"org.freedesktop.DBus.Error.InvalidArgs",
_("Property `%s' is not writable"),
property_name);
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
handled = TRUE;
goto out;
"org.freedesktop.DBus.Error.InvalidArgs",
_("No such interface `%s'"),
interface_name);
- g_dbus_connection_send_message_unlocked (eo->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (eo->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
handled = TRUE;
goto out;
"org.freedesktop.DBus.Error.UnknownMethod",
_("No such interface `org.freedesktop.DBus.Properties' on object at path %s"),
g_dbus_message_get_path (data->message));
- g_dbus_connection_send_message (data->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (data->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
goto out;
}
reply = g_dbus_message_new_method_reply (data->message);
g_dbus_message_set_body (reply, g_variant_builder_end (&builder));
- g_dbus_connection_send_message (data->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (data->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
out:
"org.freedesktop.DBus.Error.InvalidArgs",
_("No such interface"),
interface_name);
- g_dbus_connection_send_message_unlocked (eo->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (eo->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
handled = TRUE;
goto out;
reply = g_dbus_message_new_method_reply (message);
g_dbus_message_set_body (reply, g_variant_new ("(s)", s->str));
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
g_string_free (s, TRUE);
_("No such interface `%s' on object at path %s"),
g_dbus_method_invocation_get_interface_name (invocation),
g_dbus_method_invocation_get_object_path (invocation));
- g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), reply, NULL, NULL);
+ g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
goto out;
}
"org.freedesktop.DBus.Error.UnknownMethod",
_("No such method `%s'"),
g_dbus_message_get_member (message));
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
handled = TRUE;
goto out;
_("Type of message, `%s', does not match expected type `%s'"),
g_variant_get_type_string (parameters),
type_string);
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_variant_type_free (in_type);
g_variant_unref (parameters);
g_object_unref (reply);
if (parameters != NULL)
g_dbus_message_set_body (message, parameters);
- ret = g_dbus_connection_send_message (connection, message, NULL, error);
+ ret = g_dbus_connection_send_message (connection, message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, error);
g_object_unref (message);
return ret;
g_dbus_connection_send_message_with_reply (connection,
message,
+ G_DBUS_SEND_MESSAGE_FLAGS_NONE,
timeout_msec,
&state->serial,
cancellable,
local_error = NULL;
reply = g_dbus_connection_send_message_with_reply_sync (connection,
message,
+ flags,
timeout_msec,
NULL, /* volatile guint32 *out_serial */
cancellable,
reply = g_dbus_message_new_method_reply (message);
g_dbus_message_set_body (reply, g_variant_new ("(s)", s->str));
- g_dbus_connection_send_message (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
handled = TRUE;
"org.freedesktop.DBus.Error.InvalidArgs",
_("No such interface `%s'"),
interface_name);
- g_dbus_connection_send_message (es->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (es->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
handled = TRUE;
goto out;
g_dbus_message_get_member (data->message),
g_dbus_message_get_interface (data->message),
g_dbus_message_get_signature (data->message));
- g_dbus_connection_send_message (data->es->connection, reply, NULL, NULL);
+ g_dbus_connection_send_message (data->es->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
}
{
GDBusMessage *reply;
reply = g_dbus_message_new_method_reply (message);
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
}
reply = g_dbus_message_new_method_reply (message);
g_dbus_message_set_body (reply, g_variant_new ("(s)", connection->machine_id));
}
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
}
reply = g_dbus_message_new_method_reply (message);
g_dbus_message_set_body (reply, g_variant_new ("(s)", s->str));
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
g_string_free (s, TRUE);
}
_("No such interface `%s' on object at path %s"),
interface_name,
object_path);
- g_dbus_connection_send_message_unlocked (connection, reply, NULL, NULL);
+ g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (reply);
out: