[Telepathy] Uniqueness of objects
simon.mcvittie at collabora.co.uk
Tue Sep 30 13:01:25 PDT 2008
I'm starting to wonder whether we need to *guarantee* that certain
objects are unique, because of some reference-counting corners we've
painted ourselves into. Handles are held per connection to the bus
daemon, therefore we can never safely release any handles unless we can
refcount them per (DBusConnection, Telepathy Connection) tuple.
I think it's reasonable for us to forbid calling ReleaseHandles from
user code without going via a Telepathy library, since that can't possibly
work (unless the libraries *never* release handles, which seems undesirable).
Accordingly, we should conceal ReleaseHandles from the telepathy-glib
I don't think we can make TpConnection the object that has exactly one
instance per (DBusConnection, Telepathy Connection), because
TpConnection is subclassable. If you construct a TpConnection subclass
MyConnection while a TpConnection exists for that (DBusConnection,
TelepathyConnection) pair, that mustn't be a problem.
So, we need some sort of handle-referencing helper (it needn't be
visible to users, TpConnection could use it internally).
Hmm... but thinking about it, even if we refcount handles in telepathy-glib,
this doesn't help if telepathy-glib and telepathy-qt4 end up sharing a
connection, since neither library will be willing to call into (= depend on)
the other in order to update the shared handle cache :-( Any ideas?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 155 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/telepathy/attachments/20080930/8e750711/attachment.pgp
More information about the Telepathy