[Bug 34824] Turn WockyPorter into an interface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Mar 1 09:25:15 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=34824

--- Comment #5 from Jonny Lamb <jonny.lamb at collabora.co.uk> 2011-03-01 00:25:14 PST ---
(In reply to comment #4)
> This seems unlikely.
[...]
> This is also unlikely. It should presumably be 2009–2011.

Fixed.

> +  guint (*register_handler_from_stanza) (
> 
> I don't really like the naming here. Of course, it's my fault because I called
> the original function register_handler_from. Maybe we should call the stanza
> variants _by_stanza or similar? I'm not overly hung up on this.

_by_stanza sounds better. Shall we change _va to _by_va at the same time? I
guess blah_va is more common. Done.

> Why is register_handler_from_server() on the generic interface? The link-local
> porter has no such concept, so I wonder if that should be a method on
> WockyC2SPorter.
> 
> +const gchar * wocky_porter_get_full_jid (WockyPorter *self);
> +const gchar * wocky_porter_get_bare_jid (WockyPorter *self);
> +const gchar * wocky_porter_get_resource (WockyPorter *self);
> 
> I suppose these are less contentious, although link-local JIDs don't generally
> have resources.

I wondered what to do about the from_server and the get_full_jid, bare_jid and
resource functions but decided on just leaving them in the interface because
full jids, bare jids, resources and servers all exist in the huge majority of
XMPP -- non-link-local. If  we were to throw them into the c2s-porter directly
then implement some other porter which has something to do with normal XMPP
then we'll have more identical porter-specific functions. Admittedly, at that
point they could be added to the interface.

Hmm, I'm just not sure anymore. What do you think?

> Should probably use g_once_init_enter()?

OK, done.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list