summaryrefslogtreecommitdiff
path: root/audio/gateway.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-05-18 00:23:29 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-05-17 20:32:20 -0700
commitaa3b9016bf444b60e1b7e1804dfc323a23a93c5a (patch)
tree67cc00db85ab80f56dcf0b66ffed204943723b9f /audio/gateway.c
parent2e576dd2f9ec1aa8e06b648707a746945b335fc7 (diff)
downloadbluez-aa3b9016bf444b60e1b7e1804dfc323a23a93c5a.tar.gz
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 'audio/gateway.c')
-rw-r--r--audio/gateway.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/audio/gateway.c b/audio/gateway.c
index 9194a7c0f..0892036d1 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -713,17 +713,22 @@ done:
}
static const GDBusMethodTable gateway_methods[] = {
- { "Connect", "", "", ag_connect, G_DBUS_METHOD_FLAG_ASYNC },
- { "Disconnect", "", "", ag_disconnect, G_DBUS_METHOD_FLAG_ASYNC },
- { "GetProperties", "", "a{sv}", ag_get_properties },
- { "RegisterAgent", "o", "", register_agent },
- { "UnregisterAgent", "o", "", unregister_agent },
- { NULL, NULL, NULL, NULL }
+ { _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, ag_connect) },
+ { _GDBUS_ASYNC_METHOD("Disconnect", "", "", NULL, NULL, ag_disconnect) },
+ { _GDBUS_METHOD("GetProperties", "", "a{sv}",
+ NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+ ag_get_properties) },
+ { _GDBUS_METHOD("RegisterAgent", "o", "",
+ GDBUS_ARGS({ "agent", "o" }), NULL, register_agent) },
+ { _GDBUS_METHOD("UnregisterAgent", "o", "",
+ GDBUS_ARGS({ "agent", "o" }), NULL, unregister_agent) },
+ { }
};
static const GDBusSignalTable gateway_signals[] = {
- { "PropertyChanged", "sv" },
- { NULL, NULL }
+ { _GDBUS_SIGNAL("PropertyChanged", "sv",
+ GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+ { }
};
static void path_unregister(void *data)