All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection
@ 2012-05-18  3:23 Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 01/13] Constify GDBus method tables Lucas De Marchi
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

The last time "Constify GDBus method tables" was mixing gdbus/ with the other
patches. Since the gdbus/ part was already applied, just rebase on top of is
already there.


Lucas De Marchi (13):
  Constify GDBus method tables
  Constify GDBus signal tables
  gdbus: add argument info to methods and signals
  gdbus: add and use helpers for table declarations
  Convert GDBus methods to use macro helpers
  gdbus: use GDBusArgInfo to generate introspection
  gdbus: loop over args to check message signature
  Do not set signature and reply in GDBus tables
  gdbus: remove signature and reply from tables
  gdbus: add Deprecated annotation in introspection
  gdbus: add Method.NoReply annotation in introspection
  gdbus: do not check signature twice
  adapter: do not check signature twice

 attrib/client.c           |   32 +++++++----
 audio/control.c           |   28 +++++----
 audio/device.c            |   20 ++++---
 audio/gateway.c           |   25 +++++----
 audio/headset.c           |   81 +++++++++++++++------------
 audio/media.c             |   17 ++++--
 audio/sink.c              |   34 +++++------
 audio/source.c            |   21 +++----
 audio/telephony-dummy.c   |   36 ++++++++----
 audio/telephony-maemo5.c  |    7 ++-
 audio/transport.c         |   27 ++++++---
 gdbus/gdbus.h             |   47 +++++++++++++++-
 gdbus/object.c            |  137 +++++++++++++++++++++------------------------
 health/hdp.c              |   65 +++++++++++++--------
 input/device.c            |   18 +++---
 network/connection.c      |   18 +++---
 network/server.c          |   10 +++-
 plugins/dbusoob.c         |   19 +++++--
 plugins/service.c         |   23 +++++---
 proximity/monitor.c       |   16 ++++--
 proximity/reporter.c      |   11 ++--
 sap/sap-dummy.c           |   17 ++++--
 sap/server.c              |   13 +++--
 serial/port.c             |   14 +++--
 serial/proxy.c            |   37 ++++++++----
 src/adapter.c             |   88 ++++++++++++++++++-----------
 src/device.c              |   28 +++++----
 src/manager.c             |   34 +++++++----
 thermometer/thermometer.c |   32 +++++++----
 29 files changed, 593 insertions(+), 362 deletions(-)

-- 
1.7.10.2


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 01/13] Constify GDBus method tables
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 02/13] Constify GDBus signal tables Lucas De Marchi
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

Constify method tables with the following command:

find . -name '*.[ch]' -exec \
	     sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
---
 attrib/client.c           |    4 ++--
 audio/control.c           |    2 +-
 audio/device.c            |    2 +-
 audio/gateway.c           |    2 +-
 audio/headset.c           |    2 +-
 audio/media.c             |    2 +-
 audio/sink.c              |    2 +-
 audio/source.c            |    2 +-
 audio/telephony-dummy.c   |    2 +-
 audio/telephony-maemo5.c  |    2 +-
 audio/transport.c         |    2 +-
 health/hdp.c              |    6 +++---
 input/device.c            |    2 +-
 network/connection.c      |    2 +-
 network/server.c          |    2 +-
 plugins/dbusoob.c         |    2 +-
 plugins/service.c         |    2 +-
 proximity/monitor.c       |    2 +-
 proximity/reporter.c      |    2 +-
 sap/sap-dummy.c           |    2 +-
 sap/server.c              |    2 +-
 serial/port.c             |    2 +-
 serial/proxy.c            |    4 ++--
 src/adapter.c             |    2 +-
 src/device.c              |    2 +-
 src/manager.c             |    2 +-
 thermometer/thermometer.c |    2 +-
 27 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/attrib/client.c b/attrib/client.c
index 35f1c90..2179f63 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -515,7 +515,7 @@ static DBusMessage *set_property(DBusConnection *conn,
 	return btd_error_invalid_args(msg);
 }
 
