Bug 27860

Summary: Document that observers can be used to implement non-interactive approvers
Product: Telepathy Reporter: Will Thompson <will>
Component: tp-specAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: mikhail.zabaluev
Version: git masterKeywords: patch
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/jonny/telepathy-spec.git;a=shortlog;h=refs/heads/non-interactive-approvers
Whiteboard: review+
i915 platform: i915 features:

Description Will Thompson 2010-04-27 06:44:54 UTC
So it turns out that you can implement non-interactive approvers (for instance, to shoot down spam IM channels before the tray icon blinks at the user, or to grab a SASL channel before the user is prompted for a password) as observers, as follows:

• When ObserveChannels() is called,
• Call Claim() on the CDO;
• Then return from ObserveChannels();
• and then Claim will return successfully if you claimed the channels, and failure if someone else got there first.

This should be documented somewhere.
Comment 1 Simon McVittie 2011-01-03 04:40:24 UTC
I think such pseudo-approvers SHOULD have DelayApprovers=TRUE (from Bug #32267).
Comment 2 Jonny Lamb 2011-01-03 07:50:17 UTC
Here you go. I commented out the DelayApprovers=TRUE bit because it's not merged yet.
Comment 3 Simon McVittie 2011-01-03 09:12:08 UTC
Looks good.
Comment 4 Jonny Lamb 2011-02-01 00:17:56 UTC
Oops, not sure why I hadn't merged this. Done now.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.