Summary: | Need some way for handlers to know that a Channel was approved by the user | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Sjoerd Simons <sjoerd> |
Component: | tp-spec | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED MOVED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Sjoerd Simons
2009-11-13 07:44:52 UTC
Fixing this would also make the telepathy-glib documentation somewhat clearer, by making Handler_Info and TpHandleChannelsContext less hypothetical. I have a proof-of-concept MC branch which adds { "approved-by": ":1.42" } to the Handler_Info if process :1.42 called HandleWith or HandleWithTime, which would solve this. Specifying who approved it (rather than just that someone did) may seem rather over-engineered - in practice, clients will probably just check for it being non-empty - but it's easy to implement and is perhaps less ambiguous than a boolean, and if nothing else it'll be useful debug information. One possible alternative would be to set an explicit "all-approvers-failed" flag, but I don't think this is actually the information the handler wants, in some corner cases. If an observer called HandleWith, it doesn't matter if all approvers failed - someone still approved the channel. Ways in which MC can currently finish dispatching channels: * calling into a Handler that has BypassApproval - "approved-by" omitted, unless someone (an Observer?) called HandleWith very fast - I don't think this counts as being approved: handlers with BypassApproval should have their own logic to deal with channels - "all-approvers-failed" would not be set: the approvers haven't even been run yet * they were requested, so they don't need approval - MC internally considers requested channels to be "pre-approved", but I don't think it would be right to set an "approved" flag - the handler can look at the channels' Requested property - "all-approvers-failed" would not be set: the approvers aren't going to be run * someone called HandleWith or HandleWithTime - my branch will set approved-by - "all-approvers-failed" would (probably) not be set - corner case: if an Observer called HandleWith and then there were no approvers, we *do* want to count the channels as approved [1] * all channels were lost - HandleChannels is not called, so this case is not interesting * someone called Claim - HandleChannels is not called, so this case is not interesting * no approver returned success from AddDispatchOperation (probably because there are no approvers!) - "approved-by" is not set - this is the only case where "all-approvers-failed" would be set MC branch, with some quick tests: http://git.collabora.co.uk/?p=user/smcv/telepathy-mission-control-smcv.git;a=shortlog;h=refs/heads/approved-by If people like the general idea, I'll write it up in the spec and add convenience API in telepathy-glib. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-spec/issues/50. |
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.