summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorHenrique Dante de Almeida <hdante@profusion.mobi>2012-05-18 17:30:06 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-05-18 15:02:37 -0700
commit0bb3ef14d109f12fbb629e623b5c460915425e70 (patch)
tree643d29bb545ccbf4fb32aa436443c8977d54a74f /src/service.c
parent77a4d3fa07101334b45c1e8d84b327effc2ff910 (diff)
downloadconnman-0bb3ef14d109f12fbb629e623b5c460915425e70.tar.gz
connman-0bb3ef14d109f12fbb629e623b5c460915425e70.tar.bz2
connman-0bb3ef14d109f12fbb629e623b5c460915425e70.zip
Convert GDBus methods and signals to use macro helpers
With these macro helpers we can separate in/out arguments and use their own vector.
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/service.c b/src/service.c
index 595a3779..84a1124a 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3812,22 +3812,33 @@ static void service_schedule_removed(struct connman_service *service)
}
static const GDBusMethodTable service_methods[] = {
- { "GetProperties", "", "a{sv}", get_properties,
- G_DBUS_METHOD_FLAG_DEPRECATED },
- { "SetProperty", "sv", "", set_property },
- { "ClearProperty", "s", "", clear_property },
- { "Connect", "", "", connect_service,
- G_DBUS_METHOD_FLAG_ASYNC },
- { "Disconnect", "", "", disconnect_service },
- { "Remove", "", "", remove_service },
- { "MoveBefore", "o", "", move_before },
- { "MoveAfter", "o", "", move_after },
- { "ResetCounters", "", "", reset_counters },
+ { _GDBUS_DEPRECATED_METHOD("GetProperties", "", "a{sv}",
+ NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+ get_properties) },
+ { _GDBUS_METHOD("SetProperty", "sv", "",
+ GDBUS_ARGS({ "name", "s" }, { "value", "v" }),
+ NULL, set_property) },
+ { _GDBUS_METHOD("ClearProperty", "s", "",
+ GDBUS_ARGS({ "name", "s" }), NULL,
+ clear_property) },
+ { _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL,
+ connect_service) },
+ { _GDBUS_METHOD("Disconnect", "", "", NULL, NULL,
+ disconnect_service) },
+ { _GDBUS_METHOD("Remove", "", "", NULL, NULL, remove_service) },
+ { _GDBUS_METHOD("MoveBefore", "o", "",
+ GDBUS_ARGS({ "service", "o" }), NULL,
+ move_before) },
+ { _GDBUS_METHOD("MoveAfter", "o", "",
+ GDBUS_ARGS({ "service", "o" }), NULL,
+ move_after) },
+ { _GDBUS_METHOD("ResetCounters", "", "", NULL, NULL, reset_counters) },
{ },
};
static const GDBusSignalTable service_signals[] = {
- { "PropertyChanged", "sv" },
+ { _GDBUS_SIGNAL("PropertyChanged", "sv",
+ GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
{ },
};