summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/jabber/jingle/jinglevoicecaller.cpp')
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicecaller.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
index 3ad6a89a..dd809cea 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
+++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
@@ -20,8 +20,8 @@
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
@@ -47,7 +47,7 @@ public:
JingleIQResponder(XMPP::Task *);
~JingleIQResponder();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
};
/**
@@ -63,14 +63,14 @@ JingleIQResponder::~JingleIQResponder()
{
}
-bool JingleIQResponder::take(const QDomElement &e)
+bool JingleIQResponder::take(const TQDomElement &e)
{
if(e.tagName() != "iq")
return false;
- QDomElement first = e.firstChild().toElement();
+ TQDomElement first = e.firstChild().toElement();
if (!first.isNull() && first.attribute("xmlns") == JINGLE_NS) {
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
send(iq);
return true;
}
@@ -114,7 +114,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call)
qDebug("JingleClientSlots: Call destroyed");
Jid jid(call->sessions()[0]->remote_address().c_str());
if (voiceCaller_->calling(jid)) {
- qDebug(QString("Removing unterminated call to %1").arg(jid.full()));
+ qDebug(TQString("Removing unterminated call to %1").arg(jid.full()));
voiceCaller_->removeCall(jid);
emit voiceCaller_->terminated(jid);
}
@@ -122,7 +122,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call)
void JingleClientSlots::sendStanza(cricket::SessionClient*, const buzz::XmlElement *stanza)
{
- QString st(stanza->Str().c_str());
+ TQString st(stanza->Str().c_str());
st.replace("cli:iq","iq");
st.replace(":cli=","=");
fprintf(stderr,"bling\n");
@@ -138,7 +138,7 @@ void JingleClientSlots::requestSignaling()
void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *session, cricket::Session::State state)
{
- qDebug(QString("jinglevoicecaller.cpp: State changed (%1)").arg(state));
+ qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").arg(state));
// Why is c_str() stuff needed to make it compile on OS X ?
Jid jid(session->remote_address().c_str());
@@ -156,7 +156,7 @@ void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *sess
}
else if (state == cricket::Session::STATE_SENTMODIFY) { }
else if (state == cricket::Session::STATE_RECEIVEDMODIFY) {
- qWarning(QString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
+ qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
}
else if (state == cricket::Session::STATE_SENTREJECT) { }
else if (state == cricket::Session::STATE_RECEIVEDREJECT) {
@@ -194,8 +194,8 @@ void JingleVoiceCaller::initialize()
if (initialized_)
return;
- QString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full();
- qDebug(QString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid));
+ TQString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full();
+ qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid));
if (jid.isEmpty()) {
qWarning("jinglevoicecaller.cpp: Empty JID");
return;
@@ -233,7 +233,7 @@ void JingleVoiceCaller::initialize()
new JingleIQResponder(account()->client()->rootTask());
// Listen to incoming packets
- connect(account()->client()->client(),SIGNAL(xmlIncoming(const QString&)),SLOT(receiveStanza(const QString&)));
+ connect(account()->client()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),TQT_SLOT(receiveStanza(const TQString&)));
initialized_ = true;
}
@@ -245,7 +245,7 @@ void JingleVoiceCaller::deinitialize()
return;
// Stop listening to incoming packets
- disconnect(account()->client(),SIGNAL(xmlIncoming(const QString&)),this,SLOT(receiveStanza(const QString&)));
+ disconnect(account()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),this,TQT_SLOT(receiveStanza(const TQString&)));
// Disconnect signals (is this needed)
//phone_client_->SignalCallCreate.disconnect(slots_);
@@ -271,7 +271,7 @@ bool JingleVoiceCaller::calling(const Jid& jid)
void JingleVoiceCaller::call(const Jid& jid)
{
- qDebug(QString("jinglevoicecaller.cpp: Calling %1").arg(jid.full()));
+ qDebug(TQString("jinglevoicecaller.cpp: Calling %1").arg(jid.full()));
cricket::Call *c = ((cricket::PhoneSessionClient*)(phone_client_))->CreateCall();
c->InitiateSession(buzz::Jid(jid.full().ascii()));
phone_client_->SetFocus(c);
@@ -299,7 +299,7 @@ void JingleVoiceCaller::reject(const Jid& j)
void JingleVoiceCaller::terminate(const Jid& j)
{
- qDebug(QString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full()));
+ qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full()));
cricket::Call* call = calls_[j.full()];
if (call != NULL) {
call->Terminate();
@@ -309,7 +309,7 @@ void JingleVoiceCaller::terminate(const Jid& j)
void JingleVoiceCaller::sendStanza(const char* stanza)
{
- account()->client()->send(QString(stanza));
+ account()->client()->send(TQString(stanza));
}
void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call)
@@ -327,19 +327,19 @@ void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call)
void JingleVoiceCaller::removeCall(const Jid& j)
{
- qDebug(QString("JingleVoiceCaller: Removing call to %1").arg(j.full()));
+ qDebug(TQString("JingleVoiceCaller: Removing call to %1").arg(j.full()));
calls_.remove(j.full());
}
-void JingleVoiceCaller::receiveStanza(const QString& stanza)
+void JingleVoiceCaller::receiveStanza(const TQString& stanza)
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(stanza);
// Check if it is offline presence from an open chat
if (doc.documentElement().tagName() == "presence") {
Jid from = Jid(doc.documentElement().attribute("from"));
- QString type = doc.documentElement().attribute("type");
+ TQString type = doc.documentElement().attribute("type");
if (type == "unavailable" && calls_.contains(from.full())) {
qDebug("JingleVoiceCaller: User went offline without closing a call.");
removeCall(from);
@@ -351,10 +351,10 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza)
// Check if the packet is destined for libjingle.
// We could use Session::IsClientStanza to check this, but this one crashes
// for some reason.
- QDomNode n = doc.documentElement().firstChild();
+ TQDomNode n = doc.documentElement().firstChild();
bool ok = false;
while (!n.isNull() && !ok) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (!e.isNull() && e.attribute("xmlns") == JINGLE_NS) {
ok = true;
}
@@ -363,7 +363,7 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza)
// Spread the word
if (ok) {
- qDebug(QString("jinglevoicecaller.cpp: Handing down %1").arg(stanza));
+ qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").arg(stanza));
buzz::XmlElement *e = buzz::XmlElement::ForStr(stanza.ascii());
phone_client_->OnIncomingStanza(e);
}