[Bug 28367] Add StreamTube interface support

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Mar 6 16:33:27 CET 2011


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

--- Comment #22 from Olli Salli <ollisal at gmail.com> 2011-03-06 07:33:24 PST ---
(In reply to comment #21)
> (In reply to comment #19)
> > channel-class-spec.h:
> > 
> >  186     static ChannelClassSpec outgoingStreamTube(const QVariantMap
> > &additionalProperties = QVariantMap());
> >  187     static ChannelClassSpec incomingStreamTube(const QVariantMap
> > &additionalProperties = QVariantMap());
> > 
> > Add const QString &service = QString() as the first argument (and don't insert
> > the key at all if the default value was passed, rather than inserting the empty
> > QString).
> 
> Did that, although I am not really sure of the implementation, so I'd ask you
> to review carefully this specific commit.

Good thing that you asked. The ChannelClassSpec keys should be qualified D-Bus
property names; thus the following is invalid:

+    if (!service.isEmpty()) {
+        spec.setProperty(QLatin1String("service"), service);
+    }

The key should rather be
QLatin1String(TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"). Please
update for all instances of this.

> P.S.: To both of you, would you also mind trying out the example and tell me if
> it works for you?

I didn't test-run the example; however, as the example uses the Connection
low-level functionality in a very unexemplary fashion, let's leave it out for
the moment. We should try and make the existing examples more exemplary; but at
the very least let's not add any new examples showing naive/incorrect usage of
Telepathy.

A proper example should be a Handler Client, and request the channels from the
Account, integrating properly with the Channel Dispatcher. The Request and
Handle API Andre is currently finishing up will make writing such an example
easier.

I also think the final example should employ another kind of a convenience API:
a Handler base class for tube clients. I'd expect many applications using TpQt4
solely for the purpose of exporting their services over a Telepathy Tube - we
should make implementing that as easy as possible. We planned such an API a bit
already last September at the KDE Telepathy sprint, but the idea would be quite
similar to the one proposed for Text Observers in bug #28753.

So, the end result: let's fix that ChannelClassSpec service property
declaration; and merge the branch to master, but without the current test.
Then, let's work on adding the remaining bits to make it possible to write a
correct (in the sense that it co-operates with the ChannelDispatcher) but yet
very simple and clean example (thanks to the added convenience APIs).
Obviously, let's still keep the current test around in a branch as a basis for
those further developments.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list