[Bug 25073] Need some way for handlers to know that a Channel was approved by the user

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Aug 25 12:41:44 CEST 2010


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

Simon McVittie <simon.mcvittie at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Severity|normal                      |enhancement
         AssignedTo|telepathy-bugs at lists.freede |simon.mcvittie at collabora.co
                   |sktop.org                   |.uk

--- Comment #1 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-08-25 03:41:44 PDT ---
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

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