The tp_cli_*_call_* methods are currently async, except that if the TpProxy doesn't have the interface, the callback is called in a re-entrant way (before the function returns). This means we have to jump through hoops to use these functions with GAsyncResult (Bug #45514).
In next, we should just make these functions properly async.
Created attachment 58034 [details] [review]
[master] Rewrite unsupported-interface to be suitable for the 'next' branch
TpDBusDaemon doesn't have optionally-supported interfaces after the
removal of Telepathy Properties, so we have to use TpConnection.
I took the opportunity to modernize the test and use GTest.
(In reply to comment #1)
> [master] Rewrite unsupported-interface to be suitable for the 'next' branch
Not shown here: the merge into next, which consists of ignoring the changes already made on next, taking the file from master in its entirety, and adding #include "telepathy-glib/reentrants.h".
Created attachment 58035 [details] [review]
[next 1/2] TpProxy codegen: always invoke the method via invoke_callback
Created attachment 58036 [details] [review]
[next 2/2] Always call TpProxy async method callbacks in an idle
Previously, we made a re-entrant call to the callback if the TpProxy
didn't have the interface. Having a method that is "sometimes async"
is bad, though: we should follow the GAsyncResult pattern, and have
the method return be always-async. In particular, this means we can
safely complete a GAsyncResult from the callback, without doing an
Okay these look good.
Thanks, fixed in next. (unsupported-interface test: 0.17.6.)