[Bug 49335] rename UpdateCapabilities to SetCapabilities?

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 1 15:08:36 CEST 2012


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

--- Comment #2 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-05-01 06:08:36 PDT ---
(In reply to comment #0)
> In all the implementations worth anything, ContactCaps.UpdateCapabilities acts
> more like a Set operation because it resets all previous caps.

o rly? The spec says it shouldn't.

> Update feels like the CM is keeping a list of clients and calling UpdateCaps
> with only one client won't lost all other clients, but that's wrong.

Calling UpdateCaps with only one client isn't meant to lose all the other
clients.

Here is how UpdateCaps is meant to work, in Python-like pseudocode:

    class Connection:
        handlers = {}

        def UpdateCapabilties (self, Handler_Capabilities):
            for (handler, filters, tokens) in Handler_Capabilities:
                if filters or tokens:
                    self.handlers[handler] = (filters, tokens)
                else:
                    del self.handlers[handler]

(This is the only thing that can work if you don't have an equivalent of
Mission Control, and is just as good as "set" if you do.)

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