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/cdma-connman.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/cdma-connman.c') diff --git a/src/cdma-connman.c b/src/cdma-connman.c index 92866ba2..80645426 100644 --- a/src/cdma-connman.c +++ b/src/cdma-connman.c @@ -518,15 +518,18 @@ static DBusMessage *cdma_connman_set_property(DBusConnection *conn, } static const GDBusMethodTable cdma_connman_methods[] = { - { "GetProperties", "", "a{sv}", - cdma_connman_get_properties }, - { "SetProperty", "sv", "", cdma_connman_set_property, - G_DBUS_METHOD_FLAG_ASYNC }, + { _GDBUS_METHOD("GetProperties", "", "a{sv}", + NULL, GDBUS_ARGS({ "properties", "a{sv}" }), + cdma_connman_get_properties) }, + { _GDBUS_ASYNC_METHOD("SetProperty", "sv", "", + GDBUS_ARGS({ "property", "s" }, { "value", "v" }), + NULL, cdma_connman_set_property) }, { } }; static const GDBusSignalTable cdma_connman_signals[] = { - { "PropertyChanged", "sv" }, + { _GDBUS_SIGNAL("PropertyChanged", "a{sv}", + GDBUS_ARGS({ "name", "s" }, { "value", "v" })) }, { } }; -- cgit v1.2.3