-static GDBusMethodTable char_methods[] = {
+static const GDBusMethodTable char_methods[] = {
 	{ "GetProperties",	"",	"a{sv}", get_properties },
 	{ "SetProperty",	"sv",	"",	set_property,
 						G_DBUS_METHOD_FLAG_ASYNC},
@@ -1015,7 +1015,7 @@ static DBusMessage *prim_get_properties(DBusConnection *conn, DBusMessage *msg,
 	return reply;
 }
 
-static GDBusMethodTable prim_methods[] = {
+static const GDBusMethodTable prim_methods[] = {
 	{ "DiscoverCharacteristics",	"",	"ao",	discover_char,
 					G_DBUS_METHOD_FLAG_ASYNC	},
 	{ "RegisterCharacteristicsWatcher",	"o", "",
diff --git a/audio/control.c b/audio/control.c
index a75e992..14820c8 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -197,7 +197,7 @@ static DBusMessage *control_get_properties(DBusConnection *conn,
 	return reply;
 }
 
-static GDBusMethodTable control_methods[] = {
+static const GDBusMethodTable control_methods[] = {
 	{ "IsConnected",	"",	"b",	control_is_connected,
 						G_DBUS_METHOD_FLAG_DEPRECATED },
 	{ "GetProperties",	"",	"a{sv}",control_get_properties },
diff --git a/audio/device.c b/audio/device.c
index ee1ade1..7f454bb 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -618,7 +618,7 @@ static DBusMessage *dev_get_properties(DBusConnection *conn, DBusMessage *msg,
 	return reply;
 }
 
-static GDBusMethodTable dev_methods[] = {
+static const GDBusMethodTable dev_methods[] = {
 	{ "Connect",		"",	"",	dev_connect,
 						G_DBUS_METHOD_FLAG_ASYNC },
 	{ "Disconnect",		"",	"",	dev_disconnect },
diff --git a/audio/gateway.c b/audio/gateway.c
index 7b9347d..5eee163 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -712,7 +712,7 @@ done:
 	return dbus_message_new_method_return(msg);
 }
 
-static GDBusMethodTable gateway_methods[] = {
+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 },
diff --git a/audio/headset.c b/audio/headset.c
index fb10c36..ca8f711 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -2057,7 +2057,7 @@ static DBusMessage *hs_set_property(DBusConnection *conn,
 	return btd_error_invalid_args(msg);
 }
 
-static GDBusMethodTable headset_methods[] = {
+static const GDBusMethodTable headset_methods[] = {
 	{ "Connect",		"",	"",	hs_connect,
 						G_DBUS_METHOD_FLAG_ASYNC },
 	{ "Disconnect",		"",	"",	hs_disconnect },
diff --git a/audio/media.c b/audio/media.c
index 61ec153..7a83fbd 100644
--- a/audio/media.c
+++ b/audio/media.c
@@ -1790,7 +1790,7 @@ static DBusMessage *unregister_player(DBusConnection *conn, DBusMessage *msg,
 	return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
 }
 
-static GDBusMethodTable media_methods[] = {
+static const GDBusMethodTable media_methods[] = {
 	{ "RegisterEndpoint",	"oa{sv}",	"",	register_endpoint },
 	{ "UnregisterEndpoint",	"o",		"",	unregister_endpoint },
 	{ "RegisterPlayer",	"oa{sv}a{sv}","",	register_player },
diff --git a/audio/sink.c b/audio/sink.c
index 52f70a9..ea7f26e 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -555,7 +555,7 @@ static DBusMessage *sink_get_properties(DBusConnection *conn,
 	return reply;
 }
 
-static GDBusMethodTable sink_methods[] = {
+static const GDBusMethodTable sink_methods[] = {
 	{ "Connect",		"",	"",	sink_connect,
 						G_DBUS_METHOD_FLAG_ASYNC },
 	{ "Disconnect",		"",	"",	sink_disconnect,
diff --git a/audio/source.c b/audio/source.c
index 4c6e2d0..98f3e3f 100644
--- a/audio/source.c
+++ b/audio/source.c
@@ -476,7 +476,7 @@ static DBusMessage *source_get_properties(DBusConnection *conn,
 	return reply;
 }
 
-static GDBusMethodTable source_methods[] = {
+static const GDBusMethodTable source_methods[] = {
 	{ "Connect",		"",	"",	source_connect,
 						G_DBUS_METHOD_FLAG_ASYNC },
 	{ "Disconnect",		"",	"",	source_disconnect,
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c
index 1f89079..83c5a13 100644
--- a/audio/telephony-dummy.c
+++ b/audio/telephony-dummy.c
@@ -378,7 +378,7 @@ static DBusMessage *set_subscriber_number(DBusConnection *conn,
 	return dbus_message_new_method_return(msg);
 }
 
-static GDBusMethodTable dummy_methods[] = {
+static const GDBusMethodTable dummy_methods[] = {
 	{ "OutgoingCall",	"s",	"",	outgoing_call		},
 	{ "IncomingCall",	"s",	"",	incoming_call		},
 	{ "CancelCall",		"",	"",	cancel_call		},
diff --git a/audio/telephony-maemo5.c b/audio/telephony-maemo5.c
index 49230f1..6ab43b4 100644
--- a/audio/telephony-maemo5.c
+++ b/audio/telephony-maemo5.c
@@ -1951,7 +1951,7 @@ static DBusMessage *set_callerid(DBusConnection *conn, DBusMessage *msg,
 		return btd_error_invalid_args(msg);
 }
 
-static GDBusMethodTable telephony_maemo_methods[] = {
+static const GDBusMethodTable telephony_maemo_methods[] = {
 	{"SetCallerId",		"s",	"",	set_callerid,
 						G_DBUS_METHOD_FLAG_ASYNC},
 	{ }
diff --git a/audio/transport.c b/audio/transport.c
index 7bf7309..e9e40c6 100644
--- a/audio/transport.c
+++ b/audio/transport.c
@@ -914,7 +914,7 @@ static DBusMessage *get_properties(DBusConnection *conn, DBusMessage *msg,
 	return reply;
 }
 
-static GDBusMethodTable transport_methods[] = {
+static const GDBusMethodTable transport_methods[] = {
 	{ "GetProperties",	"",	"a{sv}",	get_properties },
 	{ "Acquire",		"s",	"hqq",		acquire,
 						G_DBUS_METHOD_FLAG_ASYNC},
diff --git a/health/hdp.c b/health/hdp.c
index 455240c..2d3f9bb 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -424,7 +424,7 @@ static void manager_path_unregister(gpointer data)
 	g_slist_foreach(adapters, (GFunc) update_adapter, NULL);
 }
 
-static GDBusMethodTable health_manager_methods[] = {
+static const GDBusMethodTable health_manager_methods[] = {
 	{"CreateApplication", "a{sv}", "o", manager_create_application},
 	{"DestroyApplication", "o", "", manager_destroy_application},
 	{ NULL }
@@ -731,7 +731,7 @@ end:
 	hdp_channel_unref(hdp_chan);
 }
 
-static GDBusMethodTable health_channels_methods[] = {
+static const GDBusMethodTable health_channels_methods[] = {
 	{"GetProperties","",	"a{sv}",	channel_get_properties },
 	{"Acquire",	"",	"h",		channel_acquire,
 						G_DBUS_METHOD_FLAG_ASYNC },
@@ -2093,7 +2093,7 @@ static void health_device_destroy(void *data)
 	health_device_unref(device);
 }
 
-static GDBusMethodTable health_device_methods[] = {
+static const GDBusMethodTable health_device_methods[] = {
 	{"Echo",		"",	"b",	device_echo,
 						G_DBUS_METHOD_FLAG_ASYNC },
 	{"CreateChannel",	"os",	"o",	device_create_channel,
diff --git a/input/device.c b/input/device.c
index 092560d..2d8d724 100644
--- a/input/device.c
+++ b/input/device.c
@@ -1060,7 +1060,7 @@ static DBusMessage *input_device_get_properties(DBusConnection *conn,
 	return reply;
 }
 
-static GDBusMethodTable device_methods[] = {
+static const GDBusMethodTable device_methods[] = {
 	{ "Connect",		"",	"",	input_device_connect,
 						G_DBUS_METHOD_FLAG_ASYNC },
 	{ "Disconnect",		"",	"",	input_device_disconnect	},
diff --git a/network/connection.c b/network/connection.c
index 36b51a7..d1d417e 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -552,7 +552,7 @@ static void path_unregister(void *data)
 	peer_free(peer);
 }
 
-static GDBusMethodTable connection_methods[] = {
+static const GDBusMethodTable connection_methods[] = {
 	{ "Connect",		"s",	"s",	connection_connect,
 						G_DBUS_METHOD_FLAG_ASYNC },
 	{ "Disconnect",		"",	"",	connection_disconnect	},
diff --git a/network/server.c b/network/server.c
index 58c7297..688ec7d 100644
--- a/network/server.c
+++ b/network/server.c
@@ -685,7 +685,7 @@ static void path_unregister(void *data)
 	adapter_free(na);
 }
 
-static GDBusMethodTable server_methods[] = {
+static const GDBusMethodTable server_methods[] = {
 	{ "Register",	"ss",	"",	register_server		},
 	{ "Unregister",	"s",	"",	unregister_server	},
 	{ }
diff --git a/plugins/dbusoob.c b/plugins/dbusoob.c
index 2c03780..bcd0556 100644
--- a/plugins/dbusoob.c
+++ b/plugins/dbusoob.c
@@ -175,7 +175,7 @@ static DBusMessage *remove_remote_data(DBusConnection *conn, DBusMessage *msg,
 	return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
 }
 
-static GDBusMethodTable oob_methods[] = {
+static const GDBusMethodTable oob_methods[] = {
 	{"AddRemoteData",	"sayay",	"",	add_remote_data},
 	{"RemoveRemoteData",	"s",		"",	remove_remote_data},
 	{"ReadLocalData",	"",		"ayay",	read_local_data,
diff --git a/plugins/service.c b/plugins/service.c
index 14a5cb6..978e371 100644
--- a/plugins/service.c
+++ b/plugins/service.c
@@ -696,7 +696,7 @@ done:
 	return dbus_message_new_method_return(msg);
 }
 
-static GDBusMethodTable service_methods[] = {
+static const GDBusMethodTable service_methods[] = {
 	{ "AddRecord",		"s",	"u",	add_service_record	},
 	{ "UpdateRecord",	"us",	"",	update_service_record	},
 	{ "RemoveRecord",	"u",	"",	remove_service_record	},
diff --git a/proximity/monitor.c b/proximity/monitor.c
index 687b41c..cc90195 100644
--- a/proximity/monitor.c
+++ b/proximity/monitor.c
@@ -546,7 +546,7 @@ static DBusMessage *set_property(DBusConnection *conn,
 	return btd_error_invalid_args(msg);
 }
 
-static GDBusMethodTable monitor_methods[] = {
+static const GDBusMethodTable monitor_methods[] = {
 	{ "GetProperties",	"",	"a{sv}",	get_properties	},
 	{ "SetProperty",	"sv",	"",		set_property,
 						G_DBUS_METHOD_FLAG_ASYNC},
diff --git a/proximity/reporter.c b/proximity/reporter.c
index cb30da5..983bd33 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
@@ -180,7 +180,7 @@ err:
 	return btd_error_failed(msg, "not enough memory");
 }
 
-static GDBusMethodTable reporter_methods[] = {
+static const GDBusMethodTable reporter_methods[] = {
 	{ "GetProperties",	"",	"a{sv}",	get_properties	},
 	{ }
 };
diff --git a/sap/sap-dummy.c b/sap/sap-dummy.c
index 389548b..a2f2968 100644
--- a/sap/sap-dummy.c
+++ b/sap/sap-dummy.c
@@ -315,7 +315,7 @@ static DBusMessage *card_status(DBusConnection *conn, DBusMessage *msg,
 	return dbus_message_new_method_return(msg);
 }
 
-static GDBusMethodTable dummy_methods[] = {
+static const GDBusMethodTable dummy_methods[] = {
 	{ "OngoingCall", "b", "", ongoing_call},
 	{ "MaxMessageSize", "u", "", max_msg_size},
 	{ "DisconnectImmediate", "", "", disconnect_immediate},
diff --git a/sap/server.c b/sap/server.c
index 945d599..39eddc8 100644
--- a/sap/server.c
+++ b/sap/server.c
@@ -1303,7 +1303,7 @@ static DBusMessage *get_properties(DBusConnection *c,
 	return reply;
 }
 
-static GDBusMethodTable server_methods[] = {
+static const GDBusMethodTable server_methods[] = {
 	{"GetProperties", "", "a{sv}", get_properties},
 	{"Disconnect", "", "", disconnect},
 	{ }
diff --git a/serial/port.c b/serial/port.c
index ea45c7a..1c48bf7 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -567,7 +567,7 @@ static DBusMessage *port_disconnect(DBusConnection *conn,
 	return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
 }
 
-static GDBusMethodTable port_methods[] = {
+static const GDBusMethodTable port_methods[] = {
 	{ "Connect",    "s", "s", port_connect, G_DBUS_METHOD_FLAG_ASYNC },
 	{ "ConnectFD",    "s", "h", port_connect, G_DBUS_METHOD_FLAG_ASYNC },
 	{ "Disconnect", "s", "",  port_disconnect },
diff --git a/serial/proxy.c b/serial/proxy.c
index ea5c29f..6c4c33f 100644
--- a/serial/proxy.c
+++ b/serial/proxy.c
@@ -728,7 +728,7 @@ static DBusMessage *proxy_set_serial_params(DBusConnection *conn,
 	return dbus_message_new_method_return(msg);
 }
 
-static GDBusMethodTable proxy_methods[] = {
+static const GDBusMethodTable proxy_methods[] = {
 	{ "Enable",			"",	"",	proxy_enable },
 	{ "Disable",			"",	"",	proxy_disable },
 	{ "GetInfo",			"",	"a{sv}",proxy_get_info },
@@ -1111,7 +1111,7 @@ static void manager_path_unregister(void *data)
 	g_free(adapter);
 }
 
-static GDBusMethodTable manager_methods[] = {
+static const GDBusMethodTable manager_methods[] = {
 	{ "CreateProxy",		"ss",	"s",	create_proxy },
 	{ "ListProxies",		"",	"as",	list_proxies },
 	{ "RemoveProxy",		"s",	"",	remove_proxy },
diff --git a/src/adapter.c b/src/adapter.c
index 8e95ab2..9c9b08d 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1655,7 +1655,7 @@ static DBusMessage *unregister_agent(DBusConnection *conn, DBusMessage *msg,
 	return dbus_message_new_method_return(msg);
 }
 
-static GDBusMethodTable adapter_methods[] = {
+static const GDBusMethodTable adapter_methods[] = {
 	{ "GetProperties",	"",	"a{sv}",get_properties		},
 	{ "SetProperty",	"sv",	"",	set_property,
 						G_DBUS_METHOD_FLAG_ASYNC},
diff --git a/src/device.c b/src/device.c
index 2a8812e..b497431 100644
--- a/src/device.c
+++ b/src/device.c
@@ -877,7 +877,7 @@ static DBusMessage *disconnect(DBusConnection *conn, DBusMessage *msg,
 	return NULL;
 }
 
-static GDBusMethodTable device_methods[] = {
+static const GDBusMethodTable device_methods[] = {
 	{ "GetProperties",	"",	"a{sv}",	get_properties	},
 	{ "SetProperty",	"sv",	"",		set_property	},
 	{ "DiscoverServices",	"s",	"a{us}",	discover_services,
diff --git a/src/manager.c b/src/manager.c
index 6244516..8b9243e 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -196,7 +196,7 @@ static DBusMessage *get_properties(DBusConnection *conn,
 	return reply;
 }
 
-static GDBusMethodTable manager_methods[] = {
+static const GDBusMethodTable manager_methods[] = {
 	{ "GetProperties",	"",	"a{sv}",get_properties	},
 	{ "DefaultAdapter",	"",	"o",	default_adapter	},
 	{ "FindAdapter",	"s",	"o",	find_adapter	},
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index 92c0225..08117a6 100644
--- a/thermometer/thermometer.c
+++ b/thermometer/thermometer.c
@@ -959,7 +959,7 @@ static DBusMessage *disable_intermediate(DBusConnection *conn, DBusMessage *msg,
 	return dbus_message_new_method_return(msg);
 }
 
-static GDBusMethodTable thermometer_methods[] = {
+static const GDBusMethodTable thermometer_methods[] = {
 	{ "GetProperties",	"",	"a{sv}",	get_properties },
 	{ "SetProperty",	"sv",	"",		set_property,
 						G_DBUS_METHOD_FLAG_ASYNC },
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 02/13] Constify GDBus signal tables
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 01/13] Constify GDBus method tables Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 03/13] gdbus: add argument info to methods and signals Lucas De Marchi
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

Constify signal tables with the following command:

    find . -name '*.[ch]' -exec \
             sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
---
 audio/control.c           |    2 +-
 audio/device.c            |    2 +-
 audio/gateway.c           |    2 +-
 audio/headset.c           |    2 +-
 audio/sink.c              |    2 +-
 audio/source.c            |    2 +-
 audio/telephony-dummy.c   |    2 +-
 audio/transport.c         |    2 +-
 health/hdp.c              |    2 +-
 input/device.c            |    2 +-
 network/connection.c      |    2 +-
 proximity/monitor.c       |    2 +-
 proximity/reporter.c      |    2 +-
 sap/server.c              |    2 +-
 serial/proxy.c            |    2 +-
 src/adapter.c             |    2 +-
 src/device.c              |    2 +-
 src/manager.c             |    2 +-
 thermometer/thermometer.c |    2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/audio/control.c b/audio/control.c
index 14820c8..da23535 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -206,7 +206,7 @@ static const GDBusMethodTable control_methods[] = {
 	{ NULL, NULL, NULL, NULL }
 };
 
-static GDBusSignalTable control_signals[] = {
+static const GDBusSignalTable control_signals[] = {
 	{ "Connected",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED},
 	{ "Disconnected",		"",	G_DBUS_SIGNAL_FLAG_DEPRECATED},
 	{ "PropertyChanged",		"sv"	},
diff --git a/audio/device.c b/audio/device.c
index 7f454bb..ac00f1d 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -626,7 +626,7 @@ static const GDBusMethodTable dev_methods[] = {
 	{ NULL, NULL, NULL, NULL }
 };
 
-static GDBusSignalTable dev_signals[] = {
+static const GDBusSignalTable dev_signals[] = {
 	{ "PropertyChanged",		"sv"	},
 	{ NULL, NULL }
 };
diff --git a/audio/gateway.c b/audio/gateway.c
index 5eee163..9194a7c 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -721,7 +721,7 @@ static const GDBusMethodTable gateway_methods[] = {
 	{ NULL, NULL, NULL, NULL }
 };
 
-static GDBusSignalTable gateway_signals[] = {
+static const GDBusSignalTable gateway_signals[] = {
 	{ "PropertyChanged", "sv" },
 	{ NULL, NULL }
 };
diff --git a/audio/headset.c b/audio/headset.c
index ca8f711..ebe9a7c 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -2083,7 +2083,7 @@ static const GDBusMethodTable headset_methods[] = {
 	{ NULL, NULL, NULL, NULL }
 };
 
-static GDBusSignalTable headset_signals[] = {
+static const GDBusSignalTable headset_signals[] = {
 	{ "Connected",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
 	{ "Disconnected",		"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
 	{ "AnswerRequested",		""	},
diff --git a/audio/sink.c b/audio/sink.c
index ea7f26e..fe4dd4b 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -566,7 +566,7 @@ static const GDBusMethodTable sink_methods[] = {
 	{ NULL, NULL, NULL, NULL }
 };
 
-static GDBusSignalTable sink_signals[] = {
+static const GDBusSignalTable sink_signals[] = {
 	{ "Connected",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
 	{ "Disconnected",		"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
 	{ "Playing",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
diff --git a/audio/source.c b/audio/source.c
index 98f3e3f..04bf131 100644
--- a/audio/source.c
+++ b/audio/source.c
@@ -485,7 +485,7 @@ static const GDBusMethodTable source_methods[] = {
 	{ NULL, NULL, NULL, NULL }
 };
 
-static GDBusSignalTable source_signals[] = {
+static const GDBusSignalTable source_signals[] = {
 	{ "PropertyChanged",		"sv"	},
 	{ NULL, NULL }
 };
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c
index 83c5a13..1885b4a 100644
--- a/audio/telephony-dummy.c
+++ b/audio/telephony-dummy.c
@@ -390,7 +390,7 @@ static const GDBusMethodTable dummy_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable dummy_signals[] = {
+static const GDBusSignalTable dummy_signals[] = {
 	{ "VoiceDial",	"" },
 	{ }
 };
diff --git a/audio/transport.c b/audio/transport.c
index e9e40c6..7223f38 100644
--- a/audio/transport.c
+++ b/audio/transport.c
@@ -924,7 +924,7 @@ static const GDBusMethodTable transport_methods[] = {
 	{ },
 };
 
-static GDBusSignalTable transport_signals[] = {
+static const GDBusSignalTable transport_signals[] = {
 	{ "PropertyChanged",	"sv"	},
 	{ }
 };
diff --git a/health/hdp.c b/health/hdp.c
index 2d3f9bb..3b1ea49 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -2104,7 +2104,7 @@ static const GDBusMethodTable health_device_methods[] = {
 	{ NULL }
 };
 
-static GDBusSignalTable health_device_signals[] = {
+static const GDBusSignalTable health_device_signals[] = {
 	{"ChannelConnected",		"o"		},
 	{"ChannelDeleted",		"o"		},
 	{"PropertyChanged",		"sv"		},
diff --git a/input/device.c b/input/device.c
index 2d8d724..af90e6d 100644
--- a/input/device.c
+++ b/input/device.c
@@ -1068,7 +1068,7 @@ static const GDBusMethodTable device_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable device_signals[] = {
+static const GDBusSignalTable device_signals[] = {
 	{ "PropertyChanged",	"sv"	},
 	{ }
 };
diff --git a/network/connection.c b/network/connection.c
index d1d417e..77d91d6 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -560,7 +560,7 @@ static const GDBusMethodTable connection_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable connection_signals[] = {
+static const GDBusSignalTable connection_signals[] = {
 	{ "PropertyChanged",	"sv"	},
 	{ }
 };
diff --git a/proximity/monitor.c b/proximity/monitor.c
index cc90195..b4a52d2 100644
--- a/proximity/monitor.c
+++ b/proximity/monitor.c
@@ -553,7 +553,7 @@ static const GDBusMethodTable monitor_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable monitor_signals[] = {
+static const GDBusSignalTable monitor_signals[] = {
 	{ "PropertyChanged",	"sv"	},
 	{ }
 };
diff --git a/proximity/reporter.c b/proximity/reporter.c
index 983bd33..0a89537 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
@@ -185,7 +185,7 @@ static const GDBusMethodTable reporter_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable reporter_signals[] = {
+static const GDBusSignalTable reporter_signals[] = {
 	{ "PropertyChanged",	"sv"	},
 	{ }
 };
diff --git a/sap/server.c b/sap/server.c
index 39eddc8..b212ea0 100644
--- a/sap/server.c
+++ b/sap/server.c
@@ -1309,7 +1309,7 @@ static const GDBusMethodTable server_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable server_signals[] = {
+static const GDBusSignalTable server_signals[] = {
 	{ "PropertyChanged", "sv"},
 	{ }
 };
diff --git a/serial/proxy.c b/serial/proxy.c
index 6c4c33f..5a91186 100644
--- a/serial/proxy.c
+++ b/serial/proxy.c
@@ -1118,7 +1118,7 @@ static const GDBusMethodTable manager_methods[] = {
 	{ },
 };
 
-static GDBusSignalTable manager_signals[] = {
+static const GDBusSignalTable manager_signals[] = {
 	{ "ProxyCreated",		"s"	},
 	{ "ProxyRemoved",		"s"	},
 	{ }
diff --git a/src/adapter.c b/src/adapter.c
index 9c9b08d..9dfed54 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1681,7 +1681,7 @@ static const GDBusMethodTable adapter_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable adapter_signals[] = {
+static const GDBusSignalTable adapter_signals[] = {
 	{ "PropertyChanged",		"sv"		},
 	{ "DeviceCreated",		"o"		},
 	{ "DeviceRemoved",		"o"		},
diff --git a/src/device.c b/src/device.c
index b497431..16f9d7a 100644
--- a/src/device.c
+++ b/src/device.c
@@ -888,7 +888,7 @@ static const GDBusMethodTable device_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable device_signals[] = {
+static const GDBusSignalTable device_signals[] = {
 	{ "PropertyChanged",		"sv"	},
 	{ "DisconnectRequested",	""	},
 	{ }
diff --git a/src/manager.c b/src/manager.c
index 8b9243e..e6c1675 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -205,7 +205,7 @@ static const GDBusMethodTable manager_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable manager_signals[] = {
+static const GDBusSignalTable manager_signals[] = {
 	{ "PropertyChanged",		"sv"	},
 	{ "AdapterAdded",		"o"	},
 	{ "AdapterRemoved",		"o"	},
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index 08117a6..1f7b6a6 100644
--- a/thermometer/thermometer.c
+++ b/thermometer/thermometer.c
@@ -970,7 +970,7 @@ static const GDBusMethodTable thermometer_methods[] = {
 	{ }
 };
 
-static GDBusSignalTable thermometer_signals[] = {
+static const GDBusSignalTable thermometer_signals[] = {
 	{ "PropertyChanged",	"sv"	},
 	{ }
 };
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 03/13] gdbus: add argument info to methods and signals
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 01/13] Constify GDBus method tables Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 02/13] Constify GDBus signal tables Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 04/13] gdbus: add and use helpers for table declarations Lucas De Marchi
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

---
 gdbus/gdbus.h |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index a0583e6..e5e7938 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -85,16 +85,24 @@ typedef enum {
 typedef struct {
 	const char *name;
 	const char *signature;
+} GDBusArgInfo;
+
+typedef struct {
+	const char *name;
+	const char *signature;
 	const char *reply;
 	GDBusMethodFunction function;
 	GDBusMethodFlags flags;
 	unsigned int privilege;
+	const GDBusArgInfo *in_args;
+	const GDBusArgInfo *out_args;
 } GDBusMethodTable;
 
 typedef struct {
 	const char *name;
 	const char *signature;
 	GDBusSignalFlags flags;
+	const GDBusArgInfo *args;
 } GDBusSignalTable;
 
 typedef struct {
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 04/13] gdbus: add and use helpers for table declarations
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (2 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 03/13] gdbus: add argument info to methods and signals Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 05/13] Convert GDBus methods to use macro helpers Lucas De Marchi
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

---
 gdbus/gdbus.h  |   86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 gdbus/object.c |    3 +-
 2 files changed, 88 insertions(+), 1 deletion(-)

diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index e5e7938..8354633 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -118,6 +118,92 @@ typedef struct {
 	GDBusSecurityFunction function;
 } GDBusSecurityTable;
 
+#define GDBUS_ARGS(args...) (const GDBusArgInfo[]) { args, { } }
+
+#define _GDBUS_METHOD(_name, _signature, _reply, _in_args, _out_args, _function) \
+	.name = _name, \
+	.signature = _signature, \
+	.reply = _reply, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function
+
+#define _GDBUS_ASYNC_METHOD(_name, _signature, _reply, _in_args, _out_args, _function) \
+	.name = _name, \
+	.signature = _signature, \
+	.reply = _reply, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function, \
+	.flags = G_DBUS_METHOD_FLAG_ASYNC
+
+#define _GDBUS_DEPRECATED_METHOD(_name, _signature, _reply, _in_args, _out_args, _function) \
+	.name = _name, \
+	.signature = _signature, \
+	.reply = _reply, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function, \
+	.flags = G_DBUS_METHOD_FLAG_DEPRECATED
+
+#define _GDBUS_DEPRECATED_ASYNC_METHOD(_name, _signature, _reply, _in_args, _out_args, _function) \
+	.name = _name, \
+	.signature = _signature, \
+	.reply = _reply, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function, \
+	.flags = G_DBUS_METHOD_FLAG_ASYNC | G_DBUS_METHOD_FLAG_DEPRECATED
+
+#define _GDBUS_SIGNAL(_name, _signature, _args) \
+	.name = _name, \
+	.signature = _signature, \
+	.args = _args
+
+#define _GDBUS_DEPRECATED_SIGNAL(_name, _signature, _args) \
+	.name = _name, \
+	.signature = _signature, \
+	.args = _args, \
+	.flags = G_DBUS_SIGNAL_FLAG_DEPRECATED
+
+/* Helpers with no signature and reply */
+
+#define GDBUS_METHOD(_name, _in_args, _out_args, _function) \
+	.name = _name, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function
+
+#define GDBUS_ASYNC_METHOD(_name, _in_args, _out_args, _function) \
+	.name = _name, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function, \
+	.flags = G_DBUS_METHOD_FLAG_ASYNC
+
+#define GDBUS_DEPRECATED_METHOD(_name, _in_args, _out_args, _function) \
+	.name = _name, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function, \
+	.flags = G_DBUS_METHOD_FLAG_DEPRECATED
+
+#define GDBUS_DEPRECATED_ASYNC_METHOD(_name, _in_args, _out_args, _function) \
+	.name = _name, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function, \
+	.flags = G_DBUS_METHOD_FLAG_ASYNC | G_DBUS_METHOD_FLAG_DEPRECATED
+
+#define GDBUS_SIGNAL(_name, _args) \
+	.name = _name, \
+	.args = _args
+
+#define GDBUS_DEPRECATED_SIGNAL(_name, _args) \
+	.name = _name, \
+	.args = _args, \
+	.flags = G_DBUS_SIGNAL_FLAG_DEPRECATED
+
 gboolean g_dbus_register_interface(DBusConnection *connection,
 					const char *path, const char *name,
 					const GDBusMethodTable *methods,
diff --git a/gdbus/object.c b/gdbus/object.c
index 0ef6c80..2ddc574 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -497,7 +497,8 @@ done:
 }
 
 static const GDBusMethodTable introspect_methods[] = {
-	{ "Introspect",	"",	"s", introspect	},
+	{ _GDBUS_METHOD("Introspect", "", "s", NULL,
+			GDBUS_ARGS({ "xml", "s" }), introspect) },
 	{ }
 };
 
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 05/13] Convert GDBus methods to use macro helpers
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (3 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 04/13] gdbus: add and use helpers for table declarations Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 06/13] gdbus: use GDBusArgInfo to generate introspection Lucas De Marchi
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

With these macro helpers we can separate in/out arguments and use their
own vector.
---
 attrib/client.c           |   28 ++++++++++------
 audio/control.c           |   24 ++++++++------
 audio/device.c            |   16 +++++----
 audio/gateway.c           |   21 +++++++-----
 audio/headset.c           |   77 ++++++++++++++++++++++++------------------
 audio/media.c             |   15 ++++++---
 audio/sink.c              |   30 +++++++++--------
 audio/source.c            |   17 +++++-----
 audio/telephony-dummy.c   |   32 +++++++++++++-----
 audio/telephony-maemo5.c  |    5 +--
 audio/transport.c         |   23 +++++++++----
 health/hdp.c              |   57 ++++++++++++++++++++-----------
 input/device.c            |   14 +++++---
 network/connection.c      |   14 +++++---
 network/server.c          |    8 +++--
 plugins/dbusoob.c         |   17 +++++++---
 plugins/service.c         |   21 ++++++++----
 proximity/monitor.c       |   12 ++++---
 proximity/reporter.c      |    7 ++--
 sap/sap-dummy.c           |   15 ++++++---
 sap/server.c              |    9 +++--
 serial/port.c             |   12 +++++--
 serial/proxy.c            |   31 ++++++++++++-----
 src/adapter.c             |   81 ++++++++++++++++++++++++++++++---------------
 src/device.c              |   24 +++++++++-----
 src/manager.c             |   30 ++++++++++++-----
 thermometer/thermometer.c |   28 +++++++++++-----
 27 files changed, 435 insertions(+), 233 deletions(-)

diff --git a/attrib/client.c b/attrib/client.c
index 2179f63..df1496f 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -516,9 +516,12 @@ static DBusMessage *set_property(DBusConnection *conn,
 }
 
 static const GDBusMethodTable char_methods[] = {
-	{ "GetProperties",	"",	"a{sv}", get_properties },
-	{ "SetProperty",	"sv",	"",	set_property,
-						G_DBUS_METHOD_FLAG_ASYNC},
+	{ _GDBUS_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) },
 	{ }
 };
 
@@ -1016,13 +1019,18 @@ static DBusMessage *prim_get_properties(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable prim_methods[] = {
-	{ "DiscoverCharacteristics",	"",	"ao",	discover_char,
-					G_DBUS_METHOD_FLAG_ASYNC	},
-	{ "RegisterCharacteristicsWatcher",	"o", "",
-						register_watcher	},
-	{ "UnregisterCharacteristicsWatcher",	"o", "",
-						unregister_watcher	},
-	{ "GetProperties",	"",	"a{sv}",prim_get_properties	},
+	{ _GDBUS_ASYNC_METHOD("DiscoverCharacteristics", "", "ao",
+			NULL, GDBUS_ARGS({ "characteristics", "ao" }),
+			discover_char) },
+	{ _GDBUS_METHOD("RegisterCharacteristicsWatcher", "o", "",
+			GDBUS_ARGS({ "agent", "o" }), NULL,
+			register_watcher) },
+	{ _GDBUS_METHOD("UnregisterCharacteristicsWatcher", "o", "",
+			GDBUS_ARGS({ "agent", "o" }), NULL,
+			unregister_watcher) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			prim_get_properties) },
 	{ }
 };
 
diff --git a/audio/control.c b/audio/control.c
index da23535..71c82eb 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -198,19 +198,23 @@ static DBusMessage *control_get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable control_methods[] = {
-	{ "IsConnected",	"",	"b",	control_is_connected,
-						G_DBUS_METHOD_FLAG_DEPRECATED },
-	{ "GetProperties",	"",	"a{sv}",control_get_properties },
-	{ "VolumeUp",		"",	"",	volume_up },
-	{ "VolumeDown",		"",	"",	volume_down },
-	{ NULL, NULL, NULL, NULL }
+	{ _GDBUS_ASYNC_METHOD("IsConnected", "", "b",
+				NULL, GDBUS_ARGS({ "connected", "b" }),
+				control_is_connected) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+				NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+				control_get_properties) },
+	{ _GDBUS_METHOD("VolumeUp", "", "", NULL, NULL, volume_up) },
+	{ _GDBUS_METHOD("VolumeDown", "", "", NULL, NULL, volume_down) },
+	{ }
 };
 
 static const GDBusSignalTable control_signals[] = {
-	{ "Connected",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED},
-	{ "Disconnected",		"",	G_DBUS_SIGNAL_FLAG_DEPRECATED},
-	{ "PropertyChanged",		"sv"	},
-	{ NULL, NULL }
+	{ _GDBUS_DEPRECATED_SIGNAL("Connected", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("Disconnected", "", NULL) },
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ }
 };
 
 static void path_unregister(void *data)
diff --git a/audio/device.c b/audio/device.c
index ac00f1d..e4ee4e3 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -619,16 +619,18 @@ static DBusMessage *dev_get_properties(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable dev_methods[] = {
-	{ "Connect",		"",	"",	dev_connect,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "Disconnect",		"",	"",	dev_disconnect },
-	{ "GetProperties",	"",	"a{sv}",dev_get_properties },
-	{ NULL, NULL, NULL, NULL }
+	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, dev_connect) },
+	{ _GDBUS_METHOD("Disconnect", "", "", NULL, NULL, dev_disconnect) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+		NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+		dev_get_properties) },
+	{ }
 };
 
 static const GDBusSignalTable dev_signals[] = {
-	{ "PropertyChanged",		"sv"	},
-	{ NULL, NULL }
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ }
 };
 
 struct audio_device *audio_device_register(DBusConnection *conn,
diff --git a/audio/gateway.c b/audio/gateway.c
index 9194a7c..0892036 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)
diff --git a/audio/headset.c b/audio/headset.c
index ebe9a7c..22a26bd 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -2058,42 +2058,53 @@ static DBusMessage *hs_set_property(DBusConnection *conn,
 }
 
 static const GDBusMethodTable headset_methods[] = {
-	{ "Connect",		"",	"",	hs_connect,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "Disconnect",		"",	"",	hs_disconnect },
-	{ "IsConnected",	"",	"b",	hs_is_connected },
-	{ "IndicateCall",	"",	"",	hs_ring },
-	{ "CancelCall",		"",	"",	hs_cancel_call },
-	{ "Play",		"",	"",	hs_play,
-						G_DBUS_METHOD_FLAG_ASYNC |
-						G_DBUS_METHOD_FLAG_DEPRECATED },
-	{ "Stop",		"",	"",	hs_stop },
-	{ "IsPlaying",		"",	"b",	hs_is_playing,
-						G_DBUS_METHOD_FLAG_DEPRECATED },
-	{ "GetSpeakerGain",	"",	"q",	hs_get_speaker_gain,
-						G_DBUS_METHOD_FLAG_DEPRECATED },
-	{ "GetMicrophoneGain",	"",	"q",	hs_get_mic_gain,
-						G_DBUS_METHOD_FLAG_DEPRECATED },
-	{ "SetSpeakerGain",	"q",	"",	hs_set_speaker_gain,
-						G_DBUS_METHOD_FLAG_DEPRECATED },
-	{ "SetMicrophoneGain",	"q",	"",	hs_set_mic_gain,
-						G_DBUS_METHOD_FLAG_DEPRECATED },
-	{ "GetProperties",	"",	"a{sv}",hs_get_properties },
-	{ "SetProperty",	"sv",	"",	hs_set_property },
-	{ NULL, NULL, NULL, NULL }
+	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, hs_connect) },
+	{ _GDBUS_METHOD("Disconnect", "", "", NULL, NULL, hs_disconnect) },
+	{ _GDBUS_METHOD("IsConnected", "", "b",
+			NULL, GDBUS_ARGS({ "connected", "b" }),
+			hs_is_connected) },
+	{ _GDBUS_METHOD("IndicateCall", "", "", NULL, NULL, hs_ring) },
+	{ _GDBUS_METHOD("CancelCall", "", "", NULL, NULL, hs_cancel_call) },
+	{ _GDBUS_DEPRECATED_ASYNC_METHOD("Play", "", "", NULL, NULL, hs_play) },
+	{ _GDBUS_METHOD("Stop", "", "", NULL, NULL, hs_stop) },
+	{ _GDBUS_DEPRECATED_METHOD("IsPlaying", "", "b",
+					NULL, GDBUS_ARGS({ "playing", "b" }),
+					hs_is_playing) },
+	{ _GDBUS_DEPRECATED_METHOD("GetSpeakerGain", "", "q",
+					NULL, GDBUS_ARGS({ "gain", "q" }),
+					hs_get_speaker_gain) },
+	{ _GDBUS_DEPRECATED_METHOD("GetMicrophoneGain", "", "q",
+					NULL, GDBUS_ARGS({ "gain", "q" }),
+					hs_get_mic_gain) },
+	{ _GDBUS_DEPRECATED_METHOD("SetSpeakerGain", "q", "",
+					GDBUS_ARGS({ "gain", "q" }), NULL,
+					hs_set_speaker_gain) },
+	{ _GDBUS_DEPRECATED_METHOD("SetMicrophoneGain", "q", "",
+					GDBUS_ARGS({ "gain", "q" }), NULL,
+					hs_set_mic_gain) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			hs_get_properties) },
+	{ _GDBUS_METHOD("SetProperty", "sv", "",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
+			hs_set_property) },
+	{ }
 };
 
 static const GDBusSignalTable headset_signals[] = {
-	{ "Connected",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "Disconnected",		"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "AnswerRequested",		""	},
-	{ "Stopped",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "Playing",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "SpeakerGainChanged",		"q",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "MicrophoneGainChanged",	"q",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "CallTerminated",		""	},
-	{ "PropertyChanged",		"sv"	},
-	{ NULL, NULL }
+	{ _GDBUS_DEPRECATED_SIGNAL("Connected", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("Disconnected", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("AnswerRequested", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("Stopped", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("Playing", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("SpeakerGainChanged", "q",
+						GDBUS_ARGS({ "gain", "q" })) },
+	{ _GDBUS_DEPRECATED_SIGNAL("MicrophoneGainChanged", "q",
+						GDBUS_ARGS({ "gain", "q" })) },
+	{ _GDBUS_SIGNAL("CallTerminated", "", NULL) },
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ }
 };
 
 void headset_update(struct audio_device *dev, uint16_t svc,
diff --git a/audio/media.c b/audio/media.c
index 7a83fbd..0fbeb8a 100644
--- a/audio/media.c
+++ b/audio/media.c
@@ -1791,10 +1791,17 @@ static DBusMessage *unregister_player(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable media_methods[] = {
-	{ "RegisterEndpoint",	"oa{sv}",	"",	register_endpoint },
-	{ "UnregisterEndpoint",	"o",		"",	unregister_endpoint },
-	{ "RegisterPlayer",	"oa{sv}a{sv}","",	register_player },
-	{ "UnregisterPlayer",	"o",		"",	unregister_player },
+	{ _GDBUS_METHOD("RegisterEndpoint", "oa{sv}", "",
+		GDBUS_ARGS({ "endpoint", "o" }, { "properties", "a{sv}" }),
+		NULL, register_endpoint) },
+	{ _GDBUS_METHOD("UnregisterEndpoint", "o", "",
+		GDBUS_ARGS({ "endpoint", "o" }), NULL, unregister_endpoint) },
+	{ _GDBUS_METHOD("RegisterPlayer", "oa{sv}a{sv}", "",
+		GDBUS_ARGS({ "player", "o" }, { "properties", "a{sv}" },
+						{ "metadata", "a{sv}" }),
+		NULL, register_player) },
+	{ _GDBUS_METHOD("UnregisterPlayer", "o", "",
+		GDBUS_ARGS({ "player", "o" }), NULL, unregister_player) },
 	{ },
 };
 
diff --git a/audio/sink.c b/audio/sink.c
index fe4dd4b..f9b934b 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -556,23 +556,25 @@ static DBusMessage *sink_get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable sink_methods[] = {
-	{ "Connect",		"",	"",	sink_connect,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "Disconnect",		"",	"",	sink_disconnect,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "IsConnected",	"",	"b",	sink_is_connected,
-						G_DBUS_METHOD_FLAG_DEPRECATED },
-	{ "GetProperties",	"",	"a{sv}",sink_get_properties },
-	{ NULL, NULL, NULL, NULL }
+	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, sink_connect) },
+	{ _GDBUS_ASYNC_METHOD("Disconnect", "", "", NULL, NULL, sink_disconnect) },
+	{ _GDBUS_DEPRECATED_METHOD("IsConnected", "", "b",
+			NULL, GDBUS_ARGS({ "connected", "b" }),
+			sink_is_connected) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+				NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+				sink_get_properties) },
+	{ }
 };
 
 static const GDBusSignalTable sink_signals[] = {
-	{ "Connected",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "Disconnected",		"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "Playing",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "Stopped",			"",	G_DBUS_SIGNAL_FLAG_DEPRECATED },
-	{ "PropertyChanged",		"sv"	},
-	{ NULL, NULL }
+	{ _GDBUS_DEPRECATED_SIGNAL("Connected", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("Disconnected", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("Playing", "", NULL) },
+	{ _GDBUS_DEPRECATED_SIGNAL("Stopped", "", NULL) },
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ }
 };
 
 static void sink_free(struct audio_device *dev)
diff --git a/audio/source.c b/audio/source.c
index 04bf131..2724358 100644
--- a/audio/source.c
+++ b/audio/source.c
@@ -477,17 +477,18 @@ static DBusMessage *source_get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable source_methods[] = {
-	{ "Connect",		"",	"",	source_connect,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "Disconnect",		"",	"",	source_disconnect,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "GetProperties",	"",	"a{sv}",source_get_properties },
-	{ NULL, NULL, NULL, NULL }
+	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, source_connect) },
+	{ _GDBUS_ASYNC_METHOD("Disconnect", "", "", NULL, NULL, source_disconnect) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+				NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+				source_get_properties) },
+	{ }
 };
 
 static const GDBusSignalTable source_signals[] = {
-	{ "PropertyChanged",		"sv"	},
-	{ NULL, NULL }
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ }
 };
 
 static void source_free(struct audio_device *dev)
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c
index 1885b4a..0e488dc 100644
--- a/audio/telephony-dummy.c
+++ b/audio/telephony-dummy.c
@@ -379,19 +379,33 @@ static DBusMessage *set_subscriber_number(DBusConnection *conn,
 }
 
 static const GDBusMethodTable dummy_methods[] = {
-	{ "OutgoingCall",	"s",	"",	outgoing_call		},
-	{ "IncomingCall",	"s",	"",	incoming_call		},
-	{ "CancelCall",		"",	"",	cancel_call		},
-	{ "SignalStrength",	"u",	"",	signal_strength		},
-	{ "BatteryLevel",	"u",	"",	battery_level		},
-	{ "RoamingStatus",	"b",	"",	roaming_status		},
-	{ "RegistrationStatus",	"b",	"",	registration_status	},
-	{ "SetSubscriberNumber","s",	"",	set_subscriber_number	},
+	{ _GDBUS_METHOD("OutgoingCall", "s", "",
+			GDBUS_ARGS({ "number", "s" }), NULL,
+			outgoing_call) },
+	{ _GDBUS_METHOD("IncomingCall", "s", "",
+			GDBUS_ARGS({ "number", "s" }), NULL,
+			incoming_call) },
+	{ _GDBUS_METHOD("CancelCall", "", "", NULL, NULL, cancel_call) },
+	{ _GDBUS_METHOD("SignalStrength", "u", "",
+			GDBUS_ARGS({ "strength", "u" }), NULL,
+			signal_strength) },
+	{ _GDBUS_METHOD("BatteryLevel", "u", "",
+			GDBUS_ARGS({ "level", "u" }), NULL,
+			battery_level) },
+	{ _GDBUS_METHOD("RoamingStatus", "b", "",
+			GDBUS_ARGS({ "roaming", "b" }), NULL,
+			roaming_status) },
+	{ _GDBUS_METHOD("RegistrationStatus", "b", "",
+			GDBUS_ARGS({ "registration", "b" }), NULL,
+			registration_status) },
+	{ _GDBUS_METHOD("SetSubscriberNumber","s", "",
+			GDBUS_ARGS({ "number", "s" }), NULL,
+			set_subscriber_number) },
 	{ }
 };
 
 static const GDBusSignalTable dummy_signals[] = {
-	{ "VoiceDial",	"" },
+	{ _GDBUS_SIGNAL("VoiceDial", "", NULL) },
 	{ }
 };
 
diff --git a/audio/telephony-maemo5.c b/audio/telephony-maemo5.c
index 6ab43b4..a03ba09 100644
--- a/audio/telephony-maemo5.c
+++ b/audio/telephony-maemo5.c
@@ -1952,8 +1952,9 @@ static DBusMessage *set_callerid(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable telephony_maemo_methods[] = {
-	{"SetCallerId",		"s",	"",	set_callerid,
-						G_DBUS_METHOD_FLAG_ASYNC},
+	{ _GDBUS_ASYNC_METHOD("SetCallerId", "s", "",
+				GDBUS_ARGS({ "id", "s" }), NULL,
+				set_callerid) },
 	{ }
 };
 
diff --git a/audio/transport.c b/audio/transport.c
index 7223f38..f2a512a 100644
--- a/audio/transport.c
+++ b/audio/transport.c
@@ -915,17 +915,26 @@ static DBusMessage *get_properties(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable transport_methods[] = {
-	{ "GetProperties",	"",	"a{sv}",	get_properties },
-	{ "Acquire",		"s",	"hqq",		acquire,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "Release",		"s",	"",		release,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "SetProperty",	"sv",	"",		set_property },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			get_properties) },
+	{ _GDBUS_ASYNC_METHOD("Acquire", "s", "hqq",
+			GDBUS_ARGS({ "access_type", "s" }),
+			GDBUS_ARGS({ "fd", "h" }, { "mtu_r", "q" },
+							{ "mtu_w", "q" } ),
+			acquire) },
+	{ _GDBUS_ASYNC_METHOD("Release", "s", "",
+			GDBUS_ARGS({ "access_type", "s" }), NULL,
+			release ) },
+	{ _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" }),
+			NULL, set_property) },
 	{ },
 };
 
 static const GDBusSignalTable transport_signals[] = {
-	{ "PropertyChanged",	"sv"	},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
 
diff --git a/health/hdp.c b/health/hdp.c
index 3b1ea49..6dabbff 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -425,9 +425,14 @@ static void manager_path_unregister(gpointer data)
 }
 
 static const GDBusMethodTable health_manager_methods[] = {
-	{"CreateApplication", "a{sv}", "o", manager_create_application},
-	{"DestroyApplication", "o", "", manager_destroy_application},
-	{ NULL }
+	{ _GDBUS_METHOD("CreateApplication", "a{sv}", "o",
+			GDBUS_ARGS({ "config", "a{sv}" }),
+			GDBUS_ARGS({ "application", "o" }),
+			manager_create_application) },
+	{ _GDBUS_METHOD("DestroyApplication", "o", "",
+			GDBUS_ARGS({ "application", "o" }), NULL,
+			manager_destroy_application) },
+	{ }
 };
 
 static DBusMessage *channel_get_properties(DBusConnection *conn,
@@ -732,11 +737,14 @@ end:
 }
 
 static const GDBusMethodTable health_channels_methods[] = {
-	{"GetProperties","",	"a{sv}",	channel_get_properties },
-	{"Acquire",	"",	"h",		channel_acquire,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{"Release",	"",	"",		channel_release },
-	{ NULL }
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			channel_get_properties) },
+	{ _GDBUS_ASYNC_METHOD("Acquire", "", "h",
+			NULL, GDBUS_ARGS({ "fd", "h" }),
+			channel_acquire) },
+	{ _GDBUS_METHOD("Release", "", "", NULL, NULL, channel_release) },
+	{ }
 };
 
 static struct hdp_channel *create_channel(struct hdp_device *dev,
@@ -2094,21 +2102,30 @@ static void health_device_destroy(void *data)
 }
 
 static const GDBusMethodTable health_device_methods[] = {
-	{"Echo",		"",	"b",	device_echo,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{"CreateChannel",	"os",	"o",	device_create_channel,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{"DestroyChannel",	"o",	"",	device_destroy_channel,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{"GetProperties",	"",	"a{sv}", device_get_properties},
-	{ NULL }
+	{ _GDBUS_ASYNC_METHOD("Echo", "", "b",
+			NULL, GDBUS_ARGS({ "value", "b" }), device_echo) },
+	{ _GDBUS_ASYNC_METHOD("CreateChannel", "os", "o",
+			GDBUS_ARGS({ "application", "o" },
+					{ "configuration", "s" }),
+			GDBUS_ARGS({ "channel", "o" }),
+			device_create_channel) },
+	{ _GDBUS_ASYNC_METHOD("DestroyChannel", "o", "",
+			GDBUS_ARGS({ "channel", "o" }), NULL,
+			device_destroy_channel) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			device_get_properties) },
+	{ }
 };
 
 static const GDBusSignalTable health_device_signals[] = {
-	{"ChannelConnected",		"o"		},
-	{"ChannelDeleted",		"o"		},
-	{"PropertyChanged",		"sv"		},
-	{ NULL }
+	{ _GDBUS_SIGNAL("ChannelConnected", "o",
+			GDBUS_ARGS({ "channel", "o" })) },
+	{ _GDBUS_SIGNAL("ChannelDeleted", "o",
+			GDBUS_ARGS({ "channel", "o" })) },
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ }
 };
 
 static struct hdp_device *create_health_device(DBusConnection *conn,
diff --git a/input/device.c b/input/device.c
index af90e6d..ab38d80 100644
--- a/input/device.c
+++ b/input/device.c
@@ -1061,15 +1061,19 @@ static DBusMessage *input_device_get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable device_methods[] = {
-	{ "Connect",		"",	"",	input_device_connect,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "Disconnect",		"",	"",	input_device_disconnect	},
-	{ "GetProperties",	"",	"a{sv}",input_device_get_properties },
+	{ _GDBUS_ASYNC_METHOD("Connect", "", "",
+				NULL, NULL, input_device_connect) },
+	{ _GDBUS_METHOD("Disconnect", "", "",
+				NULL, NULL, input_device_disconnect) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			input_device_get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable device_signals[] = {
-	{ "PropertyChanged",	"sv"	},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
 
diff --git a/network/connection.c b/network/connection.c
index 77d91d6..4d0bb6c 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -553,15 +553,19 @@ static void path_unregister(void *data)
 }
 
 static const GDBusMethodTable connection_methods[] = {
-	{ "Connect",		"s",	"s",	connection_connect,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "Disconnect",		"",	"",	connection_disconnect	},
-	{ "GetProperties",	"",	"a{sv}",connection_get_properties },
+	{ _GDBUS_ASYNC_METHOD("Connect", "", "",
+			NULL, NULL, connection_connect) },
+	{ _GDBUS_METHOD("Disconnect", "", "",
+			NULL, NULL, connection_disconnect) },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			connection_get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable connection_signals[] = {
-	{ "PropertyChanged",	"sv"	},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
 
diff --git a/network/server.c b/network/server.c
index 688ec7d..2539df8 100644
--- a/network/server.c
+++ b/network/server.c
@@ -686,8 +686,12 @@ static void path_unregister(void *data)
 }
 
 static const GDBusMethodTable server_methods[] = {
-	{ "Register",	"ss",	"",	register_server		},
-	{ "Unregister",	"s",	"",	unregister_server	},
+	{ _GDBUS_METHOD("Register", "ss", "",
+			GDBUS_ARGS({ "uuid", "s" }, { "bridge", "s" }), NULL,
+			register_server) },
+	{ _GDBUS_METHOD("Unregister", "s", "",
+			GDBUS_ARGS({ "uuid", "s" }), NULL,
+			unregister_server) },
 	{ }
 };
 
diff --git a/plugins/dbusoob.c b/plugins/dbusoob.c
index bcd0556..0d7a6ff 100644
--- a/plugins/dbusoob.c
+++ b/plugins/dbusoob.c
@@ -176,11 +176,18 @@ static DBusMessage *remove_remote_data(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable oob_methods[] = {
-	{"AddRemoteData",	"sayay",	"",	add_remote_data},
-	{"RemoveRemoteData",	"s",		"",	remove_remote_data},
-	{"ReadLocalData",	"",		"ayay",	read_local_data,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{}
+	{ _GDBUS_METHOD("AddRemoteData", "sayay", "",
+			GDBUS_ARGS({ "address", "s" }, { "hash", "ay" },
+					{ "randomizer", "ay" }), NULL,
+			add_remote_data) },
+	{ _GDBUS_METHOD("RemoveRemoteData", "s", "",
+			GDBUS_ARGS({ "address", "s" }), NULL,
+			remove_remote_data) },
+	{ _GDBUS_ASYNC_METHOD("ReadLocalData", "", "ayay",
+			NULL, GDBUS_ARGS({ "hash", "ay" },
+						{ "randomizer", "ay" }),
+			read_local_data) },
+	{ }
 };
 
 static int oob_probe(struct btd_adapter *adapter)
diff --git a/plugins/service.c b/plugins/service.c
index 978e371..d03ef46 100644
--- a/plugins/service.c
+++ b/plugins/service.c
@@ -697,12 +697,21 @@ done:
 }
 
 static const GDBusMethodTable service_methods[] = {
-	{ "AddRecord",		"s",	"u",	add_service_record	},
-	{ "UpdateRecord",	"us",	"",	update_service_record	},
-	{ "RemoveRecord",	"u",	"",	remove_service_record	},
-	{ "RequestAuthorization","su",	"",	request_authorization,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "CancelAuthorization", "",	"",	cancel_authorization	},
+	{ _GDBUS_METHOD("AddRecord", "s", "u",
+		GDBUS_ARGS({ "record", "s" }),
+		GDBUS_ARGS({ "handle", "u" }),
+		add_service_record) },
+	{ _GDBUS_METHOD("UpdateRecord", "us", "",
+		GDBUS_ARGS({ "handle", "u" }, { "record", "s" }), NULL,
+		update_service_record) },
+	{ _GDBUS_METHOD("RemoveRecord", "u", "",
+		GDBUS_ARGS({ "handle", "u" }), NULL,
+		remove_service_record) },
+	{ _GDBUS_ASYNC_METHOD("RequestAuthorization","su", "",
+		GDBUS_ARGS({ "address", "s" }, { "handle", "u"}), NULL,
+		request_authorization) },
+	{ _GDBUS_METHOD("CancelAuthorization", "", "",
+		NULL, NULL, cancel_authorization) },
 	{ }
 };
 
diff --git a/proximity/monitor.c b/proximity/monitor.c
index b4a52d2..139cae7 100644
--- a/proximity/monitor.c
+++ b/proximity/monitor.c
@@ -547,14 +547,18 @@ static DBusMessage *set_property(DBusConnection *conn,
 }
 
 static const GDBusMethodTable monitor_methods[] = {
-	{ "GetProperties",	"",	"a{sv}",	get_properties	},
-	{ "SetProperty",	"sv",	"",		set_property,
-						G_DBUS_METHOD_FLAG_ASYNC},
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			get_properties) },
+	{ _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
+			set_property) },
 	{ }
 };
 
 static const GDBusSignalTable monitor_signals[] = {
-	{ "PropertyChanged",	"sv"	},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
 
diff --git a/proximity/reporter.c b/proximity/reporter.c
index 0a89537..d1a37a2 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
@@ -181,12 +181,15 @@ err:
 }
 
 static const GDBusMethodTable reporter_methods[] = {
-	{ "GetProperties",	"",	"a{sv}",	get_properties	},
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable reporter_signals[] = {
-	{ "PropertyChanged",	"sv"	},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
 
diff --git a/sap/sap-dummy.c b/sap/sap-dummy.c
index a2f2968..b273918 100644
--- a/sap/sap-dummy.c
+++ b/sap/sap-dummy.c
@@ -316,10 +316,17 @@ static DBusMessage *card_status(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable dummy_methods[] = {
-	{ "OngoingCall", "b", "", ongoing_call},
-	{ "MaxMessageSize", "u", "", max_msg_size},
-	{ "DisconnectImmediate", "", "", disconnect_immediate},
-	{ "CardStatus", "u", "", card_status},
+	{ _GDBUS_METHOD("OngoingCall", "b", "",
+				GDBUS_ARGS({ "ongoing", "b" }), NULL,
+				ongoing_call) },
+	{ _GDBUS_METHOD("MaxMessageSize", "u", "",
+				GDBUS_ARGS({ "size", "u" }), NULL,
+				max_msg_size) },
+	{ _GDBUS_METHOD("DisconnectImmediate", "", "", NULL, NULL,
+				disconnect_immediate) },
+	{ _GDBUS_METHOD("CardStatus", "u", "",
+				GDBUS_ARGS({ "status", "" }), NULL,
+				card_status) },
 	{ }
 };
 
diff --git a/sap/server.c b/sap/server.c
index b212ea0..342cd64 100644
--- a/sap/server.c
+++ b/sap/server.c
@@ -1304,13 +1304,16 @@ static DBusMessage *get_properties(DBusConnection *c,
 }
 
 static const GDBusMethodTable server_methods[] = {
-	{"GetProperties", "", "a{sv}", get_properties},
-	{"Disconnect", "", "", disconnect},
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			get_properties) },
+	{ _GDBUS_METHOD("Disconnect", "", "", NULL, NULL, disconnect) },
 	{ }
 };
 
 static const GDBusSignalTable server_signals[] = {
-	{ "PropertyChanged", "sv"},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
 
diff --git a/serial/port.c b/serial/port.c
index 1c48bf7..4ef3437 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -568,9 +568,15 @@ static DBusMessage *port_disconnect(DBusConnection *conn,
 }
 
 static const GDBusMethodTable port_methods[] = {
-	{ "Connect",    "s", "s", port_connect, G_DBUS_METHOD_FLAG_ASYNC },
-	{ "ConnectFD",    "s", "h", port_connect, G_DBUS_METHOD_FLAG_ASYNC },
-	{ "Disconnect", "s", "",  port_disconnect },
+	{ _GDBUS_ASYNC_METHOD("Connect", "s", "s",
+		GDBUS_ARGS({ "pattern", "s" }),	GDBUS_ARGS({ "tty", "s" }),
+		port_connect) },
+	{ _GDBUS_ASYNC_METHOD("ConnectFD", "s", "h",
+		GDBUS_ARGS({ "pattern", "s" }), GDBUS_ARGS({ "fd", "s" }),
+		port_connect) },
+	{ _GDBUS_METHOD("Disconnect", "s", "",
+		GDBUS_ARGS({ "device", "s" }), NULL,
+		port_disconnect) },
 	{ }
 };
 
diff --git a/serial/proxy.c b/serial/proxy.c
index 5a91186..a2a9088 100644
--- a/serial/proxy.c
+++ b/serial/proxy.c
@@ -729,10 +729,15 @@ static DBusMessage *proxy_set_serial_params(DBusConnection *conn,
 }
 
 static const GDBusMethodTable proxy_methods[] = {
-	{ "Enable",			"",	"",	proxy_enable },
-	{ "Disable",			"",	"",	proxy_disable },
-	{ "GetInfo",			"",	"a{sv}",proxy_get_info },
-	{ "SetSerialParameters",	"syys",	"",	proxy_set_serial_params },
+	{ _GDBUS_METHOD("Enable", "", "", NULL, NULL, proxy_enable) },
+	{ _GDBUS_METHOD("Disable", "", "", NULL, NULL, proxy_disable) },
+	{ _GDBUS_METHOD("GetInfo", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			proxy_get_info) },
+	{ _GDBUS_METHOD("SetSerialParameters", "syys", "",
+			GDBUS_ARGS({ "rate", "s" }, { "data", "y" },
+					{ "stop", "y" }, { "parity", "s" }),
+			NULL, proxy_set_serial_params) },
 	{ },
 };
 
@@ -1112,15 +1117,23 @@ static void manager_path_unregister(void *data)
 }
 
 static const GDBusMethodTable manager_methods[] = {
-	{ "CreateProxy",		"ss",	"s",	create_proxy },
-	{ "ListProxies",		"",	"as",	list_proxies },
-	{ "RemoveProxy",		"s",	"",	remove_proxy },
+	{ _GDBUS_METHOD("CreateProxy", "ss", "s",
+			GDBUS_ARGS({ "pattern", "s" },
+					{ "address", "s" }),
+			GDBUS_ARGS({ "path", "s" }),
+			create_proxy) },
+	{ _GDBUS_METHOD("ListProxies", "", "as",
+			NULL, GDBUS_ARGS({ "paths", "as" }),
+			list_proxies) },
+	{ _GDBUS_METHOD("RemoveProxy", "s", "",
+			GDBUS_ARGS({ "path", "s" }), NULL,
+			remove_proxy) },
 	{ },
 };
 
 static const GDBusSignalTable manager_signals[] = {
-	{ "ProxyCreated",		"s"	},
-	{ "ProxyRemoved",		"s"	},
+	{ _GDBUS_SIGNAL("ProxyCreated", "s", GDBUS_ARGS({ "path", "s" })) },
+	{ _GDBUS_SIGNAL("ProxyRemoved", "s", GDBUS_ARGS({ "path", "s" })) },
 	{ }
 };
 
diff --git a/src/adapter.c b/src/adapter.c
index 9dfed54..d87406d 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1656,37 +1656,64 @@ static DBusMessage *unregister_agent(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable adapter_methods[] = {
-	{ "GetProperties",	"",	"a{sv}",get_properties		},
-	{ "SetProperty",	"sv",	"",	set_property,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "RequestSession",	"",	"",	request_session,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "ReleaseSession",	"",	"",	release_session		},
-	{ "StartDiscovery",	"",	"",	adapter_start_discovery },
-	{ "StopDiscovery",	"",	"",	adapter_stop_discovery,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "ListDevices",	"",	"ao",	list_devices,
-						G_DBUS_METHOD_FLAG_DEPRECATED},
-	{ "CreateDevice",	"s",	"o",	create_device,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "CreatePairedDevice",	"sos",	"o",	create_paired_device,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "CancelDeviceCreation","s",	"",	cancel_device_creation,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "RemoveDevice",	"o",	"",	remove_device,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "FindDevice",		"s",	"o",	find_device		},
-	{ "RegisterAgent",	"os",	"",	register_agent		},
-	{ "UnregisterAgent",	"o",	"",	unregister_agent	},
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			get_properties) },
+	{ _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
+			set_property) },
+	{ _GDBUS_ASYNC_METHOD("RequestSession", "", "", NULL, NULL,
+			request_session) },
+	{ _GDBUS_METHOD("ReleaseSession", "", "", NULL, NULL,
+			release_session) },
+	{ _GDBUS_METHOD("StartDiscovery", "", "", NULL, NULL,
+			adapter_start_discovery) },
+	{ _GDBUS_ASYNC_METHOD("StopDiscovery", "", "", NULL, NULL,
+			adapter_stop_discovery) },
+	{ _GDBUS_DEPRECATED_METHOD("ListDevices", "", "ao",
+			NULL, GDBUS_ARGS({ "devices", "ao" }),
+			list_devices) },
+	{ _GDBUS_ASYNC_METHOD("CreateDevice", "s", "o",
+			GDBUS_ARGS({ "address", "s" }),
+			GDBUS_ARGS({ "device", "o" }),
+			create_device) },
+	{ _GDBUS_ASYNC_METHOD("CreatePairedDevice", "sos", "o",
+			GDBUS_ARGS({ "address", "s" }, { "agent", "o" },
+							{ "capability", "s" }),
+			GDBUS_ARGS({ "device", "o" }),
+			create_paired_device) },
+	{ _GDBUS_ASYNC_METHOD("CancelDeviceCreation", "s", "",
+			GDBUS_ARGS({ "address", "s" }), NULL,
+			cancel_device_creation) },
+	{ _GDBUS_ASYNC_METHOD("RemoveDevice", "o", "",
+			GDBUS_ARGS({ "device", "o" }), NULL,
+			remove_device) },
+	{ _GDBUS_METHOD("FindDevice", "s", "o",
+			GDBUS_ARGS({ "address", "s" }),
+			GDBUS_ARGS({ "device", "o" }),
+			find_device) },
+	{ _GDBUS_METHOD("RegisterAgent", "os", "",
+			GDBUS_ARGS({ "agent", "o" },
+					{ "capability", "s" }), NULL,
+			register_agent) },
+	{ _GDBUS_METHOD("UnregisterAgent", "o", "",
+			GDBUS_ARGS({ "agent", "o" }), NULL,
+			unregister_agent) },
 	{ }
 };
 
 static const GDBusSignalTable adapter_signals[] = {
-	{ "PropertyChanged",		"sv"		},
-	{ "DeviceCreated",		"o"		},
-	{ "DeviceRemoved",		"o"		},
-	{ "DeviceFound",		"sa{sv}"	},
-	{ "DeviceDisappeared",		"s"		},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ _GDBUS_SIGNAL("DeviceCreated", "o",
+			GDBUS_ARGS({ "device", "o" })) },
+	{ _GDBUS_SIGNAL("DeviceRemoved", "o",
+			GDBUS_ARGS({ "device", "o" })) },
+	{ _GDBUS_SIGNAL("DeviceFound", "sa{sv}",
+			GDBUS_ARGS({ "address", "s" },
+						{ "values", "a{sv}" })) },
+	{ _GDBUS_SIGNAL("DeviceDisappeared", "s",
+			GDBUS_ARGS({ "address", "s" })) },
 	{ }
 };
 
diff --git a/src/device.c b/src/device.c
index 16f9d7a..2dc60e2 100644
--- a/src/device.c
+++ b/src/device.c
@@ -878,19 +878,25 @@ static DBusMessage *disconnect(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable device_methods[] = {
-	{ "GetProperties",	"",	"a{sv}",	get_properties	},
-	{ "SetProperty",	"sv",	"",		set_property	},
-	{ "DiscoverServices",	"s",	"a{us}",	discover_services,
-						G_DBUS_METHOD_FLAG_ASYNC},
-	{ "CancelDiscovery",	"",	"",		cancel_discover	},
-	{ "Disconnect",		"",	"",		disconnect,
-						G_DBUS_METHOD_FLAG_ASYNC},
+	{ _GDBUS_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_ASYNC_METHOD("DiscoverServices", "s", "a{us}",
+			GDBUS_ARGS({ "pattern", "s" }),
+			GDBUS_ARGS({ "services", "a{us}" }),
+			discover_services) },
+	{ _GDBUS_METHOD("CancelDiscovery", "", "", NULL, NULL, cancel_discover) },
+	{ _GDBUS_ASYNC_METHOD("Disconnect", "", "", NULL, NULL, disconnect) },
 	{ }
 };
 
 static const GDBusSignalTable device_signals[] = {
-	{ "PropertyChanged",		"sv"	},
-	{ "DisconnectRequested",	""	},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ _GDBUS_SIGNAL("DisconnectRequested", "", NULL) },
 	{ }
 };
 
diff --git a/src/manager.c b/src/manager.c
index e6c1675..42c1a65 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -197,19 +197,31 @@ static DBusMessage *get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable manager_methods[] = {
-	{ "GetProperties",	"",	"a{sv}",get_properties	},
-	{ "DefaultAdapter",	"",	"o",	default_adapter	},
-	{ "FindAdapter",	"s",	"o",	find_adapter	},
-	{ "ListAdapters",	"",	"ao",	list_adapters,
-						G_DBUS_METHOD_FLAG_DEPRECATED},
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			get_properties) },
+	{ _GDBUS_METHOD("DefaultAdapter", "", "o",
+			NULL, GDBUS_ARGS({ "adapter", "o" }),
+			default_adapter) },
+	{ _GDBUS_METHOD("FindAdapter", "s", "o",
+			GDBUS_ARGS({ "pattern", "s" }),
+			GDBUS_ARGS({ "adapter", "o" }),
+			find_adapter) },
+	{ _GDBUS_ASYNC_METHOD("ListAdapters", "", "ao",
+			NULL, GDBUS_ARGS({ "adapters", "ao" }),
+			list_adapters) },
 	{ }
 };
 
 static const GDBusSignalTable manager_signals[] = {
-	{ "PropertyChanged",		"sv"	},
-	{ "AdapterAdded",		"o"	},
-	{ "AdapterRemoved",		"o"	},
-	{ "DefaultAdapterChanged",	"o"	},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
+	{ _GDBUS_SIGNAL("AdapterAdded", "o",
+			GDBUS_ARGS({ "adapter", "o" })) },
+	{ _GDBUS_SIGNAL("AdapterRemoved", "o",
+			GDBUS_ARGS({ "adapter", "o" })) },
+	{ _GDBUS_SIGNAL("DefaultAdapterChanged", "o",
+			GDBUS_ARGS({ "adapter", "o" })) },
 	{ }
 };
 
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index 1f7b6a6..4256f14 100644
--- a/thermometer/thermometer.c
+++ b/thermometer/thermometer.c
@@ -960,18 +960,30 @@ static DBusMessage *disable_intermediate(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable thermometer_methods[] = {
-	{ "GetProperties",	"",	"a{sv}",	get_properties },
-	{ "SetProperty",	"sv",	"",		set_property,
-						G_DBUS_METHOD_FLAG_ASYNC },
-	{ "RegisterWatcher",	"o",	"",		register_watcher },
-	{ "UnregisterWatcher",	"o",	"",		unregister_watcher },
-	{ "EnableIntermediateMeasurement", "o", "", enable_intermediate },
-	{ "DisableIntermediateMeasurement","o",	"", disable_intermediate },
+	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+			get_properties) },
+	{ _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
+			set_property) },
+	{ _GDBUS_METHOD("RegisterWatcher", "o", "",
+			GDBUS_ARGS({ "agent", "o" }), NULL,
+			register_watcher) },
+	{ _GDBUS_METHOD("UnregisterWatcher", "o", "",
+			GDBUS_ARGS({ "agent", "o" }), NULL,
+			unregister_watcher) },
+	{ _GDBUS_METHOD("EnableIntermediateMeasurement", "o", "",
+			GDBUS_ARGS({ "agent", "o" }), NULL,
+			enable_intermediate) },
+	{ _GDBUS_METHOD("DisableIntermediateMeasurement","o", "",
+			GDBUS_ARGS({ "agent", "o" }), NULL,
+			disable_intermediate) },
 	{ }
 };
 
 static const GDBusSignalTable thermometer_signals[] = {
-	{ "PropertyChanged",	"sv"	},
+	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
 
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 06/13] gdbus: use GDBusArgInfo to generate introspection
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (4 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 05/13] Convert GDBus methods to use macro helpers Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 07/13] gdbus: loop over args to check message signature Lucas De Marchi
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

By using GDBusArgInfo in methods and signals, the introspection
generation is much simpler and we can add each argument name.
---
 gdbus/object.c |   75 +++++++++++---------------------------------------------
 1 file changed, 14 insertions(+), 61 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 2ddc574..3ac6a0b 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -59,68 +59,20 @@ struct security_data {
 	void *iface_user_data;
 };
 
-static void print_arguments(GString *gstr, const char *sig,
+static void print_arguments(GString *gstr, const GDBusArgInfo *args,
 						const char *direction)
 {
-	int i;
-
-	for (i = 0; sig[i]; i++) {
-		char type[32];
-		int struct_level, dict_level;
-		unsigned int len;
-		gboolean complete;
-
-		complete = FALSE;
-		struct_level = dict_level = 0;
-
-		/* Gather enough data to have a single complete type */
-		for (len = 0; len < (sizeof(type) - 1) && sig[i]; len++, i++) {
-			switch (sig[i]) {
-			case '(':
-				struct_level++;
-				break;
-			case ')':
-				struct_level--;
-				if (struct_level <= 0 && dict_level <= 0)
-					complete = TRUE;
-				break;
-			case '{':
-				dict_level++;
-				break;
-			case '}':
-				dict_level--;
-				if (struct_level <= 0 && dict_level <= 0)
-					complete = TRUE;
-				break;
-			case 'a':
-				break;
-			default:
-				if (struct_level <= 0 && dict_level <= 0)
-					complete = TRUE;
-				break;
-			}
-
-			type[len] = sig[i];
-
-			if (complete)
-				break;
-		}
-
-		type[len + 1] = '\0';
-
-		if (!complete) {
-			error("Unexpected signature: %s", sig);
-			return;
-		}
+	for (; args && args->name; args++) {
+		g_string_append_printf(gstr,
+					"\t\t\t<arg name=\"%s\" type=\"%s\"",
+					args->name, args->signature);
 
 		if (direction)
 			g_string_append_printf(gstr,
-					"\t\t\t<arg type=\"%s\" direction=\"%s\"/>\n",
-					type, direction);
+					" direction=\"%s\"/>\n", direction);
 		else
-			g_string_append_printf(gstr,
-					"\t\t\t<arg type=\"%s\"/>\n",
-					type);
+			g_string_append_printf(gstr, "/>\n");
+
 	}
 }
 
@@ -130,26 +82,27 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 	const GDBusSignalTable *signal;
 
 	for (method = iface->methods; method && method->name; method++) {
-		if (!strlen(method->signature) && !strlen(method->reply))
+		if (!(method->in_args && method->in_args->name) &&
+				!(method->out_args && method->out_args->name))
 			g_string_append_printf(gstr, "\t\t<method name=\"%s\"/>\n",
 								method->name);
 		else {
 			g_string_append_printf(gstr, "\t\t<method name=\"%s\">\n",
 								method->name);
-			print_arguments(gstr, method->signature, "in");
-			print_arguments(gstr, method->reply, "out");
+			print_arguments(gstr, method->in_args, "in");
+			print_arguments(gstr, method->out_args, "out");
 			g_string_append_printf(gstr, "\t\t</method>\n");
 		}
 	}
 
 	for (signal = iface->signals; signal && signal->name; signal++) {
-		if (!strlen(signal->signature))
+		if (!(signal->args && signal->args->name))
 			g_string_append_printf(gstr, "\t\t<signal name=\"%s\"/>\n",
 								signal->name);
 		else {
 			g_string_append_printf(gstr, "\t\t<signal name=\"%s\">\n",
 								signal->name);
-			print_arguments(gstr, signal->signature, NULL);
+			print_arguments(gstr, signal->args, NULL);
 			g_string_append_printf(gstr, "\t\t</signal>\n");
 		}
 	}
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 07/13] gdbus: loop over args to check message signature
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (5 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 06/13] gdbus: use GDBusArgInfo to generate introspection Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 08/13] Do not set signature and reply in GDBus tables Lucas De Marchi
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

---
 gdbus/object.c |   34 +++++++++++++++++++++++++++-------
 1 file changed, 27 insertions(+), 7 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 3ac6a0b..b187bb5 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -374,6 +374,27 @@ static struct interface_data *find_interface(GSList *interfaces,
 	return NULL;
 }
 
+static gboolean g_dbus_args_have_signature(const GDBusArgInfo *args,
+							DBusMessage *message)
+{
+	const char *sig = dbus_message_get_signature(message);
+	const char *p = NULL;
+
+	for (; args && args->signature && *sig; args++) {
+		p = args->signature;
+
+		for (; *sig && *p; sig++, p++) {
+			if (*p != *sig)
+				return FALSE;
+		}
+	}
+
+	if (*sig || (p && *p) || (args && args->signature))
+		return FALSE;
+
+	return TRUE;
+}
+
 static DBusHandlerResult generic_message(DBusConnection *connection,
 					DBusMessage *message, void *user_data)
 {
@@ -394,8 +415,8 @@ static DBusHandlerResult generic_message(DBusConnection *connection,
 							method->name) == FALSE)
 			continue;
 
-		if (dbus_message_has_signature(message,
-						method->signature) == FALSE)
+		if (g_dbus_args_have_signature(method->in_args,
+							message) == FALSE)
 			continue;
 
 		if (check_privilege(connection, message, method,
@@ -552,7 +573,7 @@ static void object_path_unref(DBusConnection *connection, const char *path)
 
 static gboolean check_signal(DBusConnection *conn, const char *path,
 				const char *interface, const char *name,
-				const char **args)
+				const GDBusArgInfo **args)
 {
 	struct generic_data *data = NULL;
 	struct interface_data *iface;
@@ -575,7 +596,7 @@ static gboolean check_signal(DBusConnection *conn, const char *path,
 
 	for (signal = iface->signals; signal && signal->name; signal++) {
 		if (!strcmp(signal->name, name)) {
-			*args = signal->signature;
+			*args = signal->args;
 			break;
 		}
 	}
@@ -597,7 +618,7 @@ static dbus_bool_t emit_signal_valist(DBusConnection *conn,
 {
 	DBusMessage *signal;
 	dbus_bool_t ret;
-	const char *signature, *args;
+	const GDBusArgInfo *args;
 
 	if (!check_signal(conn, path, interface, name, &args))
 		return FALSE;
@@ -612,8 +633,7 @@ static dbus_bool_t emit_signal_valist(DBusConnection *conn,
 	if (!ret)
 		goto fail;
 
-	signature = dbus_message_get_signature(signal);
-	if (strcmp(args, signature) != 0) {
+	if (g_dbus_args_have_signature(args, signal) == FALSE) {
 		error("%s.%s: expected signature'%s' but got '%s'",
 				interface, name, args, signature);
 		ret = FALSE;
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 08/13] Do not set signature and reply in GDBus tables
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (6 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 07/13] gdbus: loop over args to check message signature Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 09/13] gdbus: remove signature and reply from tables Lucas De Marchi
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
---
 attrib/client.c           |   12 ++++++------
 audio/control.c           |   14 +++++++-------
 audio/device.c            |    8 ++++----
 audio/gateway.c           |   12 ++++++------
 audio/headset.c           |   46 ++++++++++++++++++++++-----------------------
 audio/media.c             |    8 ++++----
 audio/sink.c              |   18 +++++++++---------
 audio/source.c            |    8 ++++----
 audio/telephony-dummy.c   |   18 +++++++++---------
 audio/telephony-maemo5.c  |    2 +-
 audio/transport.c         |   10 +++++-----
 health/hdp.c              |   24 +++++++++++------------
 input/device.c            |    8 ++++----
 network/connection.c      |    8 ++++----
 network/server.c          |    4 ++--
 plugins/dbusoob.c         |    6 +++---
 plugins/service.c         |   10 +++++-----
 proximity/monitor.c       |    6 +++---
 proximity/reporter.c      |    4 ++--
 sap/sap-dummy.c           |    8 ++++----
 sap/server.c              |    6 +++---
 serial/port.c             |    6 +++---
 serial/proxy.c            |   18 +++++++++---------
 src/adapter.c             |   38 ++++++++++++++++++-------------------
 src/device.c              |   18 +++++++++---------
 src/manager.c             |   16 ++++++++--------
 thermometer/thermometer.c |   14 +++++++-------
 27 files changed, 175 insertions(+), 175 deletions(-)

diff --git a/attrib/client.c b/attrib/client.c
index df1496f..8fbc1cc 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -516,10 +516,10 @@ static DBusMessage *set_property(DBusConnection *conn,
 }
 
 static const GDBusMethodTable char_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			get_properties) },
-	{ _GDBUS_METHOD("SetProperty", "sv", "",
+	{ GDBUS_METHOD("SetProperty",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
 			set_property) },
 	{ }
@@ -1019,16 +1019,16 @@ static DBusMessage *prim_get_properties(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable prim_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("DiscoverCharacteristics", "", "ao",
+	{ GDBUS_ASYNC_METHOD("DiscoverCharacteristics",
 			NULL, GDBUS_ARGS({ "characteristics", "ao" }),
 			discover_char) },
-	{ _GDBUS_METHOD("RegisterCharacteristicsWatcher", "o", "",
+	{ GDBUS_METHOD("RegisterCharacteristicsWatcher",
 			GDBUS_ARGS({ "agent", "o" }), NULL,
 			register_watcher) },
-	{ _GDBUS_METHOD("UnregisterCharacteristicsWatcher", "o", "",
+	{ GDBUS_METHOD("UnregisterCharacteristicsWatcher",
 			GDBUS_ARGS({ "agent", "o" }), NULL,
 			unregister_watcher) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			prim_get_properties) },
 	{ }
diff --git a/audio/control.c b/audio/control.c
index 71c82eb..c5a6a58 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -198,21 +198,21 @@ static DBusMessage *control_get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable control_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("IsConnected", "", "b",
+	{ GDBUS_ASYNC_METHOD("IsConnected",
 				NULL, GDBUS_ARGS({ "connected", "b" }),
 				control_is_connected) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 				NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 				control_get_properties) },
-	{ _GDBUS_METHOD("VolumeUp", "", "", NULL, NULL, volume_up) },
-	{ _GDBUS_METHOD("VolumeDown", "", "", NULL, NULL, volume_down) },
+	{ GDBUS_METHOD("VolumeUp", NULL, NULL, volume_up) },
+	{ GDBUS_METHOD("VolumeDown", NULL, NULL, volume_down) },
 	{ }
 };
 
 static const GDBusSignalTable control_signals[] = {
-	{ _GDBUS_DEPRECATED_SIGNAL("Connected", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("Disconnected", "", NULL) },
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_DEPRECATED_SIGNAL("Connected", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("Disconnected", NULL) },
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/audio/device.c b/audio/device.c
index e4ee4e3..b7b993e 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -619,16 +619,16 @@ static DBusMessage *dev_get_properties(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable dev_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, dev_connect) },
-	{ _GDBUS_METHOD("Disconnect", "", "", NULL, NULL, dev_disconnect) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_ASYNC_METHOD("Connect", NULL, NULL, dev_connect) },
+	{ GDBUS_METHOD("Disconnect", NULL, NULL, dev_disconnect) },
+	{ GDBUS_METHOD("GetProperties",
 		NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 		dev_get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable dev_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/audio/gateway.c b/audio/gateway.c
index 0892036..dcc4f55 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -713,20 +713,20 @@ done:
 }
 
 static const GDBusMethodTable gateway_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, ag_connect) },
-	{ _GDBUS_ASYNC_METHOD("Disconnect", "", "", NULL, NULL, ag_disconnect) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_ASYNC_METHOD("Connect", NULL, NULL, ag_connect) },
+	{ GDBUS_ASYNC_METHOD("Disconnect", NULL, NULL, ag_disconnect) },
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			ag_get_properties) },
-	{ _GDBUS_METHOD("RegisterAgent", "o", "",
+	{ GDBUS_METHOD("RegisterAgent",
 			GDBUS_ARGS({ "agent", "o" }), NULL, register_agent) },
-	{ _GDBUS_METHOD("UnregisterAgent", "o", "",
+	{ GDBUS_METHOD("UnregisterAgent",
 			GDBUS_ARGS({ "agent", "o" }), NULL, unregister_agent) },
 	{ }
 };
 
 static const GDBusSignalTable gateway_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/audio/headset.c b/audio/headset.c
index 22a26bd..729e4dc 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -2058,51 +2058,51 @@ static DBusMessage *hs_set_property(DBusConnection *conn,
 }
 
 static const GDBusMethodTable headset_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, hs_connect) },
-	{ _GDBUS_METHOD("Disconnect", "", "", NULL, NULL, hs_disconnect) },
-	{ _GDBUS_METHOD("IsConnected", "", "b",
+	{ GDBUS_ASYNC_METHOD("Connect", NULL, NULL, hs_connect) },
+	{ GDBUS_METHOD("Disconnect", NULL, NULL, hs_disconnect) },
+	{ GDBUS_METHOD("IsConnected",
 			NULL, GDBUS_ARGS({ "connected", "b" }),
 			hs_is_connected) },
-	{ _GDBUS_METHOD("IndicateCall", "", "", NULL, NULL, hs_ring) },
-	{ _GDBUS_METHOD("CancelCall", "", "", NULL, NULL, hs_cancel_call) },
-	{ _GDBUS_DEPRECATED_ASYNC_METHOD("Play", "", "", NULL, NULL, hs_play) },
-	{ _GDBUS_METHOD("Stop", "", "", NULL, NULL, hs_stop) },
-	{ _GDBUS_DEPRECATED_METHOD("IsPlaying", "", "b",
+	{ GDBUS_METHOD("IndicateCall", NULL, NULL, hs_ring) },
+	{ GDBUS_METHOD("CancelCall", NULL, NULL, hs_cancel_call) },
+	{ GDBUS_DEPRECATED_ASYNC_METHOD("Play", NULL, NULL, hs_play) },
+	{ GDBUS_METHOD("Stop", NULL, NULL, hs_stop) },
+	{ GDBUS_DEPRECATED_METHOD("IsPlaying",
 					NULL, GDBUS_ARGS({ "playing", "b" }),
 					hs_is_playing) },
-	{ _GDBUS_DEPRECATED_METHOD("GetSpeakerGain", "", "q",
+	{ GDBUS_DEPRECATED_METHOD("GetSpeakerGain",
 					NULL, GDBUS_ARGS({ "gain", "q" }),
 					hs_get_speaker_gain) },
-	{ _GDBUS_DEPRECATED_METHOD("GetMicrophoneGain", "", "q",
+	{ GDBUS_DEPRECATED_METHOD("GetMicrophoneGain",
 					NULL, GDBUS_ARGS({ "gain", "q" }),
 					hs_get_mic_gain) },
-	{ _GDBUS_DEPRECATED_METHOD("SetSpeakerGain", "q", "",
+	{ GDBUS_DEPRECATED_METHOD("SetSpeakerGain",
 					GDBUS_ARGS({ "gain", "q" }), NULL,
 					hs_set_speaker_gain) },
-	{ _GDBUS_DEPRECATED_METHOD("SetMicrophoneGain", "q", "",
+	{ GDBUS_DEPRECATED_METHOD("SetMicrophoneGain",
 					GDBUS_ARGS({ "gain", "q" }), NULL,
 					hs_set_mic_gain) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			hs_get_properties) },
-	{ _GDBUS_METHOD("SetProperty", "sv", "",
+	{ GDBUS_METHOD("SetProperty",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
 			hs_set_property) },
 	{ }
 };
 
 static const GDBusSignalTable headset_signals[] = {
-	{ _GDBUS_DEPRECATED_SIGNAL("Connected", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("Disconnected", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("AnswerRequested", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("Stopped", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("Playing", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("SpeakerGainChanged", "q",
+	{ GDBUS_DEPRECATED_SIGNAL("Connected", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("Disconnected", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("AnswerRequested", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("Stopped", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("Playing", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("SpeakerGainChanged",
 						GDBUS_ARGS({ "gain", "q" })) },
-	{ _GDBUS_DEPRECATED_SIGNAL("MicrophoneGainChanged", "q",
+	{ GDBUS_DEPRECATED_SIGNAL("MicrophoneGainChanged",
 						GDBUS_ARGS({ "gain", "q" })) },
-	{ _GDBUS_SIGNAL("CallTerminated", "", NULL) },
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("CallTerminated", NULL) },
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/audio/media.c b/audio/media.c
index 0fbeb8a..3fe04d5 100644
--- a/audio/media.c
+++ b/audio/media.c
@@ -1791,16 +1791,16 @@ static DBusMessage *unregister_player(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable media_methods[] = {
-	{ _GDBUS_METHOD("RegisterEndpoint", "oa{sv}", "",
+	{ GDBUS_METHOD("RegisterEndpoint",
 		GDBUS_ARGS({ "endpoint", "o" }, { "properties", "a{sv}" }),
 		NULL, register_endpoint) },
-	{ _GDBUS_METHOD("UnregisterEndpoint", "o", "",
+	{ GDBUS_METHOD("UnregisterEndpoint",
 		GDBUS_ARGS({ "endpoint", "o" }), NULL, unregister_endpoint) },
-	{ _GDBUS_METHOD("RegisterPlayer", "oa{sv}a{sv}", "",
+	{ GDBUS_METHOD("RegisterPlayer",
 		GDBUS_ARGS({ "player", "o" }, { "properties", "a{sv}" },
 						{ "metadata", "a{sv}" }),
 		NULL, register_player) },
-	{ _GDBUS_METHOD("UnregisterPlayer", "o", "",
+	{ GDBUS_METHOD("UnregisterPlayer",
 		GDBUS_ARGS({ "player", "o" }), NULL, unregister_player) },
 	{ },
 };
diff --git a/audio/sink.c b/audio/sink.c
index f9b934b..6b21e47 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -556,23 +556,23 @@ static DBusMessage *sink_get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable sink_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, sink_connect) },
-	{ _GDBUS_ASYNC_METHOD("Disconnect", "", "", NULL, NULL, sink_disconnect) },
-	{ _GDBUS_DEPRECATED_METHOD("IsConnected", "", "b",
+	{ GDBUS_ASYNC_METHOD("Connect", NULL, NULL, sink_connect) },
+	{ GDBUS_ASYNC_METHOD("Disconnect", NULL, NULL, sink_disconnect) },
+	{ GDBUS_DEPRECATED_METHOD("IsConnected",
 			NULL, GDBUS_ARGS({ "connected", "b" }),
 			sink_is_connected) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 				NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 				sink_get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable sink_signals[] = {
-	{ _GDBUS_DEPRECATED_SIGNAL("Connected", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("Disconnected", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("Playing", "", NULL) },
-	{ _GDBUS_DEPRECATED_SIGNAL("Stopped", "", NULL) },
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_DEPRECATED_SIGNAL("Connected", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("Disconnected", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("Playing", NULL) },
+	{ GDBUS_DEPRECATED_SIGNAL("Stopped", NULL) },
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/audio/source.c b/audio/source.c
index 2724358..dbba5b9 100644
--- a/audio/source.c
+++ b/audio/source.c
@@ -477,16 +477,16 @@ static DBusMessage *source_get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable source_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Connect", "", "", NULL, NULL, source_connect) },
-	{ _GDBUS_ASYNC_METHOD("Disconnect", "", "", NULL, NULL, source_disconnect) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_ASYNC_METHOD("Connect", NULL, NULL, source_connect) },
+	{ GDBUS_ASYNC_METHOD("Disconnect", NULL, NULL, source_disconnect) },
+	{ GDBUS_METHOD("GetProperties",
 				NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 				source_get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable source_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c
index 0e488dc..2f89139 100644
--- a/audio/telephony-dummy.c
+++ b/audio/telephony-dummy.c
@@ -379,33 +379,33 @@ static DBusMessage *set_subscriber_number(DBusConnection *conn,
 }
 
 static const GDBusMethodTable dummy_methods[] = {
-	{ _GDBUS_METHOD("OutgoingCall", "s", "",
+	{ GDBUS_METHOD("OutgoingCall",
 			GDBUS_ARGS({ "number", "s" }), NULL,
 			outgoing_call) },
-	{ _GDBUS_METHOD("IncomingCall", "s", "",
+	{ GDBUS_METHOD("IncomingCall",
 			GDBUS_ARGS({ "number", "s" }), NULL,
 			incoming_call) },
-	{ _GDBUS_METHOD("CancelCall", "", "", NULL, NULL, cancel_call) },
-	{ _GDBUS_METHOD("SignalStrength", "u", "",
+	{ GDBUS_METHOD("CancelCall", NULL, NULL, cancel_call) },
+	{ GDBUS_METHOD("SignalStrength",
 			GDBUS_ARGS({ "strength", "u" }), NULL,
 			signal_strength) },
-	{ _GDBUS_METHOD("BatteryLevel", "u", "",
+	{ GDBUS_METHOD("BatteryLevel",
 			GDBUS_ARGS({ "level", "u" }), NULL,
 			battery_level) },
-	{ _GDBUS_METHOD("RoamingStatus", "b", "",
+	{ GDBUS_METHOD("RoamingStatus",
 			GDBUS_ARGS({ "roaming", "b" }), NULL,
 			roaming_status) },
-	{ _GDBUS_METHOD("RegistrationStatus", "b", "",
+	{ GDBUS_METHOD("RegistrationStatus",
 			GDBUS_ARGS({ "registration", "b" }), NULL,
 			registration_status) },
-	{ _GDBUS_METHOD("SetSubscriberNumber","s", "",
+	{ GDBUS_METHOD("SetSubscriberNumber",
 			GDBUS_ARGS({ "number", "s" }), NULL,
 			set_subscriber_number) },
 	{ }
 };
 
 static const GDBusSignalTable dummy_signals[] = {
-	{ _GDBUS_SIGNAL("VoiceDial", "", NULL) },
+	{ GDBUS_SIGNAL("VoiceDial", NULL) },
 	{ }
 };
 
diff --git a/audio/telephony-maemo5.c b/audio/telephony-maemo5.c
index a03ba09..8a00296 100644
--- a/audio/telephony-maemo5.c
+++ b/audio/telephony-maemo5.c
@@ -1952,7 +1952,7 @@ static DBusMessage *set_callerid(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable telephony_maemo_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("SetCallerId", "s", "",
+	{ GDBUS_ASYNC_METHOD("SetCallerId",
 				GDBUS_ARGS({ "id", "s" }), NULL,
 				set_callerid) },
 	{ }
diff --git a/audio/transport.c b/audio/transport.c
index f2a512a..753d4bf 100644
--- a/audio/transport.c
+++ b/audio/transport.c
@@ -915,25 +915,25 @@ static DBusMessage *get_properties(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable transport_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			get_properties) },
-	{ _GDBUS_ASYNC_METHOD("Acquire", "s", "hqq",
+	{ GDBUS_ASYNC_METHOD("Acquire",
 			GDBUS_ARGS({ "access_type", "s" }),
 			GDBUS_ARGS({ "fd", "h" }, { "mtu_r", "q" },
 							{ "mtu_w", "q" } ),
 			acquire) },
-	{ _GDBUS_ASYNC_METHOD("Release", "s", "",
+	{ GDBUS_ASYNC_METHOD("Release",
 			GDBUS_ARGS({ "access_type", "s" }), NULL,
 			release ) },
-	{ _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+	{ GDBUS_ASYNC_METHOD("SetProperty",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" }),
 			NULL, set_property) },
 	{ },
 };
 
 static const GDBusSignalTable transport_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/health/hdp.c b/health/hdp.c
index 6dabbff..2f04d2e 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -425,11 +425,11 @@ static void manager_path_unregister(gpointer data)
 }
 
 static const GDBusMethodTable health_manager_methods[] = {
-	{ _GDBUS_METHOD("CreateApplication", "a{sv}", "o",
+	{ GDBUS_METHOD("CreateApplication",
 			GDBUS_ARGS({ "config", "a{sv}" }),
 			GDBUS_ARGS({ "application", "o" }),
 			manager_create_application) },
-	{ _GDBUS_METHOD("DestroyApplication", "o", "",
+	{ GDBUS_METHOD("DestroyApplication",
 			GDBUS_ARGS({ "application", "o" }), NULL,
 			manager_destroy_application) },
 	{ }
@@ -737,13 +737,13 @@ end:
 }
 
 static const GDBusMethodTable health_channels_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			channel_get_properties) },
-	{ _GDBUS_ASYNC_METHOD("Acquire", "", "h",
+	{ GDBUS_ASYNC_METHOD("Acquire",
 			NULL, GDBUS_ARGS({ "fd", "h" }),
 			channel_acquire) },
-	{ _GDBUS_METHOD("Release", "", "", NULL, NULL, channel_release) },
+	{ GDBUS_METHOD("Release", NULL, NULL, channel_release) },
 	{ }
 };
 
@@ -2102,28 +2102,28 @@ static void health_device_destroy(void *data)
 }
 
 static const GDBusMethodTable health_device_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Echo", "", "b",
+	{ GDBUS_ASYNC_METHOD("Echo",
 			NULL, GDBUS_ARGS({ "value", "b" }), device_echo) },
-	{ _GDBUS_ASYNC_METHOD("CreateChannel", "os", "o",
+	{ GDBUS_ASYNC_METHOD("CreateChannel",
 			GDBUS_ARGS({ "application", "o" },
 					{ "configuration", "s" }),
 			GDBUS_ARGS({ "channel", "o" }),
 			device_create_channel) },
-	{ _GDBUS_ASYNC_METHOD("DestroyChannel", "o", "",
+	{ GDBUS_ASYNC_METHOD("DestroyChannel",
 			GDBUS_ARGS({ "channel", "o" }), NULL,
 			device_destroy_channel) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			device_get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable health_device_signals[] = {
-	{ _GDBUS_SIGNAL("ChannelConnected", "o",
+	{ GDBUS_SIGNAL("ChannelConnected",
 			GDBUS_ARGS({ "channel", "o" })) },
-	{ _GDBUS_SIGNAL("ChannelDeleted", "o",
+	{ GDBUS_SIGNAL("ChannelDeleted",
 			GDBUS_ARGS({ "channel", "o" })) },
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/input/device.c b/input/device.c
index ab38d80..77e77b3 100644
--- a/input/device.c
+++ b/input/device.c
@@ -1061,18 +1061,18 @@ static DBusMessage *input_device_get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable device_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Connect", "", "",
+	{ GDBUS_ASYNC_METHOD("Connect",
 				NULL, NULL, input_device_connect) },
-	{ _GDBUS_METHOD("Disconnect", "", "",
+	{ GDBUS_METHOD("Disconnect",
 				NULL, NULL, input_device_disconnect) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			input_device_get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable device_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/network/connection.c b/network/connection.c
index 4d0bb6c..544ec3a 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -553,18 +553,18 @@ static void path_unregister(void *data)
 }
 
 static const GDBusMethodTable connection_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Connect", "", "",
+	{ GDBUS_ASYNC_METHOD("Connect",
 			NULL, NULL, connection_connect) },
-	{ _GDBUS_METHOD("Disconnect", "", "",
+	{ GDBUS_METHOD("Disconnect",
 			NULL, NULL, connection_disconnect) },
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			connection_get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable connection_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/network/server.c b/network/server.c
index 2539df8..e39769a 100644
--- a/network/server.c
+++ b/network/server.c
@@ -686,10 +686,10 @@ static void path_unregister(void *data)
 }
 
 static const GDBusMethodTable server_methods[] = {
-	{ _GDBUS_METHOD("Register", "ss", "",
+	{ GDBUS_METHOD("Register",
 			GDBUS_ARGS({ "uuid", "s" }, { "bridge", "s" }), NULL,
 			register_server) },
-	{ _GDBUS_METHOD("Unregister", "s", "",
+	{ GDBUS_METHOD("Unregister",
 			GDBUS_ARGS({ "uuid", "s" }), NULL,
 			unregister_server) },
 	{ }
diff --git a/plugins/dbusoob.c b/plugins/dbusoob.c
index 0d7a6ff..1791342 100644
--- a/plugins/dbusoob.c
+++ b/plugins/dbusoob.c
@@ -176,14 +176,14 @@ static DBusMessage *remove_remote_data(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable oob_methods[] = {
-	{ _GDBUS_METHOD("AddRemoteData", "sayay", "",
+	{ GDBUS_METHOD("AddRemoteData",
 			GDBUS_ARGS({ "address", "s" }, { "hash", "ay" },
 					{ "randomizer", "ay" }), NULL,
 			add_remote_data) },
-	{ _GDBUS_METHOD("RemoveRemoteData", "s", "",
+	{ GDBUS_METHOD("RemoveRemoteData",
 			GDBUS_ARGS({ "address", "s" }), NULL,
 			remove_remote_data) },
-	{ _GDBUS_ASYNC_METHOD("ReadLocalData", "", "ayay",
+	{ GDBUS_ASYNC_METHOD("ReadLocalData",
 			NULL, GDBUS_ARGS({ "hash", "ay" },
 						{ "randomizer", "ay" }),
 			read_local_data) },
diff --git a/plugins/service.c b/plugins/service.c
index d03ef46..288f849 100644
--- a/plugins/service.c
+++ b/plugins/service.c
@@ -697,20 +697,20 @@ done:
 }
 
 static const GDBusMethodTable service_methods[] = {
-	{ _GDBUS_METHOD("AddRecord", "s", "u",
+	{ GDBUS_METHOD("AddRecord",
 		GDBUS_ARGS({ "record", "s" }),
 		GDBUS_ARGS({ "handle", "u" }),
 		add_service_record) },
-	{ _GDBUS_METHOD("UpdateRecord", "us", "",
+	{ GDBUS_METHOD("UpdateRecord",
 		GDBUS_ARGS({ "handle", "u" }, { "record", "s" }), NULL,
 		update_service_record) },
-	{ _GDBUS_METHOD("RemoveRecord", "u", "",
+	{ GDBUS_METHOD("RemoveRecord",
 		GDBUS_ARGS({ "handle", "u" }), NULL,
 		remove_service_record) },
-	{ _GDBUS_ASYNC_METHOD("RequestAuthorization","su", "",
+	{ GDBUS_ASYNC_METHOD("RequestAuthorization",
 		GDBUS_ARGS({ "address", "s" }, { "handle", "u"}), NULL,
 		request_authorization) },
-	{ _GDBUS_METHOD("CancelAuthorization", "", "",
+	{ GDBUS_METHOD("CancelAuthorization",
 		NULL, NULL, cancel_authorization) },
 	{ }
 };
diff --git a/proximity/monitor.c b/proximity/monitor.c
index 139cae7..98dbcd1 100644
--- a/proximity/monitor.c
+++ b/proximity/monitor.c
@@ -547,17 +547,17 @@ static DBusMessage *set_property(DBusConnection *conn,
 }
 
 static const GDBusMethodTable monitor_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			get_properties) },
-	{ _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+	{ GDBUS_ASYNC_METHOD("SetProperty",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
 			set_property) },
 	{ }
 };
 
 static const GDBusSignalTable monitor_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/proximity/reporter.c b/proximity/reporter.c
index d1a37a2..b9872ab 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
@@ -181,14 +181,14 @@ err:
 }
 
 static const GDBusMethodTable reporter_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			get_properties) },
 	{ }
 };
 
 static const GDBusSignalTable reporter_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/sap/sap-dummy.c b/sap/sap-dummy.c
index b273918..e2032cf 100644
--- a/sap/sap-dummy.c
+++ b/sap/sap-dummy.c
@@ -316,15 +316,15 @@ static DBusMessage *card_status(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable dummy_methods[] = {
-	{ _GDBUS_METHOD("OngoingCall", "b", "",
+	{ GDBUS_METHOD("OngoingCall",
 				GDBUS_ARGS({ "ongoing", "b" }), NULL,
 				ongoing_call) },
-	{ _GDBUS_METHOD("MaxMessageSize", "u", "",
+	{ GDBUS_METHOD("MaxMessageSize",
 				GDBUS_ARGS({ "size", "u" }), NULL,
 				max_msg_size) },
-	{ _GDBUS_METHOD("DisconnectImmediate", "", "", NULL, NULL,
+	{ GDBUS_METHOD("DisconnectImmediate", NULL, NULL,
 				disconnect_immediate) },
-	{ _GDBUS_METHOD("CardStatus", "u", "",
+	{ GDBUS_METHOD("CardStatus",
 				GDBUS_ARGS({ "status", "" }), NULL,
 				card_status) },
 	{ }
diff --git a/sap/server.c b/sap/server.c
index 342cd64..e44fa08 100644
--- a/sap/server.c
+++ b/sap/server.c
@@ -1304,15 +1304,15 @@ static DBusMessage *get_properties(DBusConnection *c,
 }
 
 static const GDBusMethodTable server_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			get_properties) },
-	{ _GDBUS_METHOD("Disconnect", "", "", NULL, NULL, disconnect) },
+	{ GDBUS_METHOD("Disconnect", NULL, NULL, disconnect) },
 	{ }
 };
 
 static const GDBusSignalTable server_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
diff --git a/serial/port.c b/serial/port.c
index 4ef3437..f288f90 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -568,13 +568,13 @@ static DBusMessage *port_disconnect(DBusConnection *conn,
 }
 
 static const GDBusMethodTable port_methods[] = {
-	{ _GDBUS_ASYNC_METHOD("Connect", "s", "s",
+	{ GDBUS_ASYNC_METHOD("Connect",
 		GDBUS_ARGS({ "pattern", "s" }),	GDBUS_ARGS({ "tty", "s" }),
 		port_connect) },
-	{ _GDBUS_ASYNC_METHOD("ConnectFD", "s", "h",
+	{ GDBUS_ASYNC_METHOD("ConnectFD",
 		GDBUS_ARGS({ "pattern", "s" }), GDBUS_ARGS({ "fd", "s" }),
 		port_connect) },
-	{ _GDBUS_METHOD("Disconnect", "s", "",
+	{ GDBUS_METHOD("Disconnect",
 		GDBUS_ARGS({ "device", "s" }), NULL,
 		port_disconnect) },
 	{ }
diff --git a/serial/proxy.c b/serial/proxy.c
index a2a9088..dd38317 100644
--- a/serial/proxy.c
+++ b/serial/proxy.c
@@ -729,12 +729,12 @@ static DBusMessage *proxy_set_serial_params(DBusConnection *conn,
 }
 
 static const GDBusMethodTable proxy_methods[] = {
-	{ _GDBUS_METHOD("Enable", "", "", NULL, NULL, proxy_enable) },
-	{ _GDBUS_METHOD("Disable", "", "", NULL, NULL, proxy_disable) },
-	{ _GDBUS_METHOD("GetInfo", "", "a{sv}",
+	{ GDBUS_METHOD("Enable", NULL, NULL, proxy_enable) },
+	{ GDBUS_METHOD("Disable", NULL, NULL, proxy_disable) },
+	{ GDBUS_METHOD("GetInfo",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			proxy_get_info) },
-	{ _GDBUS_METHOD("SetSerialParameters", "syys", "",
+	{ GDBUS_METHOD("SetSerialParameters",
 			GDBUS_ARGS({ "rate", "s" }, { "data", "y" },
 					{ "stop", "y" }, { "parity", "s" }),
 			NULL, proxy_set_serial_params) },
@@ -1117,23 +1117,23 @@ static void manager_path_unregister(void *data)
 }
 
 static const GDBusMethodTable manager_methods[] = {
-	{ _GDBUS_METHOD("CreateProxy", "ss", "s",
+	{ GDBUS_METHOD("CreateProxy",
 			GDBUS_ARGS({ "pattern", "s" },
 					{ "address", "s" }),
 			GDBUS_ARGS({ "path", "s" }),
 			create_proxy) },
-	{ _GDBUS_METHOD("ListProxies", "", "as",
+	{ GDBUS_METHOD("ListProxies",
 			NULL, GDBUS_ARGS({ "paths", "as" }),
 			list_proxies) },
-	{ _GDBUS_METHOD("RemoveProxy", "s", "",
+	{ GDBUS_METHOD("RemoveProxy",
 			GDBUS_ARGS({ "path", "s" }), NULL,
 			remove_proxy) },
 	{ },
 };
 
 static const GDBusSignalTable manager_signals[] = {
-	{ _GDBUS_SIGNAL("ProxyCreated", "s", GDBUS_ARGS({ "path", "s" })) },
-	{ _GDBUS_SIGNAL("ProxyRemoved", "s", GDBUS_ARGS({ "path", "s" })) },
+	{ GDBUS_SIGNAL("ProxyCreated", GDBUS_ARGS({ "path", "s" })) },
+	{ GDBUS_SIGNAL("ProxyRemoved", GDBUS_ARGS({ "path", "s" })) },
 	{ }
 };
 
diff --git a/src/adapter.c b/src/adapter.c
index d87406d..e2e466d 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1656,63 +1656,63 @@ static DBusMessage *unregister_agent(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable adapter_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			get_properties) },
-	{ _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+	{ GDBUS_ASYNC_METHOD("SetProperty",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
 			set_property) },
-	{ _GDBUS_ASYNC_METHOD("RequestSession", "", "", NULL, NULL,
+	{ GDBUS_ASYNC_METHOD("RequestSession", NULL, NULL,
 			request_session) },
-	{ _GDBUS_METHOD("ReleaseSession", "", "", NULL, NULL,
+	{ GDBUS_METHOD("ReleaseSession", NULL, NULL,
 			release_session) },
-	{ _GDBUS_METHOD("StartDiscovery", "", "", NULL, NULL,
+	{ GDBUS_METHOD("StartDiscovery", NULL, NULL,
 			adapter_start_discovery) },
-	{ _GDBUS_ASYNC_METHOD("StopDiscovery", "", "", NULL, NULL,
+	{ GDBUS_ASYNC_METHOD("StopDiscovery", NULL, NULL,
 			adapter_stop_discovery) },
-	{ _GDBUS_DEPRECATED_METHOD("ListDevices", "", "ao",
+	{ GDBUS_DEPRECATED_METHOD("ListDevices",
 			NULL, GDBUS_ARGS({ "devices", "ao" }),
 			list_devices) },
-	{ _GDBUS_ASYNC_METHOD("CreateDevice", "s", "o",
+	{ GDBUS_ASYNC_METHOD("CreateDevice",
 			GDBUS_ARGS({ "address", "s" }),
 			GDBUS_ARGS({ "device", "o" }),
 			create_device) },
-	{ _GDBUS_ASYNC_METHOD("CreatePairedDevice", "sos", "o",
+	{ GDBUS_ASYNC_METHOD("CreatePairedDevice",
 			GDBUS_ARGS({ "address", "s" }, { "agent", "o" },
 							{ "capability", "s" }),
 			GDBUS_ARGS({ "device", "o" }),
 			create_paired_device) },
-	{ _GDBUS_ASYNC_METHOD("CancelDeviceCreation", "s", "",
+	{ GDBUS_ASYNC_METHOD("CancelDeviceCreation",
 			GDBUS_ARGS({ "address", "s" }), NULL,
 			cancel_device_creation) },
-	{ _GDBUS_ASYNC_METHOD("RemoveDevice", "o", "",
+	{ GDBUS_ASYNC_METHOD("RemoveDevice",
 			GDBUS_ARGS({ "device", "o" }), NULL,
 			remove_device) },
-	{ _GDBUS_METHOD("FindDevice", "s", "o",
+	{ GDBUS_METHOD("FindDevice",
 			GDBUS_ARGS({ "address", "s" }),
 			GDBUS_ARGS({ "device", "o" }),
 			find_device) },
-	{ _GDBUS_METHOD("RegisterAgent", "os", "",
+	{ GDBUS_METHOD("RegisterAgent",
 			GDBUS_ARGS({ "agent", "o" },
 					{ "capability", "s" }), NULL,
 			register_agent) },
-	{ _GDBUS_METHOD("UnregisterAgent", "o", "",
+	{ GDBUS_METHOD("UnregisterAgent",
 			GDBUS_ARGS({ "agent", "o" }), NULL,
 			unregister_agent) },
 	{ }
 };
 
 static const GDBusSignalTable adapter_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
-	{ _GDBUS_SIGNAL("DeviceCreated", "o",
+	{ GDBUS_SIGNAL("DeviceCreated",
 			GDBUS_ARGS({ "device", "o" })) },
-	{ _GDBUS_SIGNAL("DeviceRemoved", "o",
+	{ GDBUS_SIGNAL("DeviceRemoved",
 			GDBUS_ARGS({ "device", "o" })) },
-	{ _GDBUS_SIGNAL("DeviceFound", "sa{sv}",
+	{ GDBUS_SIGNAL("DeviceFound",
 			GDBUS_ARGS({ "address", "s" },
 						{ "values", "a{sv}" })) },
-	{ _GDBUS_SIGNAL("DeviceDisappeared", "s",
+	{ GDBUS_SIGNAL("DeviceDisappeared",
 			GDBUS_ARGS({ "address", "s" })) },
 	{ }
 };
diff --git a/src/device.c b/src/device.c
index 2dc60e2..2695b16 100644
--- a/src/device.c
+++ b/src/device.c
@@ -878,25 +878,25 @@ static DBusMessage *disconnect(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable device_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
-			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
-			get_properties) },
-	{ _GDBUS_METHOD("SetProperty", "sv", "",
+	{ GDBUS_METHOD("GetProperties",
+				NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+				get_properties) },
+	{ GDBUS_METHOD("SetProperty",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
 			set_property) },
-	{ _GDBUS_ASYNC_METHOD("DiscoverServices", "s", "a{us}",
+	{ GDBUS_ASYNC_METHOD("DiscoverServices",
 			GDBUS_ARGS({ "pattern", "s" }),
 			GDBUS_ARGS({ "services", "a{us}" }),
 			discover_services) },
-	{ _GDBUS_METHOD("CancelDiscovery", "", "", NULL, NULL, cancel_discover) },
-	{ _GDBUS_ASYNC_METHOD("Disconnect", "", "", NULL, NULL, disconnect) },
+	{ GDBUS_METHOD("CancelDiscovery", NULL, NULL, cancel_discover) },
+	{ GDBUS_ASYNC_METHOD("Disconnect", NULL, NULL, disconnect) },
 	{ }
 };
 
 static const GDBusSignalTable device_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
-	{ _GDBUS_SIGNAL("DisconnectRequested", "", NULL) },
+	{ GDBUS_SIGNAL("DisconnectRequested", NULL) },
 	{ }
 };
 
diff --git a/src/manager.c b/src/manager.c
index 42c1a65..385354d 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -197,30 +197,30 @@ static DBusMessage *get_properties(DBusConnection *conn,
 }
 
 static const GDBusMethodTable manager_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			get_properties) },
-	{ _GDBUS_METHOD("DefaultAdapter", "", "o",
+	{ GDBUS_METHOD("DefaultAdapter",
 			NULL, GDBUS_ARGS({ "adapter", "o" }),
 			default_adapter) },
-	{ _GDBUS_METHOD("FindAdapter", "s", "o",
+	{ GDBUS_METHOD("FindAdapter",
 			GDBUS_ARGS({ "pattern", "s" }),
 			GDBUS_ARGS({ "adapter", "o" }),
 			find_adapter) },
-	{ _GDBUS_ASYNC_METHOD("ListAdapters", "", "ao",
+	{ GDBUS_ASYNC_METHOD("ListAdapters",
 			NULL, GDBUS_ARGS({ "adapters", "ao" }),
 			list_adapters) },
 	{ }
 };
 
 static const GDBusSignalTable manager_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
-	{ _GDBUS_SIGNAL("AdapterAdded", "o",
+	{ GDBUS_SIGNAL("AdapterAdded",
 			GDBUS_ARGS({ "adapter", "o" })) },
-	{ _GDBUS_SIGNAL("AdapterRemoved", "o",
+	{ GDBUS_SIGNAL("AdapterRemoved",
 			GDBUS_ARGS({ "adapter", "o" })) },
-	{ _GDBUS_SIGNAL("DefaultAdapterChanged", "o",
+	{ GDBUS_SIGNAL("DefaultAdapterChanged",
 			GDBUS_ARGS({ "adapter", "o" })) },
 	{ }
 };
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index 4256f14..7ffd401 100644
--- a/thermometer/thermometer.c
+++ b/thermometer/thermometer.c
@@ -960,29 +960,29 @@ static DBusMessage *disable_intermediate(DBusConnection *conn, DBusMessage *msg,
 }
 
 static const GDBusMethodTable thermometer_methods[] = {
-	{ _GDBUS_METHOD("GetProperties", "", "a{sv}",
+	{ GDBUS_METHOD("GetProperties",
 			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
 			get_properties) },
-	{ _GDBUS_ASYNC_METHOD("SetProperty", "sv", "",
+	{ GDBUS_ASYNC_METHOD("SetProperty",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL,
 			set_property) },
-	{ _GDBUS_METHOD("RegisterWatcher", "o", "",
+	{ GDBUS_METHOD("RegisterWatcher",
 			GDBUS_ARGS({ "agent", "o" }), NULL,
 			register_watcher) },
-	{ _GDBUS_METHOD("UnregisterWatcher", "o", "",
+	{ GDBUS_METHOD("UnregisterWatcher",
 			GDBUS_ARGS({ "agent", "o" }), NULL,
 			unregister_watcher) },
-	{ _GDBUS_METHOD("EnableIntermediateMeasurement", "o", "",
+	{ GDBUS_METHOD("EnableIntermediateMeasurement",
 			GDBUS_ARGS({ "agent", "o" }), NULL,
 			enable_intermediate) },
-	{ _GDBUS_METHOD("DisableIntermediateMeasurement","o", "",
+	{ GDBUS_METHOD("DisableIntermediateMeasurement",
 			GDBUS_ARGS({ "agent", "o" }), NULL,
 			disable_intermediate) },
 	{ }
 };
 
 static const GDBusSignalTable thermometer_signals[] = {
-	{ _GDBUS_SIGNAL("PropertyChanged", "sv",
+	{ GDBUS_SIGNAL("PropertyChanged",
 			GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
 	{ }
 };
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 09/13] gdbus: remove signature and reply from tables
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (7 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 08/13] Do not set signature and reply in GDBus tables Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 10/13] gdbus: add Deprecated annotation in introspection Lucas De Marchi
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

---
 gdbus/gdbus.h  |   51 ---------------------------------------------------
 gdbus/object.c |    2 +-
 2 files changed, 1 insertion(+), 52 deletions(-)

diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index 8354633..e2e160d 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -89,8 +89,6 @@ typedef struct {
 
 typedef struct {
 	const char *name;
-	const char *signature;
-	const char *reply;
 	GDBusMethodFunction function;
 	GDBusMethodFlags flags;
 	unsigned int privilege;
@@ -100,7 +98,6 @@ typedef struct {
 
 typedef struct {
 	const char *name;
-	const char *signature;
 	GDBusSignalFlags flags;
 	const GDBusArgInfo *args;
 } GDBusSignalTable;
@@ -120,54 +117,6 @@ typedef struct {
 
 #define GDBUS_ARGS(args...) (const GDBusArgInfo[]) { args, { } }
 
-#define _GDBUS_METHOD(_name, _signature, _reply, _in_args, _out_args, _function) \
-	.name = _name, \
-	.signature = _signature, \
-	.reply = _reply, \
-	.in_args = _in_args, \
-	.out_args = _out_args, \
-	.function = _function
-
-#define _GDBUS_ASYNC_METHOD(_name, _signature, _reply, _in_args, _out_args, _function) \
-	.name = _name, \
-	.signature = _signature, \
-	.reply = _reply, \
-	.in_args = _in_args, \
-	.out_args = _out_args, \
-	.function = _function, \
-	.flags = G_DBUS_METHOD_FLAG_ASYNC
-
-#define _GDBUS_DEPRECATED_METHOD(_name, _signature, _reply, _in_args, _out_args, _function) \
-	.name = _name, \
-	.signature = _signature, \
-	.reply = _reply, \
-	.in_args = _in_args, \
-	.out_args = _out_args, \
-	.function = _function, \
-	.flags = G_DBUS_METHOD_FLAG_DEPRECATED
-
-#define _GDBUS_DEPRECATED_ASYNC_METHOD(_name, _signature, _reply, _in_args, _out_args, _function) \
-	.name = _name, \
-	.signature = _signature, \
-	.reply = _reply, \
-	.in_args = _in_args, \
-	.out_args = _out_args, \
-	.function = _function, \
-	.flags = G_DBUS_METHOD_FLAG_ASYNC | G_DBUS_METHOD_FLAG_DEPRECATED
-
-#define _GDBUS_SIGNAL(_name, _signature, _args) \
-	.name = _name, \
-	.signature = _signature, \
-	.args = _args
-
-#define _GDBUS_DEPRECATED_SIGNAL(_name, _signature, _args) \
-	.name = _name, \
-	.signature = _signature, \
-	.args = _args, \
-	.flags = G_DBUS_SIGNAL_FLAG_DEPRECATED
-
-/* Helpers with no signature and reply */
-
 #define GDBUS_METHOD(_name, _in_args, _out_args, _function) \
 	.name = _name, \
 	.in_args = _in_args, \
diff --git a/gdbus/object.c b/gdbus/object.c
index b187bb5..fcdd6ec 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -471,7 +471,7 @@ done:
 }
 
 static const GDBusMethodTable introspect_methods[] = {
-	{ _GDBUS_METHOD("Introspect", "", "s", NULL,
+	{ GDBUS_METHOD("Introspect", NULL,
 			GDBUS_ARGS({ "xml", "s" }), introspect) },
 	{ }
 };
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 10/13] gdbus: add Deprecated annotation in introspection
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (8 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 09/13] gdbus: remove signature and reply from tables Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 11/13] gdbus: add Method.NoReply " Lucas De Marchi
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

---
 gdbus/object.c |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index fcdd6ec..95947f3 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -82,7 +82,11 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 	const GDBusSignalTable *signal;
 
 	for (method = iface->methods; method && method->name; method++) {
-		if (!(method->in_args && method->in_args->name) &&
+		gboolean deprecated = method->flags &
+						G_DBUS_METHOD_FLAG_DEPRECATED;
+
+		if (!deprecated &&
+				!(method->in_args && method->in_args->name) &&
 				!(method->out_args && method->out_args->name))
 			g_string_append_printf(gstr, "\t\t<method name=\"%s\"/>\n",
 								method->name);
@@ -91,18 +95,29 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 								method->name);
 			print_arguments(gstr, method->in_args, "in");
 			print_arguments(gstr, method->out_args, "out");
+
+			if (deprecated)
+				g_string_append_printf(gstr, "\t\t\t<annotation name=\"org.freedesktop.DBus.Deprecated\" value=\"true\"/>\n");
+
 			g_string_append_printf(gstr, "\t\t</method>\n");
 		}
 	}
 
 	for (signal = iface->signals; signal && signal->name; signal++) {
-		if (!(signal->args && signal->args->name))
+		gboolean deprecated = signal->flags &
+						G_DBUS_SIGNAL_FLAG_DEPRECATED;
+
+		if (!deprecated && !(signal->args && signal->args->name))
 			g_string_append_printf(gstr, "\t\t<signal name=\"%s\"/>\n",
 								signal->name);
 		else {
 			g_string_append_printf(gstr, "\t\t<signal name=\"%s\">\n",
 								signal->name);
 			print_arguments(gstr, signal->args, NULL);
+
+			if (deprecated)
+				g_string_append_printf(gstr, "\t\t\t<annotation name=\"org.freedesktop.DBus.Deprecated\" value=\"true\"/>\n");
+
 			g_string_append_printf(gstr, "\t\t</signal>\n");
 		}
 	}
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 11/13] gdbus: add Method.NoReply annotation in introspection
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (9 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 10/13] gdbus: add Deprecated annotation in introspection Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 12/13] gdbus: do not check signature twice Lucas De Marchi
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

---
 gdbus/object.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 95947f3..dacbe58 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -84,8 +84,10 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 	for (method = iface->methods; method && method->name; method++) {
 		gboolean deprecated = method->flags &
 						G_DBUS_METHOD_FLAG_DEPRECATED;
+		gboolean noreply = method->flags &
+						G_DBUS_METHOD_FLAG_NOREPLY;
 
-		if (!deprecated &&
+		if (!deprecated && !noreply &&
 				!(method->in_args && method->in_args->name) &&
 				!(method->out_args && method->out_args->name))
 			g_string_append_printf(gstr, "\t\t<method name=\"%s\"/>\n",
@@ -99,6 +101,9 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 			if (deprecated)
 				g_string_append_printf(gstr, "\t\t\t<annotation name=\"org.freedesktop.DBus.Deprecated\" value=\"true\"/>\n");
 
+			if (noreply)
+				g_string_append_printf(gstr, "\t\t\t<annotation name=\"org.freedesktop.DBus.Method.NoReply\" value=\"true\"/>\n");
+
 			g_string_append_printf(gstr, "\t\t</method>\n");
 		}
 	}
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 12/13] gdbus: do not check signature twice
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (10 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 11/13] gdbus: add Method.NoReply " Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 13/13] adapter: " Lucas De Marchi
  2012-05-18  3:37 ` [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Marcel Holtmann
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

Message signature is already checked in generic_message(), so there's no
need to check again in the callback.
---
 gdbus/object.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index dacbe58..2dd7c0e 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -174,11 +174,6 @@ static DBusMessage *introspect(DBusConnection *connection,
 	struct generic_data *data = user_data;
 	DBusMessage *reply;
 
-	if (!dbus_message_has_signature(message, DBUS_TYPE_INVALID_AS_STRING)) {
-		error("Unexpected signature to introspect call");
-		return NULL;
-	}
-
 	if (data->introspect == NULL)
 		generate_introspection_xml(connection, data,
 						dbus_message_get_path(message));
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH RESEND BlueZ v6 13/13] adapter: do not check signature twice
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (11 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 12/13] gdbus: do not check signature twice Lucas De Marchi
@ 2012-05-18  3:23 ` Lucas De Marchi
  2012-05-18  3:37 ` [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Marcel Holtmann
  13 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2012-05-18  3:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

Message signature is already checked in generic_message(), so there's no
need to check again in the callback.
---
 src/adapter.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index e2e466d..dafe595 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1317,9 +1317,6 @@ static DBusMessage *list_devices(DBusConnection *conn,
 	DBusMessageIter array_iter;
 	const gchar *dev_path;
 
-	if (!dbus_message_has_signature(msg, DBUS_TYPE_INVALID_AS_STRING))
-		return btd_error_invalid_args(msg);
-
 	reply = dbus_message_new_method_return(msg);
 	if (!reply)
 		return NULL;
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection
  2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
                   ` (12 preceding siblings ...)
  2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 13/13] adapter: " Lucas De Marchi
@ 2012-05-18  3:37 ` Marcel Holtmann
  13 siblings, 0 replies; 15+ messages in thread
From: Marcel Holtmann @ 2012-05-18  3:37 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth

Hi Lucas,

> The last time "Constify GDBus method tables" was mixing gdbus/ with the other
> patches. Since the gdbus/ part was already applied, just rebase on top of is
> already there.

all 13 patches have been applied.

Regards

Marcel



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-05-18  3:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18  3:23 [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 01/13] Constify GDBus method tables Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 02/13] Constify GDBus signal tables Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 03/13] gdbus: add argument info to methods and signals Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 04/13] gdbus: add and use helpers for table declarations Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 05/13] Convert GDBus methods to use macro helpers Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 06/13] gdbus: use GDBusArgInfo to generate introspection Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 07/13] gdbus: loop over args to check message signature Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 08/13] Do not set signature and reply in GDBus tables Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 09/13] gdbus: remove signature and reply from tables Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 10/13] gdbus: add Deprecated annotation in introspection Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 11/13] gdbus: add Method.NoReply " Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 12/13] gdbus: do not check signature twice Lucas De Marchi
2012-05-18  3:23 ` [PATCH RESEND BlueZ v6 13/13] adapter: " Lucas De Marchi
2012-05-18  3:37 ` [PATCH RESEND BlueZ v6 00/13] Better D-Bus introspection Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.