summaryrefslogtreecommitdiffstats
path: root/src/call-meter.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/call-meter.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/call-meter.c')
-rw-r--r--src/call-meter.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/call-meter.c b/src/call-meter.c
index 67965a46..a67815df 100644
--- a/src/call-meter.c
+++ b/src/call-meter.c
@@ -647,18 +647,23 @@ static DBusMessage *cm_acm_reset(DBusConnection *conn, DBusMessage *msg,
}
static const GDBusMethodTable cm_methods[] = {
- { "GetProperties", "", "a{sv}", cm_get_properties,
- G_DBUS_METHOD_FLAG_ASYNC },
- { "SetProperty", "svs", "", cm_set_property,
- G_DBUS_METHOD_FLAG_ASYNC },
- { "Reset", "s", "", cm_acm_reset,
- G_DBUS_METHOD_FLAG_ASYNC },
+ { _GDBUS_ASYNC_METHOD("GetProperties", "", "a{sv}",
+ NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+ cm_get_properties) },
+ { _GDBUS_ASYNC_METHOD("SetProperty", "svs", "",
+ GDBUS_ARGS({ "property", "s" }, { "value", "v" },
+ { "password", "s" }),
+ NULL, cm_set_property) },
+ { _GDBUS_ASYNC_METHOD("Reset", "s", "",
+ GDBUS_ARGS({ "passoword", "s" }), NULL,
+ cm_acm_reset) },
{ }
};
static const GDBusSignalTable cm_signals[] = {
- { "PropertyChanged", "sv" },
- { "NearMaximumWarning", "" },
+ { _GDBUS_SIGNAL("PropertyChanged", "sv",
+ GDBUS_ARGS({ "property", "s" }, { "value", "v" })) },
+ { _GDBUS_SIGNAL("NearMaximumWarning", "", NULL) },
{ }
};