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/cdma-voicecall.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/cdma-voicecall.c')
-rw-r--r-- | src/cdma-voicecall.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/cdma-voicecall.c b/src/cdma-voicecall.c index 3ff128c2..f7ee09ab 100644 --- a/src/cdma-voicecall.c +++ b/src/cdma-voicecall.c @@ -406,24 +406,30 @@ static DBusMessage *voicecall_manager_tone(DBusConnection *conn, } static const GDBusMethodTable manager_methods[] = { - { "GetProperties", "", "a{sv}", - voicecall_manager_get_properties }, - { "Dial", "s", "o", voicecall_manager_dial, - G_DBUS_METHOD_FLAG_ASYNC }, - { "Hangup", "", "", voicecall_manager_hangup, - G_DBUS_METHOD_FLAG_ASYNC }, - { "Answer", "", "", voicecall_manager_answer, - G_DBUS_METHOD_FLAG_ASYNC }, - { "SendFlash", "s", "", voicecall_manager_flash, - G_DBUS_METHOD_FLAG_ASYNC }, - { "SendTones", "s", "", voicecall_manager_tone, - G_DBUS_METHOD_FLAG_ASYNC }, + { _GDBUS_METHOD("GetProperties", "", "a{sv}", + NULL, GDBUS_ARGS({ "properties", "a{sv}" }), + voicecall_manager_get_properties) }, + { _GDBUS_ASYNC_METHOD("Dial", "s", "", + GDBUS_ARGS({ "number", "s" }), NULL, + voicecall_manager_dial) }, + { _GDBUS_ASYNC_METHOD("Hangup", "", "", NULL, NULL, + voicecall_manager_hangup) }, + { _GDBUS_ASYNC_METHOD("Answer", "", "", NULL, NULL, + voicecall_manager_answer) }, + { _GDBUS_ASYNC_METHOD("SendFlash", "s", "", + GDBUS_ARGS({ "flash_string", "s" }), NULL, + voicecall_manager_flash) }, + { _GDBUS_ASYNC_METHOD("SendTones", "s", "", + GDBUS_ARGS({ "tones", "s" }), NULL, + voicecall_manager_tone) }, { } }; static const GDBusSignalTable manager_signals[] = { - { "PropertyChanged", "sv" }, - { "DisconnectReason", "s" }, + { _GDBUS_SIGNAL("PropertyChanged", "sv", + GDBUS_ARGS({ "name", "s" }, { "value", "v" })) }, + { _GDBUS_SIGNAL("DisconnectReason", "s", + GDBUS_ARGS({ "reason", "s" })) }, { } }; |