[Telepathy] tp_cli_connection_manager_run_request_connection(): What parameter types.
Murray Cumming
murrayc at murrayc.com
Fri Oct 31 03:23:28 PDT 2008
On Wed, 2008-10-29 at 11:20 +0000, Will Thompson wrote:
> > 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. :-)
Duh.
> I took the liberty of refactoring the example to be fully event-driven.
Many thanks for taking the time.
> 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.
--
murrayc at murrayc.com
www.murrayc.com
www.openismus.com
More information about the Telepathy
mailing list