[SailfishDevel] Sending SMS via Telepathy: Error "Channel Dispatcher .. does not support interface CD.I.Messages"

Matthew Vogt matthew.vogt at jolla.com
Mon Aug 10 00:15:16 UTC 2015


Mission control appears to implement the "org.freedesktop.Telepathy.ChannelDispatcher.Interface.Messages1" interface now - see:

https://github.com/nemomobile-packages/telepathy-qt/commit/6f0177bc024f3f7bce94c0abc283fba1c3b8a0d1

Perhaps your telepathy-qt packages and your telepathy-mission-control packages are not in sync?

Thanks,
Matt
________________________________________
From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of christopher.lamb at thurweb.ch [christopher.lamb at thurweb.ch]
Sent: Sunday, August 09, 2015 11:17 PM
To: devel at lists.sailfishos.org
Subject: [SailfishDevel] Sending SMS via Telepathy: Error "Channel Dispatcher .. does not support interface CD.I.Messages"

Hi all
I am revisiting a Sailfish OS app that I have not touched for over a
year!

Despite many Sailfish updates in that time, most of it still worked,
apart from its most important function: sending SMSes.

The SMS functionality was achieved by a few lines of C++ calling
Telepathy. The code is at the bottom of this post.

I now get the error
[D] TelepathyHelper::onSendMessageFinished:72 - Error sending message:
"org.freedesktop.Telepathy.Error.NotImplemented" - "Channel Dispatcher
implementation (e.g. mission-control), does not support interface
CD.I.Messages"

I am a little stumped by this: At the moment I guess either something in
Telepathy /used by Telepathy has changed. or I am missing a library that
was previously on the Jolla (perhaps installed by me).

Any ideas?

mfg

Chris

/////////////////////////////////////////
telepathyhelper.h
/////////////////////////////////////////


#ifndef TELEPATHYHELPER_H
#define TELEPATHYHELPER_H

#include <TelepathyQt/Types>

#include <QObject>
#include <QString>

namespace Tp
{
     class PendingOperation;
}

class TelepathyHelper : public QObject
{
     Q_OBJECT

public:
     explicit TelepathyHelper(QObject *parent = 0);
     ~TelepathyHelper();
     Q_INVOKABLE void sendSMS(const QString &contactIdentifier, const
QString &message);

signals:
     void stateMsg(const QString &statemsg);
     void errorMsg(const QString &errormsg);

private Q_SLOTS:
     void onSendMessageFinished(Tp::PendingOperation *op);

private:
     Tp::ContactMessengerPtr messenger;
};

#endif // TELEPATHYHELPER_H

/////////////////////////////////////////
telepathyhelper.cpp
/////////////////////////////////////////

#include "telepathyhelper.h"

#include <TelepathyQt/Account>
#include <TelepathyQt/Debug>
#include <TelepathyQt/Constants>
#include <TelepathyQt/ContactMessenger>
#include <TelepathyQt/PendingSendMessage>
#include <TelepathyQt/Types>


TelepathyHelper::TelepathyHelper(QObject *parent) :
     QObject(parent)
{
     Tp::registerTypes();
     Tp::enableDebug(true);
     Tp::enableWarnings(true);

}

TelepathyHelper::~TelepathyHelper()
{
}

void TelepathyHelper::sendSMS(const QString &contactIdentifier, const
QString &message)
{

     Tp::AccountPtr acc =
Tp::Account::create(TP_QT_ACCOUNT_MANAGER_BUS_NAME,

QLatin1String("/org/freedesktop/Telepathy/Account/ring/tel/account0"));

     messenger = Tp::ContactMessenger::create(acc, contactIdentifier);

     connect(messenger->sendMessage(message),
             SIGNAL(finished(Tp::PendingOperation*)),
             SLOT(onSendMessageFinished(Tp::PendingOperation*)));

}

void TelepathyHelper::onSendMessageFinished(Tp::PendingOperation *op)
{
     qDebug() << "TelepathyHelper::onSendMessageFinished";
     if (op->isError()) {
         qDebug() << "Error sending message:" << op->errorName() << "-"
<< op->errorMessage();
         emit errorMsg("Error sending message");
         return;
     }

     Tp::PendingSendMessage *psm = qobject_cast<Tp::PendingSendMessage
*>(op);
     qDebug() << "Message sent, token is" << psm->sentMessageToken();
     emit stateMsg("FinishedState");
}

/////////////////////////////////////////

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org


More information about the Devel mailing list