diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2012-05-20 02:07:29 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-05-20 02:47:57 -0700 |
commit | b3489f2ee86c1d7ace388b43420a32f9a76b019c (patch) | |
tree | 90688955099f3fe63186caa79d9d7bcbb2f82770 /src/ussd.c | |
parent | 8e815c100b566e1de1f5e555e0291f6610a08cd7 (diff) | |
download | ofono-b3489f2ee86c1d7ace388b43420a32f9a76b019c.tar.bz2 |
Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
Diffstat (limited to 'src/ussd.c')
-rw-r--r-- | src/ussd.c | 29 |
1 files changed, 18 insertions, 11 deletions
@@ -729,21 +729,28 @@ static DBusMessage *ussd_get_properties(DBusConnection *conn, } static const GDBusMethodTable ussd_methods[] = { - { "Initiate", "s", "sv", ussd_initiate, - G_DBUS_METHOD_FLAG_ASYNC }, - { "Respond", "s", "s", ussd_respond, - G_DBUS_METHOD_FLAG_ASYNC }, - { "Cancel", "", "", ussd_cancel, - G_DBUS_METHOD_FLAG_ASYNC }, - { "GetProperties", "", "a{sv}", ussd_get_properties, - 0 }, + { _GDBUS_ASYNC_METHOD("Initiate", "s", "sv", + GDBUS_ARGS({ "command", "s" }), + GDBUS_ARGS({ "result_name", "s" }, { "value", "v" }), + ussd_initiate) }, + { _GDBUS_ASYNC_METHOD("Respond", "s", "s", + GDBUS_ARGS({ "reply", "s" }), + GDBUS_ARGS({ "result", "s" }), + ussd_respond) }, + { _GDBUS_ASYNC_METHOD("Cancel", "", "", NULL, NULL, ussd_cancel) }, + { _GDBUS_METHOD("GetProperties", "", "a{sv}", + NULL, GDBUS_ARGS({ "properties", "a{sv}" }), + ussd_get_properties) }, { } }; static const GDBusSignalTable ussd_signals[] = { - { "NotificationReceived", "s" }, - { "RequestReceived", "s" }, - { "PropertyChanged", "sv" }, + { _GDBUS_SIGNAL("NotificationReceived", "s", + GDBUS_ARGS({ "message", "s" })) }, + { _GDBUS_SIGNAL("RequestReceived", "s", + GDBUS_ARGS({ "message", "s" })) }, + { _GDBUS_SIGNAL("PropertyChanged", "sv", + GDBUS_ARGS({ "name", "s" }, { "value", "v" })) }, { } }; |