[Telepathy] tp_cli_connection_manager_run_request_connection(): What parameter types.

Will Thompson will.thompson at collabora.co.uk
Wed Oct 29 04:20:32 PDT 2008

On 29/10/08 10:07, Murray Cumming wrote:
> By the way, I think that documentation should explicitly mention 
> so people don't think that it's talking about a GObject signal.

This applies to all of the tp_cli_* documentation, since this API is all
generated directly from the D-Bus specification. So maybe the top of
each such DevHelp page of documentation should say "Note: documentation
for tp_cli_* refers to D-Bus methods and signals wrapped with this
auto-generated C API" or something?

(Of course, the Connection documentation includes some convenience API
as well as auto-generated API…)

> However, I tried this, and I just get 
> StatusChanged(Connecting, Requested),
> StatusChanged(Disconnecting, Requested)

That's because your example was calling Connect(), then immediately
calling Disconnect(). So, it had indeed requested the status change to
Disconnected. :-)

I took the liberty of refactoring the example to be fully event-driven.
So now:

    * On start-up, it calls RequestConnection, then starts the mainloop.
    * When RequestConnection returns, it connects to StatusChanged
      signals from that connection, then calls Connect.
    * When StatusChanged fires, it prints a debug message, and:
          o if the new status is Connected, calls Disconnect;
          o if the new status is Disconnected, calls g_main_loop_quit to
            end the program.

This has the desired result with the given (invalid) credentials, and
works correctly (that is: connects successfully and then immediately
disconnects) with valid credentials.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/telepathy/attachments/20081029/1ed9783b/attachment.pgp 

More information about the Telepathy mailing list