[Telepathy] I'm unable to create a channel
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Nov 8 03:36:15 PST 2010
The main problem here is that you're requesting a ContactList channel
(which has a rather awkward D-Bus API) rather than using Tp::ContactManager,
which wraps that awkward D-Bus API in a much easier C++ API.
We're in the process of superseding ContactList channels with a Connection
interface whose D-Bus API looks more like Tp::ContactManager, which will make
direct D-Bus access simpler; Tp::ContactManager will still be the recommended
way to get at that functionality in Qt, though.
I've included some brief notes on how you're doing the channel-requesting
in the hope that it's useful for channel types for which we don't yet have
high-level API, though.
On Mon, 08 Nov 2010 at 16:29:20 +0530, Abhijit Bera wrote:
> map.insert("org.freedesktop.Telepathy.Channel.ChannelType",QVariant("org.freedeskop.Telepathy.Channel.Type.ContactList"));
There's a constant for ...ContactList, and there should also be one for
...ChannelType I think?
> map.insert("org.freedesktop.Telepathy.Channel.TargetHandleType",
> QVariant(uint(3)));
There's a constant for each handle type. Please use the constants! Your code
will be much clearer.
Also, it might possibly need to be uint32() instead of uint(), or something
(I'm not sure how QtDBus does integers, it's a while since I've used it).
Also, if you get a D-Bus error that's not informative enough for you, it can
be helpful to look at the connection manager's debug log (there are generic
instructions at http://telepathy.freedesktop.org/wiki/Debugging which should
work for most connection managers), or at Mission Control's debug log, or
both. In particular, Mission Control logs the D-Bus representation of each
request when it creates the ChannelRequest, which might be enlightening.
Finally, I'm reasonably sure that "Not Implemented" is the error name, not
the accompanying message. The errorMessage() usually contains a bit more
detail which might indicate where you went wrong.
Regards,
smcv
More information about the telepathy
mailing list