diff options
-rw-r--r-- | gdbus/gdbus.h | 13 | ||||
-rw-r--r-- | gdbus/object.c | 30 |
2 files changed, 34 insertions, 9 deletions
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h index 99f34a84b..0ec90dcb7 100644 --- a/gdbus/gdbus.h +++ b/gdbus/gdbus.h @@ -56,12 +56,6 @@ dbus_bool_t dbus_connection_emit_signal(DBusConnection *conn, const char *path, const char *interface, const char *name, int first, ...); -dbus_bool_t dbus_connection_emit_signal_valist(DBusConnection *conn, - const char *path, - const char *interface, - const char *name, - int first, - va_list var_args); dbus_bool_t dbus_connection_emit_property_changed(DBusConnection *conn, const char *path, const char *interface, @@ -133,6 +127,13 @@ gboolean g_dbus_send_reply(DBusConnection *connection, gboolean g_dbus_send_reply_valist(DBusConnection *connection, DBusMessage *message, int type, va_list args); +gboolean g_dbus_emit_signal(DBusConnection *connection, + const char *path, const char *interface, + const char *name, int type, ...); +gboolean g_dbus_emit_signal_valist(DBusConnection *connection, + const char *path, const char *interface, + const char *name, int type, va_list args); + guint g_dbus_add_disconnect_watch(DBusConnection *connection, const char *name, GDBusWatchFunction function, diff --git a/gdbus/object.c b/gdbus/object.c index fbcc8131c..dcda54897 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -522,7 +522,7 @@ static gboolean check_signal(DBusConnection *conn, const char *path, return TRUE; } -dbus_bool_t dbus_connection_emit_signal_valist(DBusConnection *conn, +static dbus_bool_t emit_signal_valist(DBusConnection *conn, const char *path, const char *interface, const char *name, @@ -570,8 +570,7 @@ dbus_bool_t dbus_connection_emit_signal(DBusConnection *conn, const char *path, va_list var_args; va_start(var_args, first); - ret = dbus_connection_emit_signal_valist(conn, path, interface, name, - first, var_args); + ret = emit_signal_valist(conn, path, interface, name, first, var_args); va_end(var_args); return ret; @@ -800,3 +799,28 @@ gboolean g_dbus_send_reply(DBusConnection *connection, return result; } + +gboolean g_dbus_emit_signal(DBusConnection *connection, + const char *path, const char *interface, + const char *name, int type, ...) +{ + va_list args; + gboolean result; + + va_start(args, type); + + result = emit_signal_valist(connection, path, interface, + name, type, args); + + va_end(args); + + return result; +} + +gboolean g_dbus_emit_signal_valist(DBusConnection *connection, + const char *path, const char *interface, + const char *name, int type, va_list args) +{ + return emit_signal_valist(connection, path, interface, + name, type, args); +} |