[next] telepathy-glib: TpProxy: rewrite async and reentrant calls
Simon McVittie
smcv at kemper.freedesktop.org
Thu Mar 27 08:42:05 PDT 2014
Module: telepathy-glib
Branch: next
Commit: a31b0195cb9562bbedf4989b5f19b76a4b35521e
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=a31b0195cb9562bbedf4989b5f19b76a4b35521e
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Fri Mar 14 19:25:13 2014 +0000
TpProxy: rewrite async and reentrant calls
An outline of the significant differences:
* the old code used DBusGProxy, but the new code does not need a proxy
object of any sort, simplifying life-cycles
* the new code does not need to jump through hoops to push the reply
into an idle unless it is responding with an immediate error, because
GDBus always replies in an idle anyway
* old GValueArray replaced by new GVariant
* TpProxyInvokeFunc freed its GError or GValueArray argument,
TpProxyWrapperFunc does not
* the old codegen had to do the actual dbus-glib call itself because
dbus-glib's API was varargs, whereas the new codegen can rely on
tp_proxy_pending_call_v1_new() to do that on its behalf (reducing
API surface area, taking responsibility away from generated code,
and giving that responsibility to hand-written code)
* the old codegen had to generate a callback for dbus-glib to call
back into, whereas the new code can share one callback between
all possible calls
* the deprecated reentrant calls in the old codegen were open-coded,
whereas the new codegen produces a simple wrapper around the async
version
---
.../telepathy-glib/telepathy-glib-sections.txt | 6 +-
telepathy-glib/cli-channel.c | 1 +
telepathy-glib/cli-connection.c | 1 +
telepathy-glib/cli-misc.c | 1 +
telepathy-glib/core-proxy.c | 44 +-
telepathy-glib/proxy-internal.h | 36 +-
telepathy-glib/proxy-methods.c | 541 ++++++--------------
telepathy-glib/proxy-subclass.h | 19 +-
tools/glib-client-gen.py | 314 ++++--------
9 files changed, 289 insertions(+), 674 deletions(-)
Diff: http://cgit.freedesktop.org/telepathy/telepathy-glib/diff/?id=a31b0195cb9562bbedf4989b5f19b76a4b35521e
More information about the telepathy-commits
mailing list