Summary: | Gabble advertises tube services as supported with just a Chan.Requested=true Client filter | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Olli Salli <ollisal> |
Component: | gabble | Assignee: | Olli Salli <ollisal> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | ollisal |
Version: | git master | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.collabora.com/git/user/oggis/telepathy-gabble.git/log/?h=tube-caps | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: |
Description
Olli Salli
2011-08-08 08:35:22 UTC
(In reply to comment #0) > StreamTube API (#30584), which registers a Handler with bug 35084, rather done? > + if (tp_asv_get_boolean (cap, TP_IFACE_CHANNEL ".Requested", FALSE) == TRUE)
Ideally TP_PROP_CHANNEL_REQUESTED or whatever we called it. I'd prefer without the "== TRUE".
Could we have a regression test for a channel class that doesn't mention Requested (= matches both incoming and outgoing), just to be sure? I think your implementation will get that right too, though.
(In reply to comment #3) > > + if (tp_asv_get_boolean (cap, TP_IFACE_CHANNEL ".Requested", FALSE) == TRUE) > > Ideally TP_PROP_CHANNEL_REQUESTED or whatever we called it. I'd prefer without Ok, ported the whole file to TP_PROP constants for consistency. > the "== TRUE". Done > > Could we have a regression test for a channel class that doesn't mention > Requested (= matches both incoming and outgoing), just to be sure? I think your > implementation will get that right too, though. We do now, and it did get it right. Looks good to me. (In reply to comment #0) > for stream tubes > this is especially important, as the initiator (classically, a TCP server) and > receiver (~TCP client) applications are often separate and not dependent on > each other In recent MC, you only need to add a { Requested = TRUE } filter if you want to be eligible to handle channels requested by others. If you are the PreferredHandler (as you ought to be for channels you request yourself), you will receive the channel anyway, and being a Handler with a zero-length list of filters (i.e. match nothing) is often the right thing... (Note that there's a difference between HandlerChannelFilters = [], which matches nothing, and HandlerChannelFilters = [{}], which matches everything.) > after all, as Will pointed out, on some protocols it might be perfectly > sensible to advertise to the network e.g. that "this person here might call > you" ( there is a Handler with a Requested=true, Type=Call class in its > filters) ... although that usage would break the ability to do this. (In reply to comment #5) > Looks good to me. > Ok thanks, will merge. > (In reply to comment #0) > > for stream tubes > > this is especially important, as the initiator (classically, a TCP server) and > > receiver (~TCP client) applications are often separate and not dependent on > > each other > > In recent MC, you only need to add a { Requested = TRUE } filter if you want to > be eligible to handle channels requested by others. If you are the > PreferredHandler (as you ought to be for channels you request yourself), you > will receive the channel anyway, and being a Handler with a zero-length list of > filters (i.e. match nothing) is often the right thing... > > (Note that there's a difference between HandlerChannelFilters = [], which > matches nothing, and HandlerChannelFilters = [{}], which matches everything.) Sure. In TpQt4 we have the {create,ensure}AndHandle* APIs which work in exactly this fashion (create a behind-the-scenes Handler with an empty filter and a random name, pass it as the PreferredHandler). However, many interesting use cases (in KDE telepathy mainly) have the channels requested from an another application, most often the contact list. We've had some ideas to enable starting arbitrary kinds of sessions from the contact list, including tubes. > > > after all, as Will pointed out, on some protocols it might be perfectly > > sensible to advertise to the network e.g. that "this person here might call > > you" ( there is a Handler with a Requested=true, Type=Call class in its > > filters) > > ... although that usage would break the ability to do this. Yeah. Perhaps we should try and see whether there are protocols which actually support that, and try and make the spec steer people towards registering the Requested=true handlers anyway, if so. |
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.