From b3489f2ee86c1d7ace388b43420a32f9a76b019c Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sun, 20 May 2012 02:07:29 -0300 Subject: Convert GDBus methods to use macro helpers With these macro helpers we can separate in/out arguments and use their own vector. --- src/call-forwarding.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/call-forwarding.c') diff --git a/src/call-forwarding.c b/src/call-forwarding.c index 7a73ff11..171feee9 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -882,17 +882,21 @@ static DBusMessage *cf_disable_all(DBusConnection *conn, DBusMessage *msg, } static const GDBusMethodTable cf_methods[] = { - { "GetProperties", "", "a{sv}", cf_get_properties, - G_DBUS_METHOD_FLAG_ASYNC }, - { "SetProperty", "sv", "", cf_set_property, - G_DBUS_METHOD_FLAG_ASYNC }, - { "DisableAll", "s", "", cf_disable_all, - G_DBUS_METHOD_FLAG_ASYNC }, + { _GDBUS_ASYNC_METHOD("GetProperties", "", "a{sv}", + NULL, GDBUS_ARGS({ "properties", "a{sv}" }), + cf_get_properties) }, + { _GDBUS_ASYNC_METHOD("SetProperty", "sv", "", + GDBUS_ARGS({ "property", "s" }, { "value", "v" }), + NULL, cf_set_property) }, + { _GDBUS_ASYNC_METHOD("DisableAll", "s", "", + GDBUS_ARGS({ "type", "s" }), NULL, + cf_disable_all) }, { } }; static const GDBusSignalTable cf_signals[] = { - { "PropertyChanged", "sv" }, + { _GDBUS_SIGNAL("PropertyChanged", "sv", + GDBUS_ARGS({ "name", "s" }, { "value", "v" })) }, { } }; -- cgit v1.2.3