GDBusConnection.call(): add 'reply_type' argument
authorRyan Lortie <desrt@desrt.ca>
Mon, 24 May 2010 20:46:24 +0000 (16:46 -0400)
committerRyan Lortie <desrt@desrt.ca>
Mon, 24 May 2010 21:00:04 +0000 (17:00 -0400)
commit3160bcad6a0cf3c1f1042b85f38492a5674324a3
tree27b976733fa4a3b20dcd6a9f17e2a6a10599ea85
parent100df5287d51fd005d64f2c06f4fe4276da1c4d8
GDBusConnection.call(): add 'reply_type' argument

This allows the caller to specify the reply type that they are expecting
for this call.  If the reply comes back with the wrong type, GDBus will
generate an appropriate error internally.

  - add a GVariantType * argument to g_dbus_connection_call() and
    _call_sync().

  - move the internal API for computing message types from introspection
    data to be based on GVariantType instead of strings.  Update users
    of this code.

  - have GDBusProxy pass this calculated GVariantType into
    g_dbus_connection_call().  Remove the checks done in GDBusProxy.

  - Update other users of the code (test cases, gdbus-tool, GSettings
    tool, etc).  In some cases, remove redundant checks; in some other
    cases, we are fixing bugs because no checking was done where it
    should have been.

Closes bug #619391.
15 files changed:
gio/gdbus-tool.c
gio/gdbusconnection.c
gio/gdbusconnection.h
gio/gdbusmethodinvocation.c
gio/gdbusnameowning.c
gio/gdbusnamewatching.c
gio/gdbusprivate.c
gio/gdbusprivate.h
gio/gdbusproxy.c
gio/gsettings-tool.c
gio/tests/gdbus-connection.c
gio/tests/gdbus-example-peer.c
gio/tests/gdbus-export.c
gio/tests/gdbus-names.c
gio/tests/gdbus-threading.c