Hi guys,

As announced in a previous mail, I'm working on integrating Telepathy in
Wormux.

My idea is to add an *optional* dependency on telepathy-glib. If tp-glib
is detected during ./configure Telepathy features are enabled.

All the TP related files would live in a src/telepathy/ directory which
would be build only if TP is enabled.

The main component is a singleton Telepathy object. This object would be
instantiated at startup and provide the following service:

- Start a thread to run a GMainloop. telepathy-glib needs a Glib main
loop to work properly. As it's not easy to hook one in Wormux's internal
loops, the best solution is to run it in a thread.

- Handle incoming wormux tubes. Once a tube has been approved by the
user, it has to be handled. Basically that means connecting the Wormux
client to the tube's socket and display the network menu. This lead me
to my first question. What's the best way to do that? This can be called
at any point (while being in menus or in a game) so I'm not sure about
the best way to hook that in the code. Suggestions are welcome.

- Track contacts supporting wormux. These contacts will be used to
create the contact chooser widget.

- Offer API to create the contact chooser. This function would be used
by the network menu to display the list of potential contacts to invite.

- Offer API to offer a tube to a contact. Once chosen, this function
would be called to actually offer the Telepathy tube to the contact.

- We should have some way to display feedback to the user: "Invitation
sent to Alice" / "Alice accepted/rejected the invitation", etc.
I'm not sure what's the best way to do that. Maybe passing the chat
widget to the Telepathy module when offering a tube so it can used it
directly to display feedback?


Does this design make sense to you? The advantage of having a singleton
as a single TP entry point is to reduce the number of #ifdef TELEPATHY.
We'll have one only when initialising wormux and another on in the
network menu (server side).

I'm not used of Wormux's code so comments and suggestions are more than
welcome.

Thanks!


        G.


-- 
Guillaume Desmottes <gdesm...@gnome.org>
Jabber <cass...@jabber.belnet.be>
GPG 1024D/711E31B1 | 1B5A 1BA8 11AA F0F1 2169  E28A AC55 8671 711E 31B1


_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à