Tp::enableDebug(false);
Tp::enableWarnings(false);
+ QProcessEnvironment env;
+ tpsdebug=env.systemEnvironment().contains("TPSESSION_DEBUG");
+ if(tpsdebug) qDebug() << "Tpsession debug:" << tpsDebug();
+
mAM = Tp::AccountManager::create();
reqCm=cmname;
sync=synchronous;
}
TpSession* TpSession::instancePtr=NULL;
+bool TpSession::tpsdebug=false;
/**
* Returns pointer to TpSession singleton. If there is not yet TpSession Object, creates it with "Ring" connection manager as default
*
return instancePtr;
};
+bool TpSession::tpsDebug()
+{
+ return tpsdebug;
+}
+
void TpSession::onAMReady(Tp::PendingOperation *op)
{
+ Q_UNUSED(op);
// qDebug() << "TpSession::onAMReady";
TpSessionAccount *tpacc;
void TpSession::onAccountReady(TpSessionAccount *tpacc)
{
- qDebug() << "TpSession::onAccountReady:Account " << tpacc->acc->cmName() << "is Ready sync=" << sync << "waiting:" << reqCm;
+ //qDebug() << "TpSession::onAccountReady:Account " << tpacc->acc->cmName() << "is Ready sync=" << sync << "waiting:" << reqCm;
connect(tpacc,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)),
SLOT(onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)));
if(!reqCm.isEmpty() && tpacc->acc->cmName()==reqCm) {
bool registered = registrar->registerClient(
Tp::AbstractClientPtr::dynamicCast(Tp::SharedPtr<TpSessionObserver>(observer)),
"TpSessionChannelObserver");
-
- // qDebug() << "TpSession::createObserver" << (registered ? "started" : "failed");
+ qDebug() << "TpSession::createObserver" << (registered ? "started" : "failed");
}
const Tp::AccountPtr &account,
const Tp::ChannelPtr &channel)
{
- qDebug() << "TpSession::createChannelListener";
+ Q_UNUSED(context);
+ Q_UNUSED(account);
+ qDebug() << "TpSession::createChannelListener";
QString channelObjectPath = channel->objectPath();