[Telepathy] Group interface usage?

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jul 19 10:52:12 PDT 2007


(Rob: please correct me if I'm wrong on any of this...)

On Thu, 19 Jul 2007 at 19:12:40 +0200, Tobias Hunger wrote:
> The group interface is created along with the channel. So is that empty when 
> the new channel is signalled (== the Connection sends the NewChannel signal) 
> or does it already contain the users at this time?

(The group interface isn't an object but an interface - it's not
"created along with the channel", it *is* (a view of) the channel.)

When NewChannel is signalled, it's CM-defined what members exist in the
channel. For incoming calls, I'd say it's likely but not guaranteed that
the remote user will be in Members and the local user will be in
LocalPending.

We should probably either tighten up the spec to make that guarantee, or
explicitly say that it's not guaranteed and clients might need to delay
dealing with the channel until they find out who's calling.

For outgoing calls, it's likely that the local user will be in
Members and there won't be a remote user yet.

If you're relying on what's the case at the exact moment NewChannel is
emitted, bear in mind that by the time you've made a method call to find
the members, they may well have changed - you're leaving yourself open to
race conditions if you try to rely on exact timings.

> This is important to me as Decibel decides what to do with a channel when it 
> sees a new channel signal. Is that still possible while using the group 
> interface? If not: How do I know that the initial member registration is 
> done?

If you're just deciding whether the channel is an incoming or outgoing
call, you should be able to tell by where the local user is in the group
interface.

If you're deciding whether you should launch a UI to handle the channel
or rely on someone else already having taken responsibility, that's what
the suppress_handler flag is for. If it's TRUE you should assume that
some other process is already handling the channel (most likely, the
process that requested it), if it's FALSE you should launch a suitable
UI with which to handle it.

If you're deciding what to do based on the identity of the remote user,
for outgoing calls you'll have to wait til the local UI decides who it
wanted to call.

> This question is important to me as Decibel does decide what to do with a 
> channel based on the participants in the conversation (among other criteria). 
> The approach described in your spec makes that pretty much impossible (if I 
> understood it right).

If that's so, you'll have to wait til they turn up before you can decide
what to do with the channel. Hook MembersChanged, then call GetAllMembers
to get the initial state.

> Are there any requirements on the channel status during the pending stages? 
> Does it matter at all or is it just set to "Connected" till the Channel is 
> closed again?

Channels don't have status, connections have status. The closest
equivalents of connection status on a channel are the group interface's
local-pending/remote-pending/members sets, which is why we use them for
streamed media channels.

	Simon


More information about the Telepathy mailing list