aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-05-19 01:47:06 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-05-18 21:51:49 -0700
commit40e5612c775db7f1adafda39397394f550c3e642 (patch)
tree2b7d47924e32f312b6ee13b693e9a3e69d8cabb8
parent9a3d4cf6fd647c1b79686a69b52d297ac65838d9 (diff)
downloadpacrunner-40e5612c775db7f1adafda39397394f550c3e642.tar.gz
Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their own vector.
-rw-r--r--src/client.c6
-rw-r--r--src/manager.c9
2 files changed, 11 insertions, 4 deletions
diff --git a/src/client.c b/src/client.c
index b2735d9..807fd25 100644
--- a/src/client.c
+++ b/src/client.c
@@ -105,8 +105,10 @@ static DBusMessage *find_proxy_for_url(DBusConnection *conn,
}
static const GDBusMethodTable client_methods[] = {
- { "FindProxyForURL", "ss", "s", find_proxy_for_url,
- G_DBUS_METHOD_FLAG_ASYNC },
+ { _GDBUS_ASYNC_METHOD("FindProxyForURL", "ss", "s",
+ GDBUS_ARGS({ "url", "s" }, { "host", "s" }),
+ GDBUS_ARGS({ "proxy", "s" }),
+ find_proxy_for_url) },
{ },
};
diff --git a/src/manager.c b/src/manager.c
index 9e2b4f3..5c13427 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -282,8 +282,13 @@ static DBusMessage *destroy_proxy_config(DBusConnection *conn,
}
static const GDBusMethodTable manager_methods[] = {
- { "CreateProxyConfiguration", "a{sv}", "o", create_proxy_config },
- { "DestroyProxyConfiguration", "o", "", destroy_proxy_config },
+ { _GDBUS_METHOD("CreateProxyConfiguration", "a{sv}", "o",
+ GDBUS_ARGS({ "settings", "a{sv}" }),
+ GDBUS_ARGS({ "path", "o" }),
+ create_proxy_config) },
+ { _GDBUS_METHOD("DestroyProxyConfiguration", "o", "",
+ GDBUS_ARGS({ "configuration" , "o" }), NULL,
+ destroy_proxy_config) },
{ },
};