Bug 32189 - Fix group flags for StreamedMedia Channels
Summary: Fix group flags for StreamedMedia Channels
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: rakia (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Mikhail Zabaluev
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/al...
Whiteboard:
Keywords:
Depends on: 32085
Blocks: 33877
  Show dependency treegraph
 
Reported: 2010-12-07 10:30 UTC by David Laban
Modified: 2011-02-03 11:12 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description David Laban 2010-12-07 10:30:05 UTC
This bug was found while implementing Bug #32085 ("Write tests for StreamedMedia")

Gabble's incoming-basics.py test includes the following:
    # Changing members in any way other than adding or removing yourself is
    # meaningless for incoming calls, and the flags need not be sent to change
    # your own membership.
    assert not flags & cs.GF_CAN_ADD, flags
    assert not flags & cs.GF_CAN_REMOVE, flags
    assert not flags & cs.GF_CAN_RESCIND, flags

I had to comment it out. There are also other problems with group-flags that I had a bash at fixing, but I'm not sure what the *correct* behaviour is (and I don't know of anyone who actually checks the group flags at the moment) so I've split out this bug so that they can be fixed later.
Comment 1 Will Thompson 2011-01-13 08:47:21 UTC
http://telepathy.freedesktop.org/spec/Channel_Type_Streamed_Media.html roughly describes how group interface manipulations affect calls (though I notice it doesn't specify whether you should remove yourself or your peer from an ongoing call to end it … whoops). Given that, plus the ruling that you may always remove the self handle from a group, even if CAN_REMOVE is not set—which was in the spec. forever, but not implemented, so the CM has to call tp_group_mixin_class_allow_self_removal() to make tp-glib allow it—then I think the flags should be as follows:

Incoming call:

  members=[peer]
  local-pending=[self_handle]
  flags=0 -- you can reject the call by removing yourself

Outgoing call:

  members=[self_handle]
  remote-pending=[peer]
  flags=Can_Rescind

Ongoing call:

  members=[peer, self_handle]
  flags=0 (or Can_Remove if you think that removing the other person is a reasonable way to end calls).
Comment 2 David Laban 2011-01-26 09:33:29 UTC
Added it to the end of my streamedmedia_tests branch.
> Incoming call:
> 
>   members=[peer]
>   local-pending=[self_handle]
>   flags=0 -- you can reject the call by removing yourself
> 
Yup. This is what I end up with.

> Outgoing call:
> 
>   members=[self_handle]
>   remote-pending=[peer]
>   flags=Can_Rescind
> 
I end up with CAN_ADD and CAN_REMOVE as well, for compatibility with the legacy ways of making outgoing calls. 

> Ongoing call:
> 
>   members=[peer, self_handle]
>   flags=0 (or Can_Remove if you think that removing the other person is a
> reasonable way to end calls).

Decided to keep CAN_REMOVE set if we are the initiator, because that's what the code allows. For incoming calls, we have it set to 0.

Roll on Telepathy 1.0, when we can delete this mess.
Comment 3 David Laban 2011-02-03 11:12:17 UTC
Merged to master along with the fixes for #32085.


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.