[Bug 25236] TpHandler - a class that implements a Client.Handler

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 15 14:20:45 CEST 2010


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

--- Comment #4 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-04-15 05:20:45 PDT ---
Here's how I see a Client base class working:

http://git.collabora.co.uk/?p=user/smcv/telepathy-glib-smcv.git;a=blob;f=telepathy-glib/base-client.h;hb=sketch-base-client

>From that basis, it'd be possible to implement a TpSimpleHandler that doesn't
subclass, or something that subclasses and sets things up from information in
the class struct, or whatever.

In tp_base_client_new(), uniquify_name = TRUE would append a unique token to
the name, to make it easier to make temporary client heads. Perhaps the final
name would be (in pseudo-Python) "%s.%s.n%u" % (name,
tp_escape_as_identifier(unique_name), incrementing_counter_per_process) or some
such, which would lead to (Empathy @ :1.42)'s third temporary client being
called ...Client.Empathy._3a1_2e42.n3 or something.

(Well-known bus name components can't start with a digit even though unique bus
name components can, which is why escaping and so on are necessary, even though
all we're doing is embedding a bus name in another bus name... thanks, Havoc.)

-- 
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