summaryrefslogtreecommitdiffstats
path: root/gdbus/object.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-05-27 17:48:01 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-05-27 17:48:01 +0000
commit671e8bc7340909da8b0fe750176423113e9ea8c1 (patch)
treea2dc99f1fbfd3555105b61993eaa041b7110b9a0 /gdbus/object.c
parent8162199a0b96cb8d41196c65824b55121256e9df (diff)
Add helpers for creating replies
Diffstat (limited to 'gdbus/object.c')
-rw-r--r--gdbus/object.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index 869482a4..56ff4433 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -879,3 +879,34 @@ DBusMessage *g_dbus_create_error(DBusMessage *message, const char *name,
return reply;
}
+
+DBusMessage *g_dbus_create_reply_valist(DBusMessage *message,
+ int type, va_list args)
+{
+ DBusMessage *reply;
+
+ reply = dbus_message_new_method_return(message);
+ if (reply == NULL)
+ return NULL;
+
+ if (dbus_message_append_args_valist(reply, type, args) == FALSE) {
+ dbus_message_unref(reply);
+ return NULL;
+ }
+
+ return reply;
+}
+
+DBusMessage *g_dbus_create_reply(DBusMessage *message, int type, ...)
+{
+ va_list args;
+ DBusMessage *reply;
+
+ va_start(args, type);
+
+ reply = g_dbus_create_reply_valist(message, type, args);
+
+ va_end(args);
+
+ return reply;
+}