summaryrefslogtreecommitdiffstats
path: root/plugins/smart-messaging.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-05-20 02:07:29 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-05-20 02:47:57 -0700
commitb3489f2ee86c1d7ace388b43420a32f9a76b019c (patch)
tree90688955099f3fe63186caa79d9d7bcbb2f82770 /plugins/smart-messaging.c
parent8e815c100b566e1de1f5e555e0291f6610a08cd7 (diff)
downloadofono-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 'plugins/smart-messaging.c')
-rw-r--r--plugins/smart-messaging.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/plugins/smart-messaging.c b/plugins/smart-messaging.c
index 6820b20e..a924f006 100644
--- a/plugins/smart-messaging.c
+++ b/plugins/smart-messaging.c
@@ -269,12 +269,21 @@ static DBusMessage *smart_messaging_send_vcal(DBusConnection *conn,
}
static const GDBusMethodTable smart_messaging_methods[] = {
- { "RegisterAgent", "o", "", smart_messaging_register_agent },
- { "UnregisterAgent", "o", "", smart_messaging_unregister_agent },
- { "SendBusinessCard", "say", "o", smart_messaging_send_vcard,
- G_DBUS_METHOD_FLAG_ASYNC },
- { "SendAppointment", "say", "o", smart_messaging_send_vcal,
- G_DBUS_METHOD_FLAG_ASYNC },
+ { _GDBUS_METHOD("RegisterAgent", "o", "",
+ GDBUS_ARGS({ "path", "o" }), NULL,
+ smart_messaging_register_agent) },
+ { _GDBUS_METHOD("UnregisterAgent", "o", "",
+ GDBUS_ARGS({ "path", "o" }), NULL,
+ smart_messaging_unregister_agent) },
+ { _GDBUS_ASYNC_METHOD("SendBusinessCard", "say", "o",
+ GDBUS_ARGS({ "to", "s" }, { "card", "ay" }),
+ GDBUS_ARGS({ "path", "o" }),
+ smart_messaging_send_vcard) },
+ { _GDBUS_ASYNC_METHOD("SendAppointment", "say", "o",
+ GDBUS_ARGS({ "to", "s" },
+ { "appointment", "ay" }),
+ GDBUS_ARGS({ "path", "o" }),
+ smart_messaging_send_vcal) },
{ }
};