summaryrefslogtreecommitdiffstats
path: root/src/stk.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 /src/stk.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 'src/stk.c')
-rw-r--r--src/stk.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/stk.c b/src/stk.c
index f111f0d0..46921b65 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -818,18 +818,24 @@ static DBusMessage *stk_select_item(DBusConnection *conn,
}
static const GDBusMethodTable stk_methods[] = {
- { "GetProperties", "", "a{sv}",stk_get_properties },
- { "SelectItem", "yo", "", stk_select_item,
- G_DBUS_METHOD_FLAG_ASYNC },
- { "RegisterAgent", "o", "", stk_register_agent },
- { "UnregisterAgent", "o", "", stk_unregister_agent },
-
+ { _GDBUS_METHOD("GetProperties", "", "a{sv}",
+ NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+ stk_get_properties) },
+ { _GDBUS_ASYNC_METHOD("SelectItem", "yo", "",
+ GDBUS_ARGS({ "item", "y" }, { "agent", "o" }), NULL,
+ stk_select_item) },
+ { _GDBUS_METHOD("RegisterAgent", "o", "",
+ GDBUS_ARGS({ "path", "o" }), NULL,
+ stk_register_agent) },
+ { _GDBUS_METHOD("UnregisterAgent", "o", "",
+ GDBUS_ARGS({ "path", "o" }), NULL,
+ stk_unregister_agent) },
{ }
};
static const GDBusSignalTable stk_signals[] = {
- { "PropertyChanged", "sv" },
-
+ { _GDBUS_SIGNAL("PropertyChanged", "sv",
+ GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
{ }
};