diff options
Diffstat (limited to 'gdbus/object.c')
-rw-r--r-- | gdbus/object.c | 31 |
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; +} |