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/sms.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/sms.c')
-rw-r--r-- | src/sms.c | 36 |
1 files changed, 24 insertions, 12 deletions
@@ -1104,22 +1104,34 @@ int __ofono_sms_txq_cancel(struct ofono_sms *sms, const struct ofono_uuid *uuid) } static const GDBusMethodTable sms_manager_methods[] = { - { "GetProperties", "", "a{sv}", sms_get_properties, - G_DBUS_METHOD_FLAG_ASYNC }, - { "SetProperty", "sv", "", sms_set_property, - G_DBUS_METHOD_FLAG_ASYNC }, - { "SendMessage", "ss", "o", sms_send_message, - G_DBUS_METHOD_FLAG_ASYNC }, - { "GetMessages", "", "a(oa{sv})", sms_get_messages }, + { _GDBUS_ASYNC_METHOD("GetProperties", "", "a{sv}", + NULL, GDBUS_ARGS({ "properties", "a{sv}" }), + sms_get_properties) }, + { _GDBUS_ASYNC_METHOD("SetProperty", "sv", "", + GDBUS_ARGS({ "property", "s" }, { "value", "v" }), + NULL, sms_set_property) }, + { _GDBUS_ASYNC_METHOD("SendMessage", "ss", "o", + GDBUS_ARGS({ "to", "s" }, { "text", "s" }), + GDBUS_ARGS({ "path", "o" }), + sms_send_message) }, + { _GDBUS_METHOD("GetMessages", "", "a(oa{sv})", + GDBUS_ARGS({ "messages", "a(oa{sv})" }), NULL, + sms_get_messages) }, { } }; static const GDBusSignalTable sms_manager_signals[] = { - { "PropertyChanged", "sv" }, - { "IncomingMessage", "sa{sv}" }, - { "ImmediateMessage", "sa{sv}" }, - { "MessageAdded", "oa{sv}" }, - { "MessageRemoved", "o" }, + { _GDBUS_SIGNAL("PropertyChanged", "sv", + GDBUS_ARGS({ "name", "s" }, { "value", "v" })) }, + { _GDBUS_SIGNAL("IncomingMessage", "sa{sv}", + GDBUS_ARGS({ "message", "s" }, { "info", "a{sv}" })) }, + { _GDBUS_SIGNAL("ImmediateMessage", "sa{sv}", + GDBUS_ARGS({ "message", "s" }, { "info", "a{sv}" })) }, + { _GDBUS_SIGNAL("MessageAdded", "oa{sv}", + GDBUS_ARGS({ "path", "o" }, + { "properties", "a{sv}" })) }, + { _GDBUS_SIGNAL("MessageRemoved", "o", + GDBUS_ARGS({ "path", "o" })) }, { } }; |