summaryrefslogtreecommitdiffstats
path: root/src/cbs.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/cbs.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/cbs.c')
-rw-r--r--src/cbs.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/cbs.c b/src/cbs.c
index f81cfb7b..23c9497f 100644
--- a/src/cbs.c
+++ b/src/cbs.c
@@ -541,16 +541,22 @@ static DBusMessage *cbs_set_property(DBusConnection *conn, DBusMessage *msg,
}
static const GDBusMethodTable cbs_methods[] = {
- { "GetProperties", "", "a{sv}", cbs_get_properties },
- { "SetProperty", "sv", "", cbs_set_property,
- G_DBUS_METHOD_FLAG_ASYNC },
+ { _GDBUS_METHOD("GetProperties", "", "a{sv}",
+ NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+ cbs_get_properties) },
+ { _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+ GDBUS_ARGS({ "property", "s" }, { "value", "v" }),
+ NULL, cbs_set_property) },
{ }
};
static const GDBusSignalTable cbs_signals[] = {
- { "PropertyChanged", "sv" },
- { "IncomingBroadcast", "sq" },
- { "EmergencyBroadcast", "sa{sv}" },
+ { _GDBUS_SIGNAL("PropertyChanged", "sv",
+ GDBUS_ARGS({ "property", "s" }, { "value", "v" })) },
+ { _GDBUS_SIGNAL("IncomingBroadcast", "sq",
+ GDBUS_ARGS({ "message", "s" }, { "channel", "q" })) },
+ { _GDBUS_SIGNAL("EmergencyBroadcast", "sa{sv}",
+ GDBUS_ARGS({ "message", "s" }, { "dict", "a{sv}" })) },
{ }
};