From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/jabber/jingle/DESIGN | 10 +- kopete/protocols/jabber/jingle/jinglesession.h | 3 +- .../jabber/jingle/jinglesessionmanager.cpp | 6 +- .../protocols/jabber/jingle/jinglesessionmanager.h | 3 +- .../protocols/jabber/jingle/jinglevoicecaller.cpp | 42 +-- kopete/protocols/jabber/jingle/jinglevoicecaller.h | 1 + .../protocols/jabber/jingle/jinglevoicesession.cpp | 38 +-- .../protocols/jabber/jingle/jinglevoicesession.h | 3 +- .../jabber/jingle/jinglevoicesessiondialog.cpp | 26 +- .../jabber/jingle/jinglevoicesessiondialog.h | 3 +- .../jabber/jingle/jinglevoicesessiondialogbase.ui | 62 ++-- .../jabber/jingle/jinglewatchsessiontask.cpp | 4 +- .../jabber/jingle/jinglewatchsessiontask.h | 5 +- .../jabber/jingle/libjingle/libjingle.pro | 6 +- .../jabber/jingle/libjingle/talk/base/base64.cc | 2 +- .../jabber/jingle/libjingle/talk/base/common.h | 4 +- .../jingle/libjingle/talk/base/messagequeue.cc | 2 +- .../jingle/libjingle/talk/base/messagequeue.h | 6 +- .../jabber/jingle/libjingle/talk/base/network.cc | 8 +- .../jabber/jingle/libjingle/talk/base/network.h | 6 +- .../jabber/jingle/libjingle/talk/base/sigslot.h | 2 +- .../jabber/jingle/libjingle/talk/base/socket.h | 2 +- .../jingle/libjingle/talk/base/socketadapters.cc | 30 +- .../jabber/jingle/libjingle/talk/base/task.cc | 22 +- .../jabber/jingle/libjingle/talk/base/task.h | 26 +- .../jingle/libjingle/talk/base/taskrunner.cc | 2 +- .../libjingle/talk/examples/call/callclient.cc | 24 +- .../libjingle/talk/examples/call/callclient.h | 6 +- .../talk/examples/call/presenceouttask.cc | 52 ++-- .../libjingle/talk/examples/call/presenceouttask.h | 10 +- .../talk/examples/call/presencepushtask.cc | 38 +-- .../talk/examples/call/presencepushtask.h | 4 +- .../jingle/libjingle/talk/examples/call/status.h | 32 +-- .../libjingle/talk/examples/login/xmppauth.cc | 6 +- .../libjingle/talk/examples/login/xmpppump.cc | 2 +- .../libjingle/talk/examples/login/xmpppump.h | 2 +- .../jingle/libjingle/talk/p2p/base/p2psocket.cc | 8 +- .../jabber/jingle/libjingle/talk/p2p/base/port.cc | 4 +- .../jingle/libjingle/talk/p2p/base/relayserver.cc | 22 +- .../libjingle/talk/p2p/base/sessionmanager.cc | 4 +- .../libjingle/talk/p2p/base/socketmanager.cc | 2 +- .../jingle/libjingle/talk/p2p/base/stunrequest.cc | 8 +- .../talk/p2p/client/basicportallocator.cc | 4 +- .../libjingle/talk/p2p/client/sessionclient.cc | 196 ++++++------- .../jingle/libjingle/talk/session/phone/call.cc | 26 +- .../libjingle/talk/session/phone/channelmanager.cc | 2 +- .../talk/session/phone/linphonemediaengine.cc | 4 +- .../talk/session/phone/linphonemediaengine.h | 2 +- .../libjingle/talk/session/phone/mediachannel.h | 2 +- .../libjingle/talk/session/phone/mediaengine.h | 2 +- .../talk/session/phone/phonesessionclient.cc | 34 +-- .../talk/session/phone/portaudiomediaengine.cc | 12 +- .../talk/session/phone/portaudiomediaengine.h | 2 +- .../libjingle/talk/session/phone/voicechannel.cc | 6 +- .../jingle/libjingle/talk/session/receiver.h | 4 +- .../libjingle/talk/session/sessionsendtask.h | 14 +- .../talk/third_party/mediastreamer/alsacard.c | 8 +- .../talk/third_party/mediastreamer/alsacard.h | 2 +- .../talk/third_party/mediastreamer/g711common.h | 16 +- .../talk/third_party/mediastreamer/hpuxsndcard.c | 4 +- .../talk/third_party/mediastreamer/jackcard.h | 2 +- .../libjingle/talk/third_party/mediastreamer/ms.c | 2 +- .../talk/third_party/mediastreamer/msAlawdec.h | 2 +- .../talk/third_party/mediastreamer/msAlawenc.h | 2 +- .../talk/third_party/mediastreamer/msGSMdecoder.h | 2 +- .../talk/third_party/mediastreamer/msGSMencoder.h | 2 +- .../third_party/mediastreamer/msLPC10decoder.h | 2 +- .../third_party/mediastreamer/msLPC10encoder.h | 2 +- .../talk/third_party/mediastreamer/msMUlawdec.h | 2 +- .../talk/third_party/mediastreamer/msMUlawenc.h | 2 +- .../talk/third_party/mediastreamer/msavdecoder.h | 2 +- .../talk/third_party/mediastreamer/msavencoder.h | 2 +- .../talk/third_party/mediastreamer/mscopy.h | 2 +- .../talk/third_party/mediastreamer/msfdispatcher.c | 18 +- .../talk/third_party/mediastreamer/msfdispatcher.h | 2 +- .../talk/third_party/mediastreamer/msfilter.c | 14 +- .../talk/third_party/mediastreamer/msfilter.h | 4 +- .../talk/third_party/mediastreamer/msilbcdec.h | 2 +- .../talk/third_party/mediastreamer/msilbcenc.h | 2 +- .../talk/third_party/mediastreamer/msnosync.h | 2 +- .../talk/third_party/mediastreamer/msossread.h | 2 +- .../talk/third_party/mediastreamer/msosswrite.h | 2 +- .../talk/third_party/mediastreamer/msqdispatcher.c | 20 +- .../talk/third_party/mediastreamer/msqdispatcher.h | 18 +- .../talk/third_party/mediastreamer/msqueue.h | 4 +- .../talk/third_party/mediastreamer/msread.h | 2 +- .../talk/third_party/mediastreamer/msringplayer.h | 2 +- .../talk/third_party/mediastreamer/msrtprecv.h | 2 +- .../talk/third_party/mediastreamer/msrtpsend.h | 2 +- .../talk/third_party/mediastreamer/mssdlout.h | 4 +- .../talk/third_party/mediastreamer/mssoundread.h | 2 +- .../talk/third_party/mediastreamer/mssoundwrite.h | 2 +- .../talk/third_party/mediastreamer/msspeexdec.h | 4 +- .../talk/third_party/mediastreamer/msspeexenc.h | 4 +- .../talk/third_party/mediastreamer/mstimer.h | 2 +- .../mediastreamer/mstruespeechdecoder.h | 2 +- .../mediastreamer/mstruespeechencoder.h | 2 +- .../talk/third_party/mediastreamer/msutils.h | 4 +- .../talk/third_party/mediastreamer/msv4l.h | 4 +- .../talk/third_party/mediastreamer/msvideosource.h | 2 +- .../talk/third_party/mediastreamer/mswrite.h | 2 +- .../talk/third_party/mediastreamer/osscard.h | 2 +- .../talk/third_party/mediastreamer/portaudiocard.h | 2 +- .../jingle/libjingle/talk/third_party/ortp/ortp.c | 2 +- .../jingle/libjingle/talk/third_party/ortp/rtp.h | 2 +- .../libjingle/talk/third_party/ortp/rtpsession.c | 2 +- .../libjingle/talk/third_party/ortp/rtpsession.h | 2 +- .../libjingle/talk/third_party/ortp/scheduler.c | 8 +- .../libjingle/talk/third_party/ortp/scheduler.h | 12 +- .../libjingle/talk/third_party/ortp/sessionset.c | 28 +- .../libjingle/talk/third_party/ortp/sessionset.h | 16 +- .../jabber/jingle/libjingle/talk/xmllite/qname.cc | 48 ++-- .../jabber/jingle/libjingle/talk/xmllite/qname.h | 26 +- .../jingle/libjingle/talk/xmllite/xmlbuilder.cc | 10 +- .../jingle/libjingle/talk/xmllite/xmlelement.cc | 38 +-- .../jingle/libjingle/talk/xmllite/xmlelement.h | 46 +-- .../jingle/libjingle/talk/xmllite/xmlnsstack.cc | 4 +- .../jingle/libjingle/talk/xmllite/xmlnsstack.h | 4 +- .../jingle/libjingle/talk/xmllite/xmlparser.cc | 14 +- .../jingle/libjingle/talk/xmllite/xmlparser.h | 4 +- .../jingle/libjingle/talk/xmllite/xmlprinter.cc | 10 +- .../jabber/jingle/libjingle/talk/xmpp/constants.cc | 318 ++++++++++---------- .../jabber/jingle/libjingle/talk/xmpp/constants.h | 320 ++++++++++----------- .../jabber/jingle/libjingle/talk/xmpp/jid.cc | 10 +- .../jingle/libjingle/talk/xmpp/plainsaslhandler.h | 2 +- .../libjingle/talk/xmpp/saslcookiemechanism.h | 4 +- .../jingle/libjingle/talk/xmpp/saslmechanism.cc | 4 +- .../libjingle/talk/xmpp/saslplainmechanism.h | 4 +- .../jingle/libjingle/talk/xmpp/xmppclient.cc | 12 +- .../jabber/jingle/libjingle/talk/xmpp/xmppclient.h | 16 +- .../jabber/jingle/libjingle/talk/xmpp/xmppengine.h | 48 ++-- .../jingle/libjingle/talk/xmpp/xmppengineimpl.cc | 38 +-- .../jingle/libjingle/talk/xmpp/xmppengineimpl.h | 36 +-- .../libjingle/talk/xmpp/xmppengineimpl_iq.cc | 100 +++---- .../jingle/libjingle/talk/xmpp/xmpplogintask.cc | 68 ++--- .../jingle/libjingle/talk/xmpp/xmpplogintask.h | 2 +- .../jabber/jingle/libjingle/talk/xmpp/xmpptask.cc | 40 +-- .../jabber/jingle/libjingle/talk/xmpp/xmpptask.h | 12 +- kopete/protocols/jabber/jingle/voicecaller.h | 3 +- 139 files changed, 1185 insertions(+), 1178 deletions(-) (limited to 'kopete/protocols/jabber/jingle') diff --git a/kopete/protocols/jabber/jingle/DESIGN b/kopete/protocols/jabber/jingle/DESIGN index b1cbd666..4698ca5d 100644 --- a/kopete/protocols/jabber/jingle/DESIGN +++ b/kopete/protocols/jabber/jingle/DESIGN @@ -60,11 +60,11 @@ JingleSessionManager manage the JingleSession pointers. Do not delete it in user * JingleSessionManager(JabberAccount *) -* public slots: +* public Q_SLOTS: * JingleSession *createSession(const QString &sessionType, const JidList &peers); * void removeSession(JingleSession *); -signals: +Q_SIGNALS: * void incomingSession(const QString &sessionType, JingleSession *session); JingleSession @@ -89,10 +89,10 @@ Base class for Jingle session. A session is a // Return Session XML namespace * virtual QString sessionType() = 0; -protected slots: +protected Q_SLOTS: void sendStanza(const QString &stanza) { account()->client->send(stanza); -signals: +Q_SIGNALS: void accepted(); void declined(); void terminated(); @@ -105,7 +105,7 @@ Hold the PhoneSessionClient object. connect(account()->client(),SIGNAL(xmlIncoming(const QString&)),SLOT(receiveStanza(const QString&))); -private slots: +private Q_SLOTS: void receiveStanza(const QString &stanza); VoiceConversationDialog diff --git a/kopete/protocols/jabber/jingle/jinglesession.h b/kopete/protocols/jabber/jingle/jinglesession.h index a9d73440..ad5d68a7 100644 --- a/kopete/protocols/jabber/jingle/jinglesession.h +++ b/kopete/protocols/jabber/jingle/jinglesession.h @@ -29,9 +29,10 @@ class JabberAccount; * * @author Michaël Larouche */ -class JingleSession : public QObject +class JingleSession : public TQObject { Q_OBJECT + TQ_OBJECT public: typedef TQValueList JidList; diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp b/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp index 54fc7274..766da28e 100644 --- a/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp +++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp @@ -14,7 +14,7 @@ * * ************************************************************************* */ -// libjingle before everything else to not clash with Qt +// libjingle before everything else to not clash with TQt #define POSIX #include "talk/xmpp/constants.h" #include "talk/base/sigslot.h" @@ -55,8 +55,8 @@ class JingleSessionManager; class JingleSessionManager::SlotsProxy : public sigslot::has_slots<> { public: - SlotsProxy(JingleSessionManager *parent) - : sessionManager(parent) + SlotsProxy(JingleSessionManager *tqparent) + : sessionManager(tqparent) {} void OnSignalingRequest() diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.h b/kopete/protocols/jabber/jingle/jinglesessionmanager.h index f9bb82b9..2ec3ef46 100644 --- a/kopete/protocols/jabber/jingle/jinglesessionmanager.h +++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.h @@ -36,9 +36,10 @@ class JabberAccount; * @brief Manage Jingle sessions. * @author Michaël Larouche */ -class JingleSessionManager : public QObject +class JingleSessionManager : public TQObject { Q_OBJECT + TQ_OBJECT public: typedef TQValueList JidList; diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp index 12e4b93d..344071c6 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp @@ -41,29 +41,29 @@ // ---------------------------------------------------------------------------- -class JingleIQResponder : public XMPP::Task +class JingleITQResponder : public XMPP::Task { public: - JingleIQResponder(XMPP::Task *); - ~JingleIQResponder(); + JingleITQResponder(XMPP::Task *); + ~JingleITQResponder(); bool take(const TQDomElement &); }; /** - * \class JingleIQResponder + * \class JingleITQResponder * \brief A task that responds to jingle candidate queries with an empty reply. */ -JingleIQResponder::JingleIQResponder(Task *parent) :Task(parent) +JingleITQResponder::JingleITQResponder(Task *tqparent) :Task(tqparent) { } -JingleIQResponder::~JingleIQResponder() +JingleITQResponder::~JingleITQResponder() { } -bool JingleIQResponder::take(const TQDomElement &e) +bool JingleITQResponder::take(const TQDomElement &e) { if(e.tagName() != "iq") return false; @@ -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(TQString("Removing unterminated call to %1").arg(jid.full())); + qDebug(TQString("Removing unterminated call to %1").tqarg(jid.full())); voiceCaller_->removeCall(jid); emit voiceCaller_->terminated(jid); } @@ -123,8 +123,8 @@ void JingleClientSlots::callDestroyed(cricket::Call *call) void JingleClientSlots::sendStanza(cricket::SessionClient*, const buzz::XmlElement *stanza) { TQString st(stanza->Str().c_str()); - st.replace("cli:iq","iq"); - st.replace(":cli=","="); + st.tqreplace("cli:iq","iq"); + st.tqreplace(":cli=","="); fprintf(stderr,"bling\n"); voiceCaller_->sendStanza(st.latin1()); fprintf(stderr,"blong\n"); @@ -138,7 +138,7 @@ void JingleClientSlots::requestSignaling() void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *session, cricket::Session::State state) { - qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").arg(state)); + qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").tqarg(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(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); + qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").tqarg(jid.full())); } else if (state == cricket::Session::STATE_SENTREJECT) { } else if (state == cricket::Session::STATE_RECEIVEDREJECT) { @@ -195,7 +195,7 @@ void JingleVoiceCaller::initialize() return; TQString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full(); - qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid)); + qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").tqarg(jid)); if (jid.isEmpty()) { qWarning("jinglevoicecaller.cpp: Empty JID"); return; @@ -230,7 +230,7 @@ void JingleVoiceCaller::initialize() phone_client_->SignalSendStanza.connect(slots_, &JingleClientSlots::sendStanza); // IQ Responder - new JingleIQResponder(account()->client()->rootTask()); + new JingleITQResponder(account()->client()->rootTask()); // Listen to incoming packets connect(account()->client()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),TQT_SLOT(receiveStanza(const TQString&))); @@ -266,12 +266,12 @@ JingleVoiceCaller::~JingleVoiceCaller() bool JingleVoiceCaller::calling(const Jid& jid) { - return calls_.contains(jid.full()); + return calls_.tqcontains(jid.full()); } void JingleVoiceCaller::call(const Jid& jid) { - qDebug(TQString("jinglevoicecaller.cpp: Calling %1").arg(jid.full())); + qDebug(TQString("jinglevoicecaller.cpp: Calling %1").tqarg(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(TQString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full())); + qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").tqarg(j.full())); cricket::Call* call = calls_[j.full()]; if (call != NULL) { call->Terminate(); @@ -316,7 +316,7 @@ void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call) { qDebug("jinglevoicecaller.cpp: Registering call\n"); kdDebug(14000) << k_funcinfo << jid.full() << endl; - if (!calls_.contains(jid.full())) { + if (!calls_.tqcontains(jid.full())) { calls_[jid.full()] = call; } // else { @@ -327,7 +327,7 @@ void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call) void JingleVoiceCaller::removeCall(const Jid& j) { - qDebug(TQString("JingleVoiceCaller: Removing call to %1").arg(j.full())); + qDebug(TQString("JingleVoiceCaller: Removing call to %1").tqarg(j.full())); calls_.remove(j.full()); } @@ -340,7 +340,7 @@ void JingleVoiceCaller::receiveStanza(const TQString& stanza) if (doc.documentElement().tagName() == "presence") { Jid from = Jid(doc.documentElement().attribute("from")); TQString type = doc.documentElement().attribute("type"); - if (type == "unavailable" && calls_.contains(from.full())) { + if (type == "unavailable" && calls_.tqcontains(from.full())) { qDebug("JingleVoiceCaller: User went offline without closing a call."); removeCall(from); emit terminated(from); @@ -363,7 +363,7 @@ void JingleVoiceCaller::receiveStanza(const TQString& stanza) // Spread the word if (ok) { - qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").arg(stanza)); + qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").tqarg(stanza)); buzz::XmlElement *e = buzz::XmlElement::ForStr(stanza.ascii()); phone_client_->OnIncomingStanza(e); } diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.h b/kopete/protocols/jabber/jingle/jinglevoicecaller.h index 50070289..e29eaf16 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicecaller.h +++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.h @@ -31,6 +31,7 @@ class JingleCallSlots; class JingleVoiceCaller : public VoiceCaller { Q_OBJECT + TQ_OBJECT friend class JingleClientSlots; diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp index 91fa1a77..3f3bd6ca 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -// libjingle before everything else to not clash with Qt +// libjingle before everything else to not clash with TQt #define POSIX #include "talk/xmpp/constants.h" #include "talk/base/sigslot.h" @@ -38,7 +38,7 @@ #include "jinglevoicesession.h" #include "jinglesessionmanager.h" -// Qt includes +// TQt includes #include // KDE includes @@ -68,14 +68,14 @@ static bool hasPeer(const JingleVoiceSession::JidList &jidList, const XMPP::Jid //BEGIN SlotsProxy /** * This class is used to receive signals from libjingle, - * which is are not compatible with Qt signals. + * which is are not compatible with TQt signals. * So it's a proxy between JingeVoiceSession(qt)<->linjingle class. */ class JingleVoiceSession::SlotsProxy : public sigslot::has_slots<> { public: - SlotsProxy(JingleVoiceSession *parent) - : voiceSession(parent) + SlotsProxy(JingleVoiceSession *tqparent) + : voiceSession(tqparent) {} void OnCallCreated(cricket::Call* call) @@ -93,7 +93,7 @@ public: XMPP::Jid jid(session->remote_address().c_str()); // Do nothing if the session do not contain a peers. - //if( !voiceSession->peers().contains(jid) ) + //if( !voiceSession->peers().tqcontains(jid) ) if( !hasPeer(voiceSession->peers(), jid) ) return; @@ -115,7 +115,7 @@ public: {} else if (state == cricket::Session::STATE_RECEIVEDMODIFY) { - //qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); + //qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").tqarg(jid.full())); } else if (state == cricket::Session::STATE_SENTREJECT) {} @@ -142,8 +142,8 @@ public: void OnSendingStanza(cricket::SessionClient*, const buzz::XmlElement *buzzStanza) { TQString irisStanza(buzzStanza->Str().c_str()); - irisStanza.replace("cli:iq","iq"); - irisStanza.replace(":cli=","="); + irisStanza.tqreplace("cli:iq","iq"); + irisStanza.tqreplace(":cli=","="); voiceSession->sendStanza(irisStanza); } @@ -152,30 +152,30 @@ private: }; //END SlotsProxy -//BEGIN JingleIQResponder -class JingleVoiceSession::JingleIQResponder : public XMPP::Task +//BEGIN JingleITQResponder +class JingleVoiceSession::JingleITQResponder : public XMPP::Task { public: - JingleIQResponder(XMPP::Task *); - ~JingleIQResponder(); + JingleITQResponder(XMPP::Task *); + ~JingleITQResponder(); bool take(const TQDomElement &); }; /** - * \class JingleIQResponder + * \class JingleITQResponder * \brief A task that responds to jingle candidate queries with an empty reply. */ -JingleVoiceSession::JingleIQResponder::JingleIQResponder(Task *parent) :Task(parent) +JingleVoiceSession::JingleITQResponder::JingleITQResponder(Task *tqparent) :Task(tqparent) { } -JingleVoiceSession::JingleIQResponder::~JingleIQResponder() +JingleVoiceSession::JingleITQResponder::~JingleITQResponder() { } -bool JingleVoiceSession::JingleIQResponder::take(const TQDomElement &e) +bool JingleVoiceSession::JingleITQResponder::take(const TQDomElement &e) { if(e.tagName() != "iq") return false; @@ -189,7 +189,7 @@ bool JingleVoiceSession::JingleIQResponder::take(const TQDomElement &e) return false; } -//END JingleIQResponder +//END JingleITQResponder class JingleVoiceSession::Private { @@ -226,7 +226,7 @@ JingleVoiceSession::JingleVoiceSession(JabberAccount *account, const JidList &pe // Listen to incoming packets connect(account->client()->client(), TQT_SIGNAL(xmlIncoming(const TQString&)), this, TQT_SLOT(receiveStanza(const TQString&))); - new JingleIQResponder(account->client()->rootTask()); + new JingleITQResponder(account->client()->rootTask()); } JingleVoiceSession::~JingleVoiceSession() diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.h b/kopete/protocols/jabber/jingle/jinglevoicesession.h index 2769d351..0089a1bf 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesession.h +++ b/kopete/protocols/jabber/jingle/jinglevoicesession.h @@ -38,6 +38,7 @@ class JingleSession; class JingleVoiceSession : public JingleSession { Q_OBJECT + TQ_OBJECT public: typedef TQValueList JidList; @@ -64,7 +65,7 @@ private: class SlotsProxy; SlotsProxy *slotsProxy; - class JingleIQResponder; + class JingleITQResponder; }; #endif diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp index b017cdfd..d5086a1a 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp @@ -16,7 +16,7 @@ */ #include "jinglevoicesessiondialog.h" -// Qt includes +// TQt includes #include #include #include @@ -40,11 +40,11 @@ using namespace XMPP; -JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *parent, const char *name) - : JingleVoiceSessionDialogBase(parent, name), m_session(caller), m_peerJid(peerJid), m_sessionState(Incoming) +JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *tqparent, const char *name) + : JingleVoiceSessionDialogBase(tqparent, name), m_session(caller), m_peerJid(peerJid), m_sessionState(Incoming) { TQString contactJid = m_peerJid.full(); - setCaption( i18n("Voice session with %1").arg(contactJid) ); + setCaption( i18n("Voice session with %1").tqarg(contactJid) ); connect(buttonAccept, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAcceptClicked())); connect(buttonDecline, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeclineClicked())); @@ -69,7 +69,7 @@ JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCall setContactInformation( peerContact ); } - labelSessionStatus->setText( i18n("Incoming Session...") ); + labelSessiontqStatus->setText( i18n("Incoming Session...") ); buttonAccept->setEnabled(true); buttonDecline->setEnabled(true); } @@ -95,7 +95,7 @@ void JingleVoiceSessionDialog::setContactInformation(JabberContact *contact) void JingleVoiceSessionDialog::start() { - labelSessionStatus->setText( i18n("Waiting for other peer...") ); + labelSessiontqStatus->setText( i18n("Waiting for other peer...") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(true); @@ -106,7 +106,7 @@ void JingleVoiceSessionDialog::start() void JingleVoiceSessionDialog::slotAcceptClicked() { - labelSessionStatus->setText( i18n("Session accepted.") ); + labelSessiontqStatus->setText( i18n("Session accepted.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(true); @@ -118,7 +118,7 @@ void JingleVoiceSessionDialog::slotAcceptClicked() void JingleVoiceSessionDialog::slotDeclineClicked() { - labelSessionStatus->setText( i18n("Session declined.") ); + labelSessiontqStatus->setText( i18n("Session declined.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(false); @@ -131,7 +131,7 @@ void JingleVoiceSessionDialog::slotDeclineClicked() void JingleVoiceSessionDialog::slotTerminateClicked() { - labelSessionStatus->setText( i18n("Session terminated.") ); + labelSessiontqStatus->setText( i18n("Session terminated.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(false); @@ -147,7 +147,7 @@ void JingleVoiceSessionDialog::sessionStarted(const Jid &jid) { if( m_peerJid.compare(jid) ) { - labelSessionStatus->setText( i18n("Session in progress.") ); + labelSessiontqStatus->setText( i18n("Session in progress.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(true); @@ -159,7 +159,7 @@ void JingleVoiceSessionDialog::sessionAccepted(const Jid &jid) { if( m_peerJid.compare(jid) ) { - labelSessionStatus->setText( i18n("Session accepted.") ); + labelSessiontqStatus->setText( i18n("Session accepted.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(true); @@ -171,7 +171,7 @@ void JingleVoiceSessionDialog::sessionDeclined(const Jid &jid) { if( m_peerJid.compare(jid) ) { - labelSessionStatus->setText( i18n("Session declined.") ); + labelSessiontqStatus->setText( i18n("Session declined.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(false); @@ -183,7 +183,7 @@ void JingleVoiceSessionDialog::sessionTerminated(const Jid &jid) { if( m_peerJid.compare(jid) ) { - labelSessionStatus->setText( i18n("Session terminated.") ); + labelSessiontqStatus->setText( i18n("Session terminated.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(false); diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h index 1a911bae..e782af03 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h +++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h @@ -30,10 +30,11 @@ class VoiceCaller; class JingleVoiceSessionDialog : public JingleVoiceSessionDialogBase { Q_OBJECT + TQ_OBJECT public: enum SessionState { Incoming, Waiting, Accepted, Declined, Started, Terminated }; - JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *parent = 0, const char *name = 0); + JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *tqparent = 0, const char *name = 0); ~JingleVoiceSessionDialog(); public slots: diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialogbase.ui b/kopete/protocols/jabber/jingle/jinglevoicesessiondialogbase.ui index 0dc9ab35..c6349007 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialogbase.ui +++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialogbase.ui @@ -1,6 +1,6 @@ JingleVoiceSessionDialogBase - + JingleVoiceSessionDialogBase @@ -19,17 +19,17 @@ unnamed - + - layout8 + tqlayout8 unnamed - + - layout5 + tqlayout5 @@ -45,14 +45,14 @@ Expanding - + 16 20 - + textLabel1 @@ -70,7 +70,7 @@ Expanding - + 20 20 @@ -79,9 +79,9 @@ - + - layout4 + tqlayout4 @@ -97,14 +97,14 @@ Expanding - + 16 20 - + labelContactPhoto @@ -116,7 +116,7 @@ 0 - + 128 128 @@ -136,7 +136,7 @@ Expanding - + 16 20 @@ -145,9 +145,9 @@ - + - layout7 + tqlayout7 @@ -163,14 +163,14 @@ Expanding - + 40 20 - + labelDisplayName @@ -188,7 +188,7 @@ Expanding - + 40 20 @@ -209,7 +209,7 @@ Expanding - + 20 16 @@ -230,9 +230,9 @@ Horizontal - + - layout1 + tqlayout1 @@ -248,7 +248,7 @@ Expanding - + 40 20 @@ -298,7 +298,7 @@ Expanding - + 40 20 @@ -307,15 +307,15 @@ - + - layout3 + tqlayout3 unnamed - + textLabel4 @@ -323,9 +323,9 @@ Current status: - + - labelSessionStatus + labelSessiontqStatus @@ -351,7 +351,7 @@ Expanding - + 20 16 @@ -360,7 +360,7 @@ - + kpushbutton.h kpushbutton.h diff --git a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp index 571f9ff6..f37bc6d6 100644 --- a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp +++ b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp @@ -23,8 +23,8 @@ #define JINGLE_NS "http://www.google.com/session" -JingleWatchSessionTask::JingleWatchSessionTask(XMPP::Task *parent) - : Task(parent) +JingleWatchSessionTask::JingleWatchSessionTask(XMPP::Task *tqparent) + : Task(tqparent) {} JingleWatchSessionTask::~JingleWatchSessionTask() diff --git a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h index 09dbdbce..0b53280e 100644 --- a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h +++ b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h @@ -21,13 +21,14 @@ /** * This task watch for incoming Jingle session and notify manager. - * It is declared in the header to be "moc"-able. + * It is declared in the header to be "tqmoc"-able. */ class JingleWatchSessionTask : public XMPP::Task { Q_OBJECT + TQ_OBJECT public: - JingleWatchSessionTask(XMPP::Task *parent); + JingleWatchSessionTask(XMPP::Task *tqparent); ~JingleWatchSessionTask(); bool take(const TQDomElement &element); diff --git a/kopete/protocols/jabber/jingle/libjingle/libjingle.pro b/kopete/protocols/jabber/jingle/libjingle/libjingle.pro index 53c8e293..8482614c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/libjingle.pro +++ b/kopete/protocols/jabber/jingle/libjingle/libjingle.pro @@ -88,7 +88,7 @@ SOURCES += \ $$JINGLE_CPP/talk/session/phone/linphonemediaengine.cc \ $$JINGLE_CPP/talk/session/phone/voicechannel.cc -#contains(DEFINES, HAVE_PORTAUDIO) { +#tqcontains(DEFINES, HAVE_PORTAUDIO) { # SOURCES += \ # $$JINGLE_CPP/talk/session/phone/portaudiomediaengine.cc #} @@ -128,11 +128,11 @@ SOURCES += \ $$JINGLE_CPP/talk/third_party/mediastreamer/mswrite.c \ $$JINGLE_CPP/talk/third_party/mediastreamer/sndcard.c -contains(DEFINES, HAVE_ALSA_ASOUNDLIB_H) { +tqcontains(DEFINES, HAVE_ALSA_ASOUNDLIB_H) { SOURCES += $$JINGLE_CPP/talk/third_party/mediastreamer/alsacard.c } -contains(DEFINES, HAVE_PORTAUDIO) { +tqcontains(DEFINES, HAVE_PORTAUDIO) { SOURCES += $$JINGLE_CPP/talk/third_party/mediastreamer/portaudiocard.c } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/base64.cc b/kopete/protocols/jabber/jingle/libjingle/talk/base/base64.cc index e0ec1b90..63130db3 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/base64.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/base64.cc @@ -24,7 +24,7 @@ static const string::size_type np = string::npos; const string Base64::Base64Table( // 0000000000111111111122222222223333333333444444444455555555556666 // 0123456789012345678901234567890123456789012345678901234567890123 - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); + "ABCDEFGHIJKLMNOPTQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); // Decode Table gives the index of any valid base64 character in the Base64 table] // 65 == A, 97 == a, 48 == 0, 43 == +, 47 == / diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/common.h b/kopete/protocols/jabber/jingle/libjingle/talk/base/common.h index b21be2f1..5f191beb 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/common.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/common.h @@ -178,8 +178,8 @@ inline void Assert(bool result, const char * function, const char * file, int li #endif // !ENABLE_DEBUG -#define COMPILE_TIME_ASSERT(expr) char CTA_UNIQUE_NAME[expr] -#define CTA_UNIQUE_NAME MAKE_NAME(__LINE__) +#define COMPILE_TIME_ASSERT(expr) char CTA_UNITQUE_NAME[expr] +#define CTA_UNITQUE_NAME MAKE_NAME(__LINE__) #define CTA_MAKE_NAME(line) MAKE_NAME2(line) #define CTA_MAKE_NAME2(line) constraint_ ## line diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.cc b/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.cc index f10489f7..38e22c2e 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.cc @@ -66,7 +66,7 @@ void MessageQueueManager::Add(MessageQueue *message_queue) { void MessageQueueManager::Remove(MessageQueue *message_queue) { CritScope cs(&crit_); std::vector::iterator iter; - iter = std::find(message_queues_.begin(), message_queues_.end(), message_queue); + iter = std::tqfind(message_queues_.begin(), message_queues_.end(), message_queue); if (iter != message_queues_.end()) message_queues_.erase(iter); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.h b/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.h index 9b35b9af..cf8917d9 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.h @@ -25,8 +25,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __MESSAGEQUEUE_H__ -#define __MESSAGEQUEUE_H__ +#ifndef __MESSAGETQUEUE_H__ +#define __MESSAGETQUEUE_H__ #include "talk/base/basictypes.h" #include "talk/base/criticalsection.h" @@ -162,4 +162,4 @@ protected: } // namespace cricket -#endif // __MESSAGEQUEUE_H__ +#endif // __MESSAGETQUEUE_H__ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/network.cc b/kopete/protocols/jabber/jingle/libjingle/talk/base/network.cc index 21b3a08f..2ea7530f 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/network.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/network.cc @@ -60,7 +60,7 @@ const double kLog2 = 0.693147180559945309417; const double kLambda = kLog2 / kHalfLife; // assume so-so quality unless data says otherwise -const double kDefaultQuality = cricket::QUALITY_FAIR; +const double kDefaultQuality = cricket::TQUALITY_FAIR; typedef std::map StrMap; @@ -261,7 +261,7 @@ void NetworkManager::GetNetworks(std::vector& result) { CreateNetworks(list); for (uint32 i = 0; i < list.size(); ++i) { - NetworkMap::iterator iter = networks_.find(list[i]->name()); + NetworkMap::iterator iter = networks_.tqfind(list[i]->name()); Network* network; if (iter == networks_.end()) { @@ -313,12 +313,12 @@ Network::Network(const std::string& name, uint32 ip) } void Network::StartSession(NetworkSession* session) { - assert(std::find(sessions_.begin(), sessions_.end(), session) == sessions_.end()); + assert(std::tqfind(sessions_.begin(), sessions_.end(), session) == sessions_.end()); sessions_.push_back(session); } void Network::StopSession(NetworkSession* session) { - SessionList::iterator iter = std::find(sessions_.begin(), sessions_.end(), session); + SessionList::iterator iter = std::tqfind(sessions_.begin(), sessions_.end(), session); if (iter != sessions_.end()) sessions_.erase(iter); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/network.h b/kopete/protocols/jabber/jingle/libjingle/talk/base/network.h index 2cc9128a..5f7d7216 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/network.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/network.h @@ -127,9 +127,9 @@ public: }; -const double QUALITY_BAD = 3.0; -const double QUALITY_FAIR = 3.35; -const double QUALITY_GOOD = 3.7; +const double TQUALITY_BAD = 3.0; +const double TQUALITY_FAIR = 3.35; +const double TQUALITY_GOOD = 3.7; } // namespace cricket diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/sigslot.h b/kopete/protocols/jabber/jingle/libjingle/talk/base/sigslot.h index 446516b8..b621185b 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/sigslot.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/sigslot.h @@ -5,7 +5,7 @@ // License: Public domain. You are free to use this code however you like, with the proviso that // the author takes on no responsibility or liability for any use. // -// QUICK DOCUMENTATION +// TQUICK DOCUMENTATION // // (see also the full documentation at http://sigslot.sourceforge.net/) // diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/socket.h b/kopete/protocols/jabber/jingle/libjingle/talk/base/socket.h index d4a49d96..7c240802 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/socket.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/socket.h @@ -84,7 +84,7 @@ #define ENOTEMPTY WSAENOTEMPTY #define EPROCLIM WSAEPROCLIM #define EUSERS WSAEUSERS -#define EDQUOT WSAEDQUOT +#define EDTQUOT WSAEDTQUOT #define ESTALE WSAESTALE #define EREMOTE WSAEREMOTE #undef EACCES diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/socketadapters.cc b/kopete/protocols/jabber/jingle/libjingle/talk/base/socketadapters.cc index f57043e3..5cdc4743 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/socketadapters.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/socketadapters.cc @@ -353,7 +353,7 @@ AsyncHttpsProxySocket::Authenticate(const char * challenge, size_t len, std::string A2 = method + ":" + uri; std::string middle; - if (args.find("qop") != args.end()) { + if (args.tqfind("qop") != args.end()) { args["qop"] = "auth"; middle = args["nonce"] + ":" + ncount + ":" + cnonce + ":" + args["qop"]; } else { @@ -375,13 +375,13 @@ AsyncHttpsProxySocket::Authenticate(const char * challenge, size_t len, ss << ", realm=" << Quote(args["realm"]); ss << ", nonce=" << Quote(args["nonce"]); ss << ", uri=" << Quote(uri); - if (args.find("qop") != args.end()) { + if (args.tqfind("qop") != args.end()) { ss << ", qop=" << args["qop"]; ss << ", nc=" << ncount; ss << ", cnonce=" << Quote(cnonce); } ss << ", response=\"" << dig_response << "\""; - if (args.find("opaque") != args.end()) { + if (args.tqfind("opaque") != args.end()) { ss << ", opaque=" << Quote(args["opaque"]); } response = ss.str(); @@ -418,14 +418,14 @@ AsyncHttpsProxySocket::Authenticate(const char * challenge, size_t len, out_buf_desc.pBuffers = &out_sec; const ULONG NEG_FLAGS_DEFAULT = - //ISC_REQ_ALLOCATE_MEMORY - ISC_REQ_CONFIDENTIALITY - //| ISC_REQ_EXTENDED_ERROR - //| ISC_REQ_INTEGRITY - | ISC_REQ_REPLAY_DETECT - | ISC_REQ_SEQUENCE_DETECT - //| ISC_REQ_STREAM - //| ISC_REQ_USE_SUPPLIED_CREDS + //ISC_RETQ_ALLOCATE_MEMORY + ISC_RETQ_CONFIDENTIALITY + //| ISC_RETQ_EXTENDED_ERROR + //| ISC_RETQ_INTEGRITY + | ISC_RETQ_REPLAY_DETECT + | ISC_RETQ_SEQUENCE_DETECT + //| ISC_RETQ_STREAM + //| ISC_RETQ_USE_SUPPLIED_CREDS ; TimeStamp lifetime; @@ -483,7 +483,7 @@ AsyncHttpsProxySocket::Authenticate(const char * challenge, size_t len, size_t len = password.GetLength()+1; char * sensitive = new char[len]; password.CopyTo(sensitive, true); - std::string::size_type pos = username.find('\\'); + std::string::size_type pos = username.tqfind('\\'); if (pos == std::string::npos) { auth_id.UserLength = static_cast( _min(sizeof(userbuf) - 1, username.size())); @@ -1100,7 +1100,7 @@ LoggingAdapter::LogMultiline(bool input, const char * data, size_t len) { const char * direction = (input ? " << " : " >> "); std::string str(data, len); while (!str.empty()) { - std::string::size_type pos = str.find('\n'); + std::string::size_type pos = str.tqfind('\n'); std::string substr = str; if (pos == std::string::npos) { substr = str; @@ -1114,9 +1114,9 @@ LoggingAdapter::LogMultiline(bool input, const char * data, size_t len) { } // Filter out any private data - std::string::size_type pos_private = substr.find("Email"); + std::string::size_type pos_private = substr.tqfind("Email"); if (pos_private == std::string::npos) { - pos_private = substr.find("Passwd"); + pos_private = substr.tqfind("Passwd"); } if (pos_private == std::string::npos) { LOG(level_) << label_ << direction << substr; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/task.cc b/kopete/protocols/jabber/jingle/libjingle/talk/base/task.cc index a5a94941..41ae9068 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/task.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/task.cc @@ -32,9 +32,9 @@ namespace buzz { -Task::Task(Task * parent) : +Task::Task(Task * tqparent) : state_(STATE_INIT), - parent_(parent), + tqparent_(tqparent), blocked_(false), done_(false), aborted_(false), @@ -42,9 +42,9 @@ Task::Task(Task * parent) : error_(false), child_error_(false), start_time_(0) { - runner_ = ((parent == NULL) ? (TaskRunner *)this : parent->GetRunner()); - if (parent_ != NULL) { - parent_->AddChild(this); + runner_ = ((tqparent == NULL) ? (TaskRunner *)this : tqparent->GetRunner()); + if (tqparent_ != NULL) { + tqparent_->AddChild(this); } } @@ -194,12 +194,12 @@ int Task::Process(int state) { void Task::AddChild(Task * child) { - children_.insert(child); + tqchildren_.insert(child); } bool Task::AllChildrenDone() { - for (ChildSet::iterator it = children_.begin(); it != children_.end(); ++it) { + for (ChildSet::iterator it = tqchildren_.begin(); it != tqchildren_.end(); ++it) { if (!(*it)->IsDone()) return false; } @@ -213,8 +213,8 @@ Task::AnyChildError() { void Task::AbortAllChildren() { - if (children_.size() > 0) { - ChildSet copy = children_; + if (tqchildren_.size() > 0) { + ChildSet copy = tqchildren_; for (ChildSet::iterator it = copy.begin(); it != copy.end(); ++it) { (*it)->Abort(true); // Note we do not wake } @@ -224,14 +224,14 @@ Task::AbortAllChildren() { void Task::Stop() { AbortAllChildren(); // No need to wake because we're either awake or in abort - parent_->OnChildStopped(this); + tqparent_->OnChildStopped(this); } void Task::OnChildStopped(Task * child) { if (child->HasError()) child_error_ = true; - children_.erase(child); + tqchildren_.erase(child); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/task.h b/kopete/protocols/jabber/jingle/libjingle/talk/base/task.h index 5a486198..553d04fb 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/task.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/task.h @@ -61,13 +61,13 @@ // might be working on something as you send it infomration, you may want // to have a queue in the task. // -// (3) Finally it helps manage parent tasks and children. If a parent -// task gets aborted, all the children tasks are too. The nice thing -// about this, for example, is if you have one parent task that +// (3) Finally it helps manage tqparent tasks and tqchildren. If a tqparent +// task gets aborted, all the tqchildren tasks are too. The nice thing +// about this, for example, is if you have one tqparent task that // represents, say, and Xmpp connection, then you can spawn a whole bunch // of infinite lifetime child tasks and now worry about cleaning them up. -// When the parent task goes to STATE_DONE, the task engine will make -// sure all those children are aborted and get deleted. +// When the tqparent task goes to STATE_DONE, the task engine will make +// sure all those tqchildren are aborted and get deleted. // // Notice that Task has a few built-in states, e.g., // @@ -103,7 +103,7 @@ class RootTask; class Task { public: - Task(Task * parent); + Task(Task * tqparent); virtual ~Task() {} void Start(); @@ -115,14 +115,14 @@ public: unsigned long long ElapsedTime(); virtual void Poll() {} - Task * GetParent() { return parent_; } + Task * GetParent() { return tqparent_; } TaskRunner * GetRunner() { return runner_; } - virtual Task * GetParent(int code) { return parent_->GetParent(code); } + virtual Task * GetParent(int code) { return tqparent_->GetParent(code); } // Called from outside to stop task without any more callbacks void Abort(bool nowake = false); - // For managing children + // For managing tqchildren bool AllChildrenDone(); bool AnyChildError(); @@ -153,7 +153,7 @@ protected: virtual int ProcessStart() = 0; virtual int ProcessResponse() { return STATE_DONE; } - // for managing children (if any) + // for managing tqchildren (if any) void AddChild(Task * child); void AbortAllChildren(); @@ -162,7 +162,7 @@ private: void OnChildStopped(Task * child); int state_; - Task * parent_; + Task * tqparent_; TaskRunner * runner_; bool blocked_; bool done_; @@ -172,9 +172,9 @@ private: bool child_error_; unsigned long long start_time_; - // for managing children + // for managing tqchildren typedef std::set ChildSet; - ChildSet children_; + ChildSet tqchildren_; }; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/taskrunner.cc b/kopete/protocols/jabber/jingle/libjingle/talk/base/taskrunner.cc index b5ecc55e..43728eb7 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/taskrunner.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/taskrunner.cc @@ -33,7 +33,7 @@ namespace buzz { TaskRunner::~TaskRunner() { - // this kills and deletes children silently! + // this kills and deletes tqchildren silently! AbortAllChildren(); RunTasks(); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.cc b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.cc index 6d818932..e781b03d 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.cc @@ -188,13 +188,13 @@ private: CallClient* call_client_; }; -const char* DescribeStatus(buzz::Status::Show show, const std::string& desc) { +const char* DescribetqStatus(buzz::tqStatus::Show show, const std::string& desc) { switch (show) { - case buzz::Status::SHOW_XA: return desc.c_str(); - case buzz::Status::SHOW_ONLINE: return "online"; - case buzz::Status::SHOW_AWAY: return "away"; - case buzz::Status::SHOW_DND: return "do not disturb"; - case buzz::Status::SHOW_CHAT: return "ready to chat"; + case buzz::tqStatus::SHOW_XA: return desc.c_str(); + case buzz::tqStatus::SHOW_ONLINE: return "online"; + case buzz::tqStatus::SHOW_AWAY: return "away"; + case buzz::tqStatus::SHOW_DND: return "do not disturb"; + case buzz::tqStatus::SHOW_CHAT: return "ready to chat"; delault: return "offline"; } } @@ -320,11 +320,11 @@ void CallClient::InitPresence() { this, &CallClient::OnStatusUpdate); presence_push_->Start(); - buzz::Status my_status; + buzz::tqStatus my_status; my_status.set_jid(xmpp_client_->jid()); my_status.set_available(true); my_status.set_invisible(false); - my_status.set_show(buzz::Status::SHOW_ONLINE); + my_status.set_show(buzz::tqStatus::SHOW_ONLINE); my_status.set_priority(0); my_status.set_know_capabilities(true); my_status.set_phone_capability(true); @@ -337,7 +337,7 @@ void CallClient::InitPresence() { presence_out_->Start(); } -void CallClient::OnStatusUpdate(const buzz::Status& status) { +void CallClient::OnStatusUpdate(const buzz::tqStatus& status) { RosterItem item; item.jid = status.jid(); item.show = status.show(); @@ -350,19 +350,19 @@ void CallClient::OnStatusUpdate(const buzz::Status& status) { (*roster_)[key] = item; } else { Console()->Printf("Removing from roster: %s", key.c_str()); - RosterMap::iterator iter = roster_->find(key); + RosterMap::iterator iter = roster_->tqfind(key); if (iter != roster_->end()) roster_->erase(iter); } } void CallClient::PrintRoster() { - Console()->Printf("Roster contains %d callable", roster_->size()); + Console()->Printf("Roster tqcontains %d callable", roster_->size()); RosterMap::iterator iter = roster_->begin(); while (iter != roster_->end()) { Console()->Printf("%s - %s", iter->second.jid.BareJid().Str().c_str(), - DescribeStatus(iter->second.show, iter->second.status)); + DescribetqStatus(iter->second.show, iter->second.status)); iter++; } } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.h b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.h index d35a6114..24ce1545 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.h @@ -29,7 +29,7 @@ namespace buzz { class PresencePushTask; -class Status; +class tqStatus; } namespace cricket { @@ -43,7 +43,7 @@ class Call; struct RosterItem { buzz::Jid jid; - buzz::Status::Show show; + buzz::tqStatus::Show show; std::string status; }; @@ -82,7 +82,7 @@ private: void OnSendStanza(cricket::SessionClient *client, const buzz::XmlElement* stanza); void InitPresence(); - void OnStatusUpdate(const buzz::Status& status); + void OnStatusUpdate(const buzz::tqStatus& status); }; #endif // CRICKET_EXAMPLES_CALL_CALLCLIENT_H__ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.cc b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.cc index a55af89e..7fd68120 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.cc @@ -42,33 +42,33 @@ bool ToString(const T &t, return !oss.fail(); } -XmppReturnStatus -PresenceOutTask::Send(const Status & s) { +XmppReturntqStatus +PresenceOutTask::Send(const tqStatus & s) { if (GetState() != STATE_INIT) return XMPP_RETURN_BADSTATE; - stanza_.reset(TranslateStatus(s)); + stanza_.reset(TranslatetqStatus(s)); return XMPP_RETURN_OK; } -XmppReturnStatus -PresenceOutTask::SendDirected(const Jid & j, const Status & s) { +XmppReturntqStatus +PresenceOutTask::SendDirected(const Jid & j, const tqStatus & s) { if (GetState() != STATE_INIT) return XMPP_RETURN_BADSTATE; - XmlElement * presence = TranslateStatus(s); - presence->AddAttr(QN_TO, j.Str()); + XmlElement * presence = TranslatetqStatus(s); + presence->AddAttr(TQN_TO, j.Str()); stanza_.reset(presence); return XMPP_RETURN_OK; } -XmppReturnStatus PresenceOutTask::SendProbe(const Jid & jid) { +XmppReturntqStatus PresenceOutTask::SendProbe(const Jid & jid) { if (GetState() != STATE_INIT) return XMPP_RETURN_BADSTATE; - XmlElement * presence = new XmlElement(QN_PRESENCE); - presence->AddAttr(QN_TO, jid.Str()); - presence->AddAttr(QN_TYPE, "probe"); + XmlElement * presence = new XmlElement(TQN_PRESENCE); + presence->AddAttr(TQN_TO, jid.Str()); + presence->AddAttr(TQN_TYPE, "probe"); stanza_.reset(presence); return XMPP_RETURN_OK; @@ -82,48 +82,48 @@ PresenceOutTask::ProcessStart() { } XmlElement * -PresenceOutTask::TranslateStatus(const Status & s) { - XmlElement * result = new XmlElement(QN_PRESENCE); +PresenceOutTask::TranslatetqStatus(const tqStatus & s) { + XmlElement * result = new XmlElement(TQN_PRESENCE); if (!s.available()) { - result->AddAttr(QN_TYPE, STR_UNAVAILABLE); + result->AddAttr(TQN_TYPE, STR_UNAVAILABLE); } else { if (s.invisible()) { - result->AddAttr(QN_TYPE, STR_INVISIBLE); + result->AddAttr(TQN_TYPE, STR_INVISIBLE); } - if (s.show() != Status::SHOW_ONLINE && s.show() != Status::SHOW_OFFLINE) { - result->AddElement(new XmlElement(QN_SHOW)); + if (s.show() != tqStatus::SHOW_ONLINE && s.show() != tqStatus::SHOW_OFFLINE) { + result->AddElement(new XmlElement(TQN_SHOW)); switch (s.show()) { default: result->AddText(STR_SHOW_AWAY, 1); break; - case Status::SHOW_XA: + case tqStatus::SHOW_XA: result->AddText(STR_SHOW_XA, 1); break; - case Status::SHOW_DND: + case tqStatus::SHOW_DND: result->AddText(STR_SHOW_DND, 1); break; - case Status::SHOW_CHAT: + case tqStatus::SHOW_CHAT: result->AddText(STR_SHOW_CHAT, 1); break; } } - result->AddElement(new XmlElement(QN_STATUS)); + result->AddElement(new XmlElement(TQN_STATUS)); result->AddText(s.status(), 1); std::string pri; ToString(s.priority(), &pri); - result->AddElement(new XmlElement(QN_PRIORITY)); + result->AddElement(new XmlElement(TQN_PRIORITY)); result->AddText(pri, 1); if (s.know_capabilities() && s.is_google_client()) { - result->AddElement(new XmlElement(QN_CAPS_C, true)); - result->AddAttr(QN_NODE, GOOGLE_CLIENT_NODE, 1); - result->AddAttr(QN_VER, s.version(), 1); - result->AddAttr(QN_EXT, s.phone_capability() ? "voice-v1" : "", 1); + result->AddElement(new XmlElement(TQN_CAPS_C, true)); + result->AddAttr(TQN_NODE, GOOGLE_CLIENT_NODE, 1); + result->AddAttr(TQN_VER, s.version(), 1); + result->AddAttr(TQN_EXT, s.phone_capability() ? "voice-v1" : "", 1); } // Put the delay mark on the presence according to JEP-0091 diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.h b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.h index 2b65a553..7307a522 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.h @@ -28,16 +28,16 @@ namespace buzz { class PresenceOutTask : public XmppTask { public: - PresenceOutTask(Task * parent) : XmppTask(parent) {} + PresenceOutTask(Task * tqparent) : XmppTask(tqparent) {} virtual ~PresenceOutTask() {} - XmppReturnStatus Send(const Status & s); - XmppReturnStatus SendDirected(const Jid & j, const Status & s); - XmppReturnStatus SendProbe(const Jid& jid); + XmppReturntqStatus Send(const tqStatus & s); + XmppReturntqStatus SendDirected(const Jid & j, const tqStatus & s); + XmppReturntqStatus SendProbe(const Jid& jid); virtual int ProcessStart(); private: - XmlElement * TranslateStatus(const Status & s); + XmlElement * TranslatetqStatus(const tqStatus & s); scoped_ptr stanza_; }; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.cc b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.cc index 03f6c6c1..ee14fe94 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.cc @@ -48,7 +48,7 @@ IsXmlSpace(int ch) { static bool ListContainsToken(const std::string & list, const std::string & token) { - size_t i = list.find(token); + size_t i = list.tqfind(token); if (i == std::string::npos || token.empty()) return false; bool boundary_before = (i == 0 || IsXmlSpace(list[i - 1])); @@ -59,9 +59,9 @@ ListContainsToken(const std::string & list, const std::string & token) { bool PresencePushTask::HandleStanza(const XmlElement * stanza) { - if (stanza->Name() != QN_PRESENCE) + if (stanza->Name() != TQN_PRESENCE) return false; - if (stanza->HasAttr(QN_TYPE) && stanza->Attr(QN_TYPE) != STR_UNAVAILABLE) + if (stanza->HasAttr(TQN_TYPE) && stanza->Attr(TQN_TYPE) != STR_UNAVAILABLE) return false; QueueStanza(stanza); return true; @@ -77,17 +77,17 @@ PresencePushTask::ProcessStart() { const XmlElement * stanza = NextStanza(); if (stanza == NULL) return STATE_BLOCKED; - Status s; + tqStatus s; - s.set_jid(Jid(stanza->Attr(QN_FROM))); + s.set_jid(Jid(stanza->Attr(TQN_FROM))); - if (stanza->Attr(QN_TYPE) == STR_UNAVAILABLE) { + if (stanza->Attr(TQN_TYPE) == STR_UNAVAILABLE) { s.set_available(false); SignalStatusUpdate(s); } else { s.set_available(true); - const XmlElement * status = stanza->FirstNamed(QN_STATUS); + const XmlElement * status = stanza->FirstNamed(TQN_STATUS); if (status != NULL) { s.set_status(status->BodyText()); @@ -104,7 +104,7 @@ PresencePushTask::ProcessStart() { } } - const XmlElement * priority = stanza->FirstNamed(QN_PRIORITY); + const XmlElement * priority = stanza->FirstNamed(TQN_PRIORITY); if (priority != NULL) { int pri; if (FromString(priority->BodyText(), &pri)) { @@ -112,33 +112,33 @@ PresencePushTask::ProcessStart() { } } - const XmlElement * show = stanza->FirstNamed(QN_SHOW); + const XmlElement * show = stanza->FirstNamed(TQN_SHOW); if (show == NULL || show->FirstChild() == NULL) { - s.set_show(Status::SHOW_ONLINE); + s.set_show(tqStatus::SHOW_ONLINE); } else { if (show->BodyText() == "away") { - s.set_show(Status::SHOW_AWAY); + s.set_show(tqStatus::SHOW_AWAY); } else if (show->BodyText() == "xa") { - s.set_show(Status::SHOW_XA); + s.set_show(tqStatus::SHOW_XA); } else if (show->BodyText() == "dnd") { - s.set_show(Status::SHOW_DND); + s.set_show(tqStatus::SHOW_DND); } else if (show->BodyText() == "chat") { - s.set_show(Status::SHOW_CHAT); + s.set_show(tqStatus::SHOW_CHAT); } else { - s.set_show(Status::SHOW_ONLINE); + s.set_show(tqStatus::SHOW_ONLINE); } } - const XmlElement * caps = stanza->FirstNamed(QN_CAPS_C); + const XmlElement * caps = stanza->FirstNamed(TQN_CAPS_C); if (caps != NULL) { - std::string node = caps->Attr(QN_NODE); - std::string ver = caps->Attr(QN_VER); - std::string exts = caps->Attr(QN_EXT); + std::string node = caps->Attr(TQN_NODE); + std::string ver = caps->Attr(TQN_VER); + std::string exts = caps->Attr(TQN_EXT); s.set_know_capabilities(true); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.h b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.h index 77459647..2ed5ac46 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.h @@ -30,9 +30,9 @@ namespace buzz { class PresencePushTask : public XmppTask { public: - PresencePushTask(Task * parent) : XmppTask(parent, XmppEngine::HL_TYPE) {} + PresencePushTask(Task * tqparent) : XmppTask(tqparent, XmppEngine::HL_TYPE) {} virtual int ProcessStart(); - sigslot::signal1SignalStatusUpdate; + sigslot::signal1SignalStatusUpdate; protected: virtual bool HandleStanza(const XmlElement * stanza); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/status.h b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/status.h index cab9312f..0677932b 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/status.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/status.h @@ -26,9 +26,9 @@ namespace buzz { -class Status { +class tqStatus { public: - Status() : + tqStatus() : pri_(0), show_(SHOW_NONE), available_(false), @@ -39,7 +39,7 @@ public: is_google_client_(false), feedback_probation_(false) {}; - ~Status() {} + ~tqStatus() {} // These are arranged in "priority order", i.e., if we see // two statuses at the same priority but with different Shows, @@ -86,7 +86,7 @@ public: void set_feedback_probation(bool f) { feedback_probation_ = f; } void set_sent_time(const std::string& time) { sent_time_ = time; } - void UpdateWith(const Status & new_value) { + void UpdateWith(const tqStatus & new_value) { if (!new_value.know_capabilities()) { bool k = know_capabilities(); bool i = is_google_client(); @@ -105,36 +105,36 @@ public: } } - bool HasQuietStatus() const { + bool HasQuiettqStatus() const { if (status_.empty()) return false; - return !(QuietStatus().empty()); + return !(QuiettqStatus().empty()); } // Knowledge of other clients' silly automatic status strings - // Don't show these. - std::string QuietStatus() const { - if (jid_.resource().find("Psi") != std::string::npos) { + std::string QuiettqStatus() const { + if (jid_.resource().tqfind("Psi") != std::string::npos) { if (status_ == "Online" || - status_.find("Auto Status") != std::string::npos) + status_.tqfind("Auto tqStatus") != std::string::npos) return STR_EMPTY; } - if (jid_.resource().find("Gaim") != std::string::npos) { + if (jid_.resource().tqfind("Gaim") != std::string::npos) { if (status_ == "Sorry, I ran out for a bit!") return STR_EMPTY; } - return TrimStatus(status_); + return TrimtqStatus(status_); } - std::string ExplicitStatus() const { - std::string result = QuietStatus(); + std::string ExplicittqStatus() const { + std::string result = QuiettqStatus(); if (result.empty()) { - result = ShowStatus(); + result = ShowtqStatus(); } return result; } - std::string ShowStatus() const { + std::string ShowtqStatus() const { std::string result; if (!available()) { result = "Offline"; @@ -159,7 +159,7 @@ public: return result; } - static std::string TrimStatus(const std::string & st) { + static std::string TrimtqStatus(const std::string & st) { std::string s(st); int j = 0; bool collapsing = true; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmppauth.cc b/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmppauth.cc index 66191f12..492559ae 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmppauth.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmppauth.cc @@ -55,12 +55,12 @@ std::string XmppAuth::ChooseBestSaslMechanism( std::vector::const_iterator it; // a token is the weakest auth - 15s, service-limited, so prefer it. - it = std::find(mechanisms.begin(), mechanisms.end(), "X-GOOGLE-TOKEN"); + it = std::tqfind(mechanisms.begin(), mechanisms.end(), "X-GOOGLE-TOKEN"); if (it != mechanisms.end()) return "X-GOOGLE-TOKEN"; // a cookie is the next weakest - 14 days - it = std::find(mechanisms.begin(), mechanisms.end(), "X-GOOGLE-COOKIE"); + it = std::tqfind(mechanisms.begin(), mechanisms.end(), "X-GOOGLE-COOKIE"); if (it != mechanisms.end()) return "X-GOOGLE-COOKIE"; @@ -70,7 +70,7 @@ std::string XmppAuth::ChooseBestSaslMechanism( // as a last resort, use plain authentication if (jid_.domain() != "google.com") { - it = std::find(mechanisms.begin(), mechanisms.end(), "PLAIN"); + it = std::tqfind(mechanisms.begin(), mechanisms.end(), "PLAIN"); if (it != mechanisms.end()) return "PLAIN"; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.cc b/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.cc index 7d966fb3..40e694e2 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.cc @@ -68,6 +68,6 @@ void XmppPump::OnMessage(cricket::Message *pmsg) { RunTasks(); } -buzz::XmppReturnStatus XmppPump::SendStanza(const buzz::XmlElement *stanza) { +buzz::XmppReturntqStatus XmppPump::SendStanza(const buzz::XmlElement *stanza) { return client_->SendStanza(stanza); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.h b/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.h index fd6f88bb..0314b2fd 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.h @@ -62,7 +62,7 @@ public: void OnMessage(cricket::Message *pmsg); - buzz::XmppReturnStatus SendStanza(const buzz::XmlElement *stanza); + buzz::XmppReturntqStatus SendStanza(const buzz::XmlElement *stanza); private: buzz::XmppClient *client_; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/p2psocket.cc b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/p2psocket.cc index eb53efeb..d07e2e5d 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/p2psocket.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/p2psocket.cc @@ -381,7 +381,7 @@ bool P2PSocket::CreateConnections(const Candidate &remote_candidate, } if ((origin_port != NULL) && - find(ports_.begin(), ports_.end(), origin_port) == ports_.end()) { + tqfind(ports_.begin(), ports_.end(), origin_port) == ports_.end()) { if (CreateConnection(origin_port, remote_candidate, origin_port, readable)) created = true; } @@ -783,7 +783,7 @@ void P2PSocket::OnConnectionDestroyed(Connection *connection) { // Remove this connection from the list. std::vector::iterator iter = - find(connections_.begin(), connections_.end(), connection); + tqfind(connections_.begin(), connections_.end(), connection); assert(iter != connections_.end()); connections_.erase(iter); @@ -807,7 +807,7 @@ void P2PSocket::OnPortDestroyed(Port* port) { assert(worker_thread_ == Thread::Current()); // Remove this port from the list (if we didn't drop it already). - std::vector::iterator iter = find(ports_.begin(), ports_.end(), port); + std::vector::iterator iter = tqfind(ports_.begin(), ports_.end(), port); if (iter != ports_.end()) ports_.erase(iter); @@ -843,7 +843,7 @@ const std::vector& P2PSocket::connections() { // Set options on ourselves is simply setting options on all of our available // port objects. int P2PSocket::SetOption(Socket::Option opt, int value) { - OptionMap::iterator it = options_.find(opt); + OptionMap::iterator it = options_.tqfind(opt); if (it == options_.end()) { options_.insert(std::make_pair(opt, value)); } else if (it->second == value) { diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/port.cc b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/port.cc index 14549b5b..c9272597 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/port.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/port.cc @@ -171,7 +171,7 @@ Port::~Port() { } Connection* Port::GetConnection(const SocketAddress& remote_addr) { - AddressMap::const_iterator iter = connections_.find(remote_addr); + AddressMap::const_iterator iter = connections_.tqfind(remote_addr); if (iter != connections_.end()) return iter->second; else @@ -449,7 +449,7 @@ void Port::Start() { } void Port::OnConnectionDestroyed(Connection* conn) { - AddressMap::iterator iter = connections_.find(conn->remote_candidate().address()); + AddressMap::iterator iter = connections_.tqfind(conn->remote_candidate().address()); assert(iter != connections_.end()); connections_.erase(iter); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/relayserver.cc b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/relayserver.cc index bb52a1d5..002033dc 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/relayserver.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/relayserver.cc @@ -105,14 +105,14 @@ RelayServer::~RelayServer() { void RelayServer::AddInternalSocket(AsyncPacketSocket* socket) { assert(internal_sockets_.end() == - std::find(internal_sockets_.begin(), internal_sockets_.end(), socket)); + std::tqfind(internal_sockets_.begin(), internal_sockets_.end(), socket)); internal_sockets_.push_back(socket); socket->SignalReadPacket.connect(this, &RelayServer::OnInternalPacket); } void RelayServer::RemoveInternalSocket(AsyncPacketSocket* socket) { SocketList::iterator iter = - std::find(internal_sockets_.begin(), internal_sockets_.end(), socket); + std::tqfind(internal_sockets_.begin(), internal_sockets_.end(), socket); assert(iter != internal_sockets_.end()); internal_sockets_.erase(iter); socket->SignalReadPacket.disconnect(this); @@ -120,14 +120,14 @@ void RelayServer::RemoveInternalSocket(AsyncPacketSocket* socket) { void RelayServer::AddExternalSocket(AsyncPacketSocket* socket) { assert(external_sockets_.end() == - std::find(external_sockets_.begin(), external_sockets_.end(), socket)); + std::tqfind(external_sockets_.begin(), external_sockets_.end(), socket)); external_sockets_.push_back(socket); socket->SignalReadPacket.connect(this, &RelayServer::OnExternalPacket); } void RelayServer::RemoveExternalSocket(AsyncPacketSocket* socket) { SocketList::iterator iter = - std::find(external_sockets_.begin(), external_sockets_.end(), socket); + std::tqfind(external_sockets_.begin(), external_sockets_.end(), socket); assert(iter != external_sockets_.end()); external_sockets_.erase(iter); socket->SignalReadPacket.disconnect(this); @@ -143,7 +143,7 @@ void RelayServer::OnInternalPacket( // If this did not come from an existing connection, it should be a STUN // allocate request. - ConnectionMap::iterator piter = connections_.find(ap); + ConnectionMap::iterator piter = connections_.tqfind(ap); if (piter == connections_.end()) { HandleStunAllocate(bytes, size, ap, socket); return; @@ -186,7 +186,7 @@ void RelayServer::OnExternalPacket( assert(!ap.destination().IsAny()); // If this connection already exists, then forward the traffic. - ConnectionMap::iterator piter = connections_.find(ap); + ConnectionMap::iterator piter = connections_.tqfind(ap); if (piter != connections_.end()) { // TODO: Check the HMAC. RelayServerConnection* ext_conn = piter->second; @@ -220,7 +220,7 @@ void RelayServer::OnExternalPacket( // TODO: Check the HMAC. // The binding should already be present. - BindingMap::iterator biter = bindings_.find(username); + BindingMap::iterator biter = bindings_.tqfind(username); if (biter == bindings_.end()) { // TODO: Turn this back on. This is the sign of a client bug. //std::cerr << "Dropping packet: no binding with username" << std::endl; @@ -299,7 +299,7 @@ void RelayServer::HandleStunAllocate( RelayServerBinding* binding; - BindingMap::iterator biter = bindings_.find(username); + BindingMap::iterator biter = bindings_.tqfind(username); if (biter != bindings_.end()) { binding = biter->second; @@ -453,18 +453,18 @@ void RelayServer::HandleStunSend( } void RelayServer::AddConnection(RelayServerConnection* conn) { - assert(connections_.find(conn->addr_pair()) == connections_.end()); + assert(connections_.tqfind(conn->addr_pair()) == connections_.end()); connections_[conn->addr_pair()] = conn; } void RelayServer::RemoveConnection(RelayServerConnection* conn) { - ConnectionMap::iterator iter = connections_.find(conn->addr_pair()); + ConnectionMap::iterator iter = connections_.tqfind(conn->addr_pair()); assert(iter != connections_.end()); connections_.erase(iter); } void RelayServer::RemoveBinding(RelayServerBinding* binding) { - BindingMap::iterator iter = bindings_.find(binding->username()); + BindingMap::iterator iter = bindings_.tqfind(binding->username()); assert(iter != bindings_.end()); bindings_.erase(iter); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/sessionmanager.cc b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/sessionmanager.cc index 4c1c09d9..d146d63c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/sessionmanager.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/sessionmanager.cc @@ -63,7 +63,7 @@ Session *SessionManager::CreateSession(const std::string &name, const SessionID& void SessionManager::DestroySession(Session *session) { if (session != NULL) { - std::map::iterator it = session_map_.find(session->id()); + std::map::iterator it = session_map_.tqfind(session->id()); if (it != session_map_.end()) { SignalSessionDestroy(session); session_map_.erase(it); @@ -74,7 +74,7 @@ void SessionManager::DestroySession(Session *session) { Session *SessionManager::GetSession(const SessionID& id) { // If the id isn't present, the [] operator will make a NULL entry - std::map::iterator it = session_map_.find(id); + std::map::iterator it = session_map_.tqfind(id); if (it != session_map_.end()) return (*it).second; return NULL; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/socketmanager.cc b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/socketmanager.cc index 2f0d67b8..e0257451 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/socketmanager.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/socketmanager.cc @@ -109,7 +109,7 @@ void SocketManager::DestroySocket_w(P2PSocket *socket) { // Only if socket exists CritScope cs(&critSM_); std::vector::iterator it; - it = std::find(sockets_.begin(), sockets_.end(), socket); + it = std::tqfind(sockets_.begin(), sockets_.end(), socket); if (it == sockets_.end()) return; sockets_.erase(it); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/stunrequest.cc b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/stunrequest.cc index 14d64735..34a62547 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/stunrequest.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/stunrequest.cc @@ -59,14 +59,14 @@ void StunRequestManager::Send(StunRequest* request) { void StunRequestManager::SendDelayed(StunRequest* request, int delay) { request->set_manager(this); - assert(requests_.find(request->id()) == requests_.end()); + assert(requests_.tqfind(request->id()) == requests_.end()); requests_[request->id()] = request; thread_->PostDelayed(delay, request, MSG_STUN_SEND, NULL); } void StunRequestManager::Remove(StunRequest* request) { assert(request->manager() == this); - RequestMap::iterator iter = requests_.find(request->id()); + RequestMap::iterator iter = requests_.tqfind(request->id()); if (iter != requests_.end()) { assert(iter->second == request); requests_.erase(iter); @@ -84,7 +84,7 @@ void StunRequestManager::Clear() { } bool StunRequestManager::CheckResponse(StunMessage* msg) { - RequestMap::iterator iter = requests_.find(msg->transaction_id()); + RequestMap::iterator iter = requests_.tqfind(msg->transaction_id()); if (iter == requests_.end()) return false; @@ -113,7 +113,7 @@ bool StunRequestManager::CheckResponse(const char* data, size_t size) { std::string id; id.append(data + 4, 16); - RequestMap::iterator iter = requests_.find(id); + RequestMap::iterator iter = requests_.tqfind(id); if (iter == requests_.end()) return false; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/client/basicportallocator.cc b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/client/basicportallocator.cc index 5192595c..42c4a876 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/client/basicportallocator.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/client/basicportallocator.cc @@ -372,7 +372,7 @@ void BasicPortAllocatorSession::AddAllocatedPort(Port* port, void BasicPortAllocatorSession::OnAddressReady(Port *port) { assert(Thread::Current() == network_thread_); - std::vector::iterator it = std::find(ports_.begin(), ports_.end(), port); + std::vector::iterator it = std::tqfind(ports_.begin(), ports_.end(), port); assert(it != ports_.end()); assert(!it->ready); it->ready = true; @@ -418,7 +418,7 @@ void BasicPortAllocatorSession::OnProtocolEnabled(AllocationSequence * seq, Prot void BasicPortAllocatorSession::OnPortDestroyed(Port* port) { assert(Thread::Current() == network_thread_); std::vector::iterator iter = - find(ports_.begin(), ports_.end(), port); + tqfind(ports_.begin(), ports_.end(), port); assert(iter != ports_.end()); ports_.erase(iter); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/client/sessionclient.cc b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/client/sessionclient.cc index 09b38a52..668309f8 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/client/sessionclient.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/client/sessionclient.cc @@ -31,7 +31,7 @@ #include "talk/p2p/client/sessionclient.h" #include "talk/p2p/base/helpers.h" #include "talk/base/logging.h" -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" #include "talk/xmpp/constants.h" #include "talk/xmllite/xmlprinter.h" #include @@ -74,25 +74,25 @@ namespace cricket { #endif const std::string NS_GOOGLESESSION("http://www.google.com/session"); -const buzz::QName QN_GOOGLESESSION_SESSION(true, NS_GOOGLESESSION, "session"); -const buzz::QName QN_GOOGLESESSION_CANDIDATE(true, NS_GOOGLESESSION, "candidate"); -const buzz::QName QN_GOOGLESESSION_TARGET(true, NS_GOOGLESESSION, "target"); -const buzz::QName QN_GOOGLESESSION_COOKIE(true, NS_GOOGLESESSION, "cookie"); -const buzz::QName QN_GOOGLESESSION_REGARDING(true, NS_GOOGLESESSION, "regarding"); - -const buzz::QName QN_TYPE(true, buzz::STR_EMPTY, "type"); -const buzz::QName QN_ID(true, buzz::STR_EMPTY, "id"); -const buzz::QName QN_INITIATOR(true, buzz::STR_EMPTY, "initiator"); -const buzz::QName QN_NAME(true, buzz::STR_EMPTY, "name"); -const buzz::QName QN_PORT(true, buzz::STR_EMPTY, "port"); -const buzz::QName QN_NETWORK(true, buzz::STR_EMPTY, "network"); -const buzz::QName QN_GENERATION(true, buzz::STR_EMPTY, "generation"); -const buzz::QName QN_ADDRESS(true, buzz::STR_EMPTY, "address"); -const buzz::QName QN_USERNAME(true, buzz::STR_EMPTY, "username"); -const buzz::QName QN_PASSWORD(true, buzz::STR_EMPTY, "password"); -const buzz::QName QN_PREFERENCE(true, buzz::STR_EMPTY, "preference"); -const buzz::QName QN_PROTOCOL(true, buzz::STR_EMPTY, "protocol"); -const buzz::QName QN_KEY(true, buzz::STR_EMPTY, "key"); +const buzz::TQName TQN_GOOGLESESSION_SESSION(true, NS_GOOGLESESSION, "session"); +const buzz::TQName TQN_GOOGLESESSION_CANDIDATE(true, NS_GOOGLESESSION, "candidate"); +const buzz::TQName TQN_GOOGLESESSION_TARGET(true, NS_GOOGLESESSION, "target"); +const buzz::TQName TQN_GOOGLESESSION_COOKIE(true, NS_GOOGLESESSION, "cookie"); +const buzz::TQName TQN_GOOGLESESSION_REGARDING(true, NS_GOOGLESESSION, "regarding"); + +const buzz::TQName TQN_TYPE(true, buzz::STR_EMPTY, "type"); +const buzz::TQName TQN_ID(true, buzz::STR_EMPTY, "id"); +const buzz::TQName TQN_INITIATOR(true, buzz::STR_EMPTY, "initiator"); +const buzz::TQName TQN_NAME(true, buzz::STR_EMPTY, "name"); +const buzz::TQName TQN_PORT(true, buzz::STR_EMPTY, "port"); +const buzz::TQName TQN_NETWORK(true, buzz::STR_EMPTY, "network"); +const buzz::TQName TQN_GENERATION(true, buzz::STR_EMPTY, "generation"); +const buzz::TQName TQN_ADDRESS(true, buzz::STR_EMPTY, "address"); +const buzz::TQName TQN_USERNAME(true, buzz::STR_EMPTY, "username"); +const buzz::TQName TQN_PASSWORD(true, buzz::STR_EMPTY, "password"); +const buzz::TQName TQN_PREFERENCE(true, buzz::STR_EMPTY, "preference"); +const buzz::TQName TQN_PROTOCOL(true, buzz::STR_EMPTY, "protocol"); +const buzz::TQName TQN_KEY(true, buzz::STR_EMPTY, "key"); class XmlCookie: public SessionMessage::Cookie { public: @@ -140,21 +140,21 @@ void SessionClient::OnSessionDestroySlot(Session *session) { bool SessionClient::IsClientStanza(const buzz::XmlElement *stanza) { // Is it a IQ set stanza? - if (stanza->Name() != buzz::QN_IQ) + if (stanza->Name() != buzz::TQN_IQ) return false; - if (stanza->Attr(buzz::QN_TYPE) != buzz::STR_SET) + if (stanza->Attr(buzz::TQN_TYPE) != buzz::STR_SET) return false; // Make sure it has the right child element const buzz::XmlElement* element - = stanza->FirstNamed(QN_GOOGLESESSION_SESSION); + = stanza->FirstNamed(TQN_GOOGLESESSION_SESSION); if (element == NULL) return false; // Is it one of the allowed types? std::string type; - if (element->HasAttr(QN_TYPE)) { - type = element->Attr(QN_TYPE); + if (element->HasAttr(TQN_TYPE)) { + type = element->Attr(TQN_TYPE); if (type != "initiate" && type != "accept" && type != "modify" && type != "candidates" && type != "reject" && type != "redirect" && type != "terminate") { @@ -163,7 +163,7 @@ bool SessionClient::IsClientStanza(const buzz::XmlElement *stanza) { } // Does this client own the session description namespace? - buzz::QName qn_session_desc(GetSessionDescriptionName(), "description"); + buzz::TQName qn_session_desc(GetSessionDescriptionName(), "description"); const buzz::XmlElement* description = element->FirstNamed(qn_session_desc); if (type == "initiate" || type == "accept" || type == "modify") { if (description == NULL) @@ -200,9 +200,9 @@ bool SessionClient::ParseIncomingMessage(const buzz::XmlElement *stanza, SessionMessage& message) { // Parse stanza into SessionMessage const buzz::XmlElement* element - = stanza->FirstNamed(QN_GOOGLESESSION_SESSION); + = stanza->FirstNamed(TQN_GOOGLESESSION_SESSION); - std::string type = element->Attr(QN_TYPE); + std::string type = element->Attr(TQN_TYPE); if (type == "initiate" || type == "accept" || type == "modify") { ParseInitiateAcceptModify(stanza, message); } else if (type == "candidates") { @@ -219,20 +219,20 @@ bool SessionClient::ParseIncomingMessage(const buzz::XmlElement *stanza, } void SessionClient::ParseHeader(const buzz::XmlElement *stanza, SessionMessage &message) { - if (stanza->HasAttr(buzz::QN_FROM)) - message.set_from(stanza->Attr(buzz::QN_FROM)); - if (stanza->HasAttr(buzz::QN_TO)) - message.set_to(stanza->Attr(buzz::QN_TO)); + if (stanza->HasAttr(buzz::TQN_FROM)) + message.set_from(stanza->Attr(buzz::TQN_FROM)); + if (stanza->HasAttr(buzz::TQN_TO)) + message.set_to(stanza->Attr(buzz::TQN_TO)); const buzz::XmlElement *element - = stanza->FirstNamed(QN_GOOGLESESSION_SESSION); - if (element->HasAttr(QN_ID)) - message.session_id().set_id_str(element->Attr(QN_ID)); + = stanza->FirstNamed(TQN_GOOGLESESSION_SESSION); + if (element->HasAttr(TQN_ID)) + message.session_id().set_id_str(element->Attr(TQN_ID)); - if (element->HasAttr(QN_INITIATOR)) - message.session_id().set_initiator(element->Attr(QN_INITIATOR)); + if (element->HasAttr(TQN_INITIATOR)) + message.session_id().set_initiator(element->Attr(TQN_INITIATOR)); - std::string type = element->Attr(QN_TYPE); + std::string type = element->Attr(TQN_TYPE); if (type == "initiate") { message.set_type(SessionMessage::TYPE_INITIATE); } else if (type == "accept") { @@ -258,8 +258,8 @@ void SessionClient::ParseInitiateAcceptModify(const buzz::XmlElement *stanza, Se // Parse session description const buzz::XmlElement *session - = stanza->FirstNamed(QN_GOOGLESESSION_SESSION); - buzz::QName qn_session_desc(GetSessionDescriptionName(), "description"); + = stanza->FirstNamed(TQN_GOOGLESESSION_SESSION); + buzz::TQName qn_session_desc(GetSessionDescriptionName(), "description"); const buzz::XmlElement* desc_elem = session->FirstNamed(qn_session_desc); const SessionDescription *description = NULL; if (desc_elem) @@ -275,10 +275,10 @@ void SessionClient::ParseCandidates(const buzz::XmlElement *stanza, SessionMessa // Parse candidates and session description std::vector candidates; const buzz::XmlElement *element - = stanza->FirstNamed(QN_GOOGLESESSION_SESSION); + = stanza->FirstNamed(TQN_GOOGLESESSION_SESSION); const buzz::XmlElement *child = element->FirstElement(); while (child != NULL) { - if (child->Name() == QN_GOOGLESESSION_CANDIDATE) { + if (child->Name() == TQN_GOOGLESESSION_CANDIDATE) { Candidate candidate; if (ParseCandidate(child, &candidate)) candidates.push_back(candidate); @@ -297,20 +297,20 @@ void SessionClient::ParseRejectTerminate(const buzz::XmlElement *stanza, Session bool SessionClient::ParseCandidate(const buzz::XmlElement *child, Candidate* candidate) { // Check for all of the required attributes. - if (!child->HasAttr(QN_NAME) || - !child->HasAttr(QN_ADDRESS) || - !child->HasAttr(QN_PORT) || - !child->HasAttr(QN_USERNAME) || - !child->HasAttr(QN_PREFERENCE) || - !child->HasAttr(QN_PROTOCOL) || - !child->HasAttr(QN_GENERATION)) { + if (!child->HasAttr(TQN_NAME) || + !child->HasAttr(TQN_ADDRESS) || + !child->HasAttr(TQN_PORT) || + !child->HasAttr(TQN_USERNAME) || + !child->HasAttr(TQN_PREFERENCE) || + !child->HasAttr(TQN_PROTOCOL) || + !child->HasAttr(TQN_GENERATION)) { LOG(LERROR) << "Candidate missing required attribute"; return false; } SocketAddress address; - address.SetIP(child->Attr(QN_ADDRESS)); - std::istringstream ist(child->Attr(QN_PORT)); + address.SetIP(child->Attr(TQN_ADDRESS)); + std::istringstream ist(child->Attr(TQN_PORT)); int port; ist >> port; address.SetPort(port); @@ -338,12 +338,12 @@ bool SessionClient::ParseCandidate(const buzz::XmlElement *child, } } - candidate->set_name(child->Attr(QN_NAME)); + candidate->set_name(child->Attr(TQN_NAME)); candidate->set_address(address); - candidate->set_username(child->Attr(QN_USERNAME)); - candidate->set_preference_str(child->Attr(QN_PREFERENCE)); - candidate->set_protocol(child->Attr(QN_PROTOCOL)); - candidate->set_generation_str(child->Attr(QN_GENERATION)); + candidate->set_username(child->Attr(TQN_USERNAME)); + candidate->set_preference_str(child->Attr(TQN_PREFERENCE)); + candidate->set_protocol(child->Attr(TQN_PROTOCOL)); + candidate->set_generation_str(child->Attr(TQN_GENERATION)); // Check that the username is not too long and does not use any bad chars. if (candidate->username().size() > kMaxUsernameSize) { @@ -356,12 +356,12 @@ bool SessionClient::ParseCandidate(const buzz::XmlElement *child, } // Look for the non-required attributes. - if (child->HasAttr(QN_PASSWORD)) - candidate->set_password(child->Attr(QN_PASSWORD)); - if (child->HasAttr(QN_TYPE)) - candidate->set_type(child->Attr(QN_TYPE)); - if (child->HasAttr(QN_NETWORK)) - candidate->set_network_name(child->Attr(QN_NETWORK)); + if (child->HasAttr(TQN_PASSWORD)) + candidate->set_password(child->Attr(TQN_PASSWORD)); + if (child->HasAttr(TQN_TYPE)) + candidate->set_type(child->Attr(TQN_TYPE)); + if (child->HasAttr(TQN_NETWORK)) + candidate->set_network_name(child->Attr(TQN_NETWORK)); return true; } @@ -369,15 +369,15 @@ bool SessionClient::ParseCandidate(const buzz::XmlElement *child, void SessionClient::ParseRedirect(const buzz::XmlElement *stanza, SessionMessage &message) { // Pull the standard header pieces out ParseHeader(stanza, message); - const buzz::XmlElement *session = stanza->FirstNamed(QN_GOOGLESESSION_SESSION); + const buzz::XmlElement *session = stanza->FirstNamed(TQN_GOOGLESESSION_SESSION); // Parse the target and cookie. - const buzz::XmlElement* target = session->FirstNamed(QN_GOOGLESESSION_TARGET); + const buzz::XmlElement* target = session->FirstNamed(TQN_GOOGLESESSION_TARGET); if (target) - message.set_redirect_target(target->Attr(QN_NAME)); + message.set_redirect_target(target->Attr(TQN_NAME)); - const buzz::XmlElement* cookie = session->FirstNamed(QN_GOOGLESESSION_COOKIE); + const buzz::XmlElement* cookie = session->FirstNamed(TQN_GOOGLESESSION_COOKIE); if (cookie) message.set_redirect_cookie(new XmlCookie(cookie)); } @@ -415,58 +415,58 @@ void SessionClient::OnOutgoingMessage(Session *session, const SessionMessage &me } buzz::XmlElement *SessionClient::TranslateHeader(const SessionMessage &message) { - buzz::XmlElement *result = new buzz::XmlElement(buzz::QN_IQ); - result->AddAttr(buzz::QN_TO, message.to()); - result->AddAttr(buzz::QN_TYPE, buzz::STR_SET); - buzz::XmlElement *session = new buzz::XmlElement(QN_GOOGLESESSION_SESSION, true); + buzz::XmlElement *result = new buzz::XmlElement(buzz::TQN_IQ); + result->AddAttr(buzz::TQN_TO, message.to()); + result->AddAttr(buzz::TQN_TYPE, buzz::STR_SET); + buzz::XmlElement *session = new buzz::XmlElement(TQN_GOOGLESESSION_SESSION, true); result->AddElement(session); switch (message.type()) { case SessionMessage::TYPE_INITIATE: - session->AddAttr(QN_TYPE, "initiate"); + session->AddAttr(TQN_TYPE, "initiate"); break; case SessionMessage::TYPE_ACCEPT: - session->AddAttr(QN_TYPE, "accept"); + session->AddAttr(TQN_TYPE, "accept"); break; case SessionMessage::TYPE_MODIFY: - session->AddAttr(QN_TYPE, "modify"); + session->AddAttr(TQN_TYPE, "modify"); break; case SessionMessage::TYPE_CANDIDATES: - session->AddAttr(QN_TYPE, "candidates"); + session->AddAttr(TQN_TYPE, "candidates"); break; case SessionMessage::TYPE_REJECT: - session->AddAttr(QN_TYPE, "reject"); + session->AddAttr(TQN_TYPE, "reject"); break; case SessionMessage::TYPE_REDIRECT: - session->AddAttr(QN_TYPE, "redirect"); + session->AddAttr(TQN_TYPE, "redirect"); break; case SessionMessage::TYPE_TERMINATE: - session->AddAttr(QN_TYPE, "terminate"); + session->AddAttr(TQN_TYPE, "terminate"); break; } - session->AddAttr(QN_ID, message.session_id().id_str()); - session->AddAttr(QN_INITIATOR, message.session_id().initiator()); + session->AddAttr(TQN_ID, message.session_id().id_str()); + session->AddAttr(TQN_INITIATOR, message.session_id().initiator()); return result; } buzz::XmlElement *SessionClient::TranslateCandidate(const Candidate &candidate) { - buzz::XmlElement *result = new buzz::XmlElement(QN_GOOGLESESSION_CANDIDATE); - result->AddAttr(QN_NAME, candidate.name()); - result->AddAttr(QN_ADDRESS, candidate.address().IPAsString()); - result->AddAttr(QN_PORT, candidate.address().PortAsString()); - result->AddAttr(QN_USERNAME, candidate.username()); - result->AddAttr(QN_PASSWORD, candidate.password()); - result->AddAttr(QN_PREFERENCE, candidate.preference_str()); - result->AddAttr(QN_PROTOCOL, candidate.protocol()); - result->AddAttr(QN_TYPE, candidate.type()); - result->AddAttr(QN_NETWORK, candidate.network_name()); - result->AddAttr(QN_GENERATION, candidate.generation_str()); + buzz::XmlElement *result = new buzz::XmlElement(TQN_GOOGLESESSION_CANDIDATE); + result->AddAttr(TQN_NAME, candidate.name()); + result->AddAttr(TQN_ADDRESS, candidate.address().IPAsString()); + result->AddAttr(TQN_PORT, candidate.address().PortAsString()); + result->AddAttr(TQN_USERNAME, candidate.username()); + result->AddAttr(TQN_PASSWORD, candidate.password()); + result->AddAttr(TQN_PREFERENCE, candidate.preference_str()); + result->AddAttr(TQN_PROTOCOL, candidate.protocol()); + result->AddAttr(TQN_TYPE, candidate.type()); + result->AddAttr(TQN_NETWORK, candidate.network_name()); + result->AddAttr(TQN_GENERATION, candidate.generation_str()); return result; } buzz::XmlElement *SessionClient::TranslateInitiateAcceptModify(const SessionMessage &message) { // Header info common to all message types buzz::XmlElement *result = TranslateHeader(message); - buzz::XmlElement *session = result->FirstNamed(QN_GOOGLESESSION_SESSION); + buzz::XmlElement *session = result->FirstNamed(TQN_GOOGLESESSION_SESSION); // Candidates assert(message.candidates().size() == 0); @@ -490,7 +490,7 @@ buzz::XmlElement *SessionClient::TranslateInitiateAcceptModify(const SessionMess buzz::XmlElement *SessionClient::TranslateCandidates(const SessionMessage &message) { // Header info common to all message types buzz::XmlElement *result = TranslateHeader(message); - buzz::XmlElement *session = result->FirstNamed(QN_GOOGLESESSION_SESSION); + buzz::XmlElement *session = result->FirstNamed(TQN_GOOGLESESSION_SESSION); // Candidates std::vector::const_iterator it; @@ -508,24 +508,24 @@ buzz::XmlElement *SessionClient::TranslateRejectTerminate(const SessionMessage & buzz::XmlElement *SessionClient::TranslateRedirect(const SessionMessage &message) { // Header info common to all message types buzz::XmlElement *result = TranslateHeader(message); - buzz::XmlElement *session = result->FirstNamed(QN_GOOGLESESSION_SESSION); + buzz::XmlElement *session = result->FirstNamed(TQN_GOOGLESESSION_SESSION); assert(message.candidates().size() == 0); assert(message.description() == NULL); assert(message.redirect_target().size() > 0); - buzz::XmlElement* target = new buzz::XmlElement(QN_GOOGLESESSION_TARGET); - target->AddAttr(QN_NAME, message.redirect_target()); + buzz::XmlElement* target = new buzz::XmlElement(TQN_GOOGLESESSION_TARGET); + target->AddAttr(TQN_NAME, message.redirect_target()); session->AddElement(target); - buzz::XmlElement* cookie = new buzz::XmlElement(QN_GOOGLESESSION_COOKIE); + buzz::XmlElement* cookie = new buzz::XmlElement(TQN_GOOGLESESSION_COOKIE); session->AddElement(cookie); // If the message does not have a redirect cookie, then this is a redirect // initiated by us. We will automatically add a regarding cookie. if (message.redirect_cookie() == NULL) { - buzz::XmlElement* regarding = new buzz::XmlElement(QN_GOOGLESESSION_REGARDING); - regarding->AddAttr(QN_NAME, GetJid().BareJid().Str()); + buzz::XmlElement* regarding = new buzz::XmlElement(TQN_GOOGLESESSION_REGARDING); + regarding->AddAttr(TQN_NAME, GetJid().BareJid().Str()); cookie->AddElement(regarding); } else { const buzz::XmlElement* cookie_elem = diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/call.cc b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/call.cc index 31b12e92..7a79d044 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/call.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/call.cc @@ -56,7 +56,7 @@ Session *Call::InitiateSession(const buzz::Jid &jid) { void Call::AcceptSession(Session *session) { std::vector::iterator it; - it = std::find(sessions_.begin(), sessions_.end(), session); + it = std::tqfind(sessions_.begin(), sessions_.end(), session); assert(it != sessions_.end()); if (it != sessions_.end()) session->Accept(session_client_->CreateAcceptSessionDescription(session->remote_description())); @@ -64,7 +64,7 @@ void Call::AcceptSession(Session *session) { void Call::RedirectSession(Session *session, const buzz::Jid &to) { std::vector::iterator it; - it = std::find(sessions_.begin(), sessions_.end(), session); + it = std::tqfind(sessions_.begin(), sessions_.end(), session); assert(it != sessions_.end()); if (it != sessions_.end()) session->Redirect(to.Str()); @@ -72,16 +72,16 @@ void Call::RedirectSession(Session *session, const buzz::Jid &to) { void Call::RejectSession(Session *session) { std::vector::iterator it; - it = std::find(sessions_.begin(), sessions_.end(), session); + it = std::tqfind(sessions_.begin(), sessions_.end(), session); assert(it != sessions_.end()); if (it != sessions_.end()) session->Reject(); } void Call::TerminateSession(Session *session) { - assert(std::find(sessions_.begin(), sessions_.end(), session) != sessions_.end()); + assert(std::tqfind(sessions_.begin(), sessions_.end(), session) != sessions_.end()); std::vector::iterator it; - it = std::find(sessions_.begin(), sessions_.end(), session); + it = std::tqfind(sessions_.begin(), sessions_.end(), session); if (it != sessions_.end()) (*it)->Terminate(); } @@ -127,14 +127,14 @@ void Call::AddSession(Session *session) { void Call::RemoveSession(Session *session) { // Remove session from list std::vector::iterator it_session; - it_session = std::find(sessions_.begin(), sessions_.end(), session); + it_session = std::tqfind(sessions_.begin(), sessions_.end(), session); if (it_session == sessions_.end()) return; sessions_.erase(it_session); // Destroy session channel std::map::iterator it_channel; - it_channel = channel_map_.find(session->id()); + it_channel = channel_map_.tqfind(session->id()); if (it_channel != channel_map_.end()) { VoiceChannel *channel = it_channel->second; channel_map_.erase(it_channel); @@ -149,7 +149,7 @@ void Call::RemoveSession(Session *session) { } VoiceChannel* Call::GetChannel(Session* session) { - std::map::iterator it = channel_map_.find(session->id()); + std::map::iterator it = channel_map_.tqfind(session->id()); assert(it != channel_map_.end()); return it->second; } @@ -184,7 +184,7 @@ void Call::Join(Call *call, bool enable) { // Move channel std::map::iterator it_channel; - it_channel = call->channel_map_.find(session->id()); + it_channel = call->channel_map_.tqfind(session->id()); if (it_channel != call->channel_map_.end()) { VoiceChannel *channel = (*it_channel).second; call->channel_map_.erase(it_channel); @@ -196,7 +196,7 @@ void Call::Join(Call *call, bool enable) { void Call::StartConnectionMonitor(Session *session, int cms) { std::map::iterator it_channel; - it_channel = channel_map_.find(session->id()); + it_channel = channel_map_.tqfind(session->id()); if (it_channel != channel_map_.end()) { VoiceChannel *channel = (*it_channel).second; channel->SignalConnectionMonitor.connect(this, &Call::OnConnectionMonitor); @@ -206,7 +206,7 @@ void Call::StartConnectionMonitor(Session *session, int cms) { void Call::StopConnectionMonitor(Session *session) { std::map::iterator it_channel; - it_channel = channel_map_.find(session->id()); + it_channel = channel_map_.tqfind(session->id()); if (it_channel != channel_map_.end()) { VoiceChannel *channel = (*it_channel).second; channel->StopConnectionMonitor(); @@ -216,7 +216,7 @@ void Call::StopConnectionMonitor(Session *session) { void Call::StartAudioMonitor(Session *session, int cms) { std::map::iterator it_channel; - it_channel = channel_map_.find(session->id()); + it_channel = channel_map_.tqfind(session->id()); if (it_channel != channel_map_.end()) { VoiceChannel *channel = (*it_channel).second; channel->SignalAudioMonitor.connect(this, &Call::OnAudioMonitor); @@ -226,7 +226,7 @@ void Call::StartAudioMonitor(Session *session, int cms) { void Call::StopAudioMonitor(Session *session) { std::map::iterator it_channel; - it_channel = channel_map_.find(session->id()); + it_channel = channel_map_.tqfind(session->id()); if (it_channel != channel_map_.end()) { VoiceChannel *channel = (*it_channel).second; channel->StopAudioMonitor(); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/channelmanager.cc b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/channelmanager.cc index 98634b12..e5e6758d 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/channelmanager.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/channelmanager.cc @@ -119,7 +119,7 @@ void ChannelManager::DestroyVoiceChannel_w(VoiceChannel *voice_channel) { CritScope cs(&crit_); // Destroy voice channel. assert(initialized_); - std::vector::iterator it = std::find(channels_.begin(), + std::vector::iterator it = std::tqfind(channels_.begin(), channels_.end(), voice_channel); assert(it != channels_.end()); if (it == channels_.end()) diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/linphonemediaengine.cc b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/linphonemediaengine.cc index f3244c54..8456a90f 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/linphonemediaengine.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/linphonemediaengine.cc @@ -110,8 +110,8 @@ void LinphoneMediaChannel::OnPacketReceived(const void *data, int len) { sendto(fd_, buf, len, 0, (struct sockaddr*)&sockaddr, sizeof(sockaddr)); } -void LinphoneMediaChannel::SetPlayout(bool playout) { - play_ = playout; +void LinphoneMediaChannel::SetPtqlayout(bool ptqlayout) { + play_ = ptqlayout; } void LinphoneMediaChannel::SetSend(bool send) { diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/linphonemediaengine.h b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/linphonemediaengine.h index 0c00be75..2639c7ac 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/linphonemediaengine.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/linphonemediaengine.h @@ -36,7 +36,7 @@ class LinphoneMediaChannel : public MediaChannel { virtual void SetCodec(const char *codec); virtual void OnPacketReceived(const void *data, int len); - virtual void SetPlayout(bool playout); + virtual void SetPtqlayout(bool ptqlayout); virtual void SetSend(bool send); virtual float GetCurrentQuality(); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/mediachannel.h b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/mediachannel.h index db2f9654..4a2e4560 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/mediachannel.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/mediachannel.h @@ -41,7 +41,7 @@ class MediaChannel { void SetInterface(NetworkInterface *iface) {network_interface_ = iface;} virtual void SetCodec(const char *codec) = 0; virtual void OnPacketReceived(const void *data, int len) = 0; - virtual void SetPlayout(bool playout) = 0; + virtual void SetPtqlayout(bool ptqlayout) = 0; virtual void SetSend(bool send) = 0; virtual float GetCurrentQuality() = 0; virtual int GetOutputLevel() = 0; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/mediaengine.h b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/mediaengine.h index fa07d2ec..fe6f0f6c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/mediaengine.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/mediaengine.h @@ -50,7 +50,7 @@ class MediaEngine { bool operator <(const Codec& c) const { return preference > c.preference; } }; - // Bitmask flags for options that may be supported by the media engine implementation + // Bittqmask flags for options that may be supported by the media engine implementation enum MediaEngineOptions { AUTO_GAIN_CONTROL = 1 << 1, }; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/phonesessionclient.cc b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/phonesessionclient.cc index 7f2ff11f..a8f0a511 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/phonesessionclient.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/phonesessionclient.cc @@ -30,16 +30,16 @@ #include "talk/base/logging.h" #include "talk/session/receiver.h" #include "talk/session/phone/phonesessionclient.h" -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" namespace { const std::string NS_PHONE("http://www.google.com/session/phone"); const std::string NS_EMPTY(""); -const buzz::QName QN_PHONE_DESCRIPTION(true, NS_PHONE, "description"); -const buzz::QName QN_PHONE_PAYLOADTYPE(true, NS_PHONE, "payload-type"); -const buzz::QName QN_PHONE_PAYLOADTYPE_ID(true, NS_EMPTY, "id"); -const buzz::QName QN_PHONE_PAYLOADTYPE_NAME(true, NS_EMPTY, "name"); +const buzz::TQName TQN_PHONE_DESCRIPTION(true, NS_PHONE, "description"); +const buzz::TQName TQN_PHONE_PAYLOADTYPE(true, NS_PHONE, "payload-type"); +const buzz::TQName TQN_PHONE_PAYLOADTYPE_ID(true, NS_EMPTY, "id"); +const buzz::TQName TQN_PHONE_PAYLOADTYPE_NAME(true, NS_EMPTY, "name"); } @@ -116,19 +116,19 @@ bool PhoneSessionClient::FindMediaCodec(MediaEngine* me, const SessionDescription *PhoneSessionClient::CreateSessionDescription(const buzz::XmlElement *element) { PhoneSessionDescription* desc = new PhoneSessionDescription(); - const buzz::XmlElement* payload_type = element->FirstNamed(QN_PHONE_PAYLOADTYPE); + const buzz::XmlElement* payload_type = element->FirstNamed(TQN_PHONE_PAYLOADTYPE); int num_payload_types = 0; while (payload_type) { - if (payload_type->HasAttr(QN_PHONE_PAYLOADTYPE_ID) && - payload_type->HasAttr(QN_PHONE_PAYLOADTYPE_NAME)) { - int id = atoi(payload_type->Attr(QN_PHONE_PAYLOADTYPE_ID).c_str()); + if (payload_type->HasAttr(TQN_PHONE_PAYLOADTYPE_ID) && + payload_type->HasAttr(TQN_PHONE_PAYLOADTYPE_NAME)) { + int id = atoi(payload_type->Attr(TQN_PHONE_PAYLOADTYPE_ID).c_str()); int pref = 0; - std::string name = payload_type->Attr(QN_PHONE_PAYLOADTYPE_NAME); + std::string name = payload_type->Attr(TQN_PHONE_PAYLOADTYPE_NAME); desc->AddCodec(MediaEngine::Codec(id, name, 0)); } - payload_type = payload_type->NextNamed(QN_PHONE_PAYLOADTYPE); + payload_type = payload_type->NextNamed(TQN_PHONE_PAYLOADTYPE); num_payload_types += 1; } @@ -145,16 +145,16 @@ const SessionDescription *PhoneSessionClient::CreateSessionDescription(const buz buzz::XmlElement *PhoneSessionClient::TranslateSessionDescription(const SessionDescription *_session_desc) { const PhoneSessionDescription* session_desc = static_cast(_session_desc); - buzz::XmlElement* description = new buzz::XmlElement(QN_PHONE_DESCRIPTION, true); + buzz::XmlElement* description = new buzz::XmlElement(TQN_PHONE_DESCRIPTION, true); for (size_t i = 0; i < session_desc->codecs().size(); ++i) { - buzz::XmlElement* payload_type = new buzz::XmlElement(QN_PHONE_PAYLOADTYPE, true); + buzz::XmlElement* payload_type = new buzz::XmlElement(TQN_PHONE_PAYLOADTYPE, true); char buf[32]; sprintf(buf, "%d", session_desc->codecs()[i].id); - payload_type->AddAttr(QN_PHONE_PAYLOADTYPE_ID, buf); + payload_type->AddAttr(TQN_PHONE_PAYLOADTYPE_ID, buf); - payload_type->AddAttr(QN_PHONE_PAYLOADTYPE_NAME, + payload_type->AddAttr(TQN_PHONE_PAYLOADTYPE_NAME, session_desc->codecs()[i].name.c_str()); description->AddElement(payload_type); @@ -202,7 +202,7 @@ void PhoneSessionClient::DestroyCall(Call *call) { // Remove it from calls_ map and delete - std::map::iterator it = calls_.find(call->id()); + std::map::iterator it = calls_.tqfind(call->id()); if (it != calls_.end()) calls_.erase(it); @@ -212,7 +212,7 @@ void PhoneSessionClient::DestroyCall(Call *call) { void PhoneSessionClient::OnSessionDestroy(Session *session) { // Find the call this session is in, remove it - std::map::iterator it = session_map_.find(session->id()); + std::map::iterator it = session_map_.tqfind(session->id()); assert(it != session_map_.end()); if (it != session_map_.end()) { Call *call = (*it).second; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.cc b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.cc index b65c9a20..90092283 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.cc @@ -25,7 +25,7 @@ #define SAMPLE_RATE 1 // Speex settings -//#define SPEEX_QUALITY 8 +//#define SPEEX_TQUALITY 8 // ORTP settings #define MAX_RTP_SIZE 1500 // From mediastreamer @@ -65,8 +65,8 @@ PortAudioMediaChannel::PortAudioMediaChannel() : mute_(false), play_(false), str speex_decoder_ctl(speex_dec_state_, SPEEX_GET_FRAME_SIZE, &speex_frame_size_); speex_frame_ = new float[speex_frame_size_]; - // int quality = SPEEX_QUALITY; - // speex_encoder_ctl(state, SPEEX_SET_QUALITY, &quality); + // int quality = SPEEX_TQUALITY; + // speex_encoder_ctl(state, SPEEX_SET_TQUALITY, &quality); // Initialize ORTP socket struct sockaddr_in sockaddr; @@ -126,12 +126,12 @@ void PortAudioMediaChannel::OnPacketReceived(const void *data, int len) } } -void PortAudioMediaChannel::SetPlayout(bool playout) +void PortAudioMediaChannel::SetPtqlayout(bool ptqlayout) { if (!stream_) return; - if (play_ && !playout) { + if (play_ && !ptqlayout) { int err = Pa_StopStream(stream_); if (err != paNoError) { fprintf(stderr, "Error stopping PortAudio stream: %s\n", Pa_GetErrorText(err)); @@ -139,7 +139,7 @@ void PortAudioMediaChannel::SetPlayout(bool playout) } play_ = false; } - else if (!play_ && playout) { + else if (!play_ && ptqlayout) { int err = Pa_StartStream(stream_); if (err != paNoError) { fprintf(stderr, "Error starting PortAudio stream: %s\n", Pa_GetErrorText(err)); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.h b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.h index 95c39a1a..89922e77 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.h @@ -15,7 +15,7 @@ public: virtual void SetCodec(const char *codec); virtual void OnPacketReceived(const void *data, int len); - virtual void SetPlayout(bool playout); + virtual void SetPtqlayout(bool ptqlayout); virtual void SetSend(bool send); virtual float GetCurrentQuality(); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/voicechannel.cc b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/voicechannel.cc index 58e1db60..c55ef287 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/voicechannel.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/voicechannel.cc @@ -168,15 +168,15 @@ void VoiceChannel::SendPacket(const void *data, size_t len) { void VoiceChannel::ChangeState() { if (paused_ || !enabled_ || !socket_writable_) { - channel_->SetPlayout(false); + channel_->SetPtqlayout(false); channel_->SetSend(false); } else { if (muted_) { channel_->SetSend(false); - channel_->SetPlayout(true); + channel_->SetPtqlayout(true); } else { channel_->SetSend(true); - channel_->SetPlayout(true); + channel_->SetPtqlayout(true); } } } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/receiver.h b/kopete/protocols/jabber/jingle/libjingle/talk/session/receiver.h index a5326893..5b75af3c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/receiver.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/receiver.h @@ -36,8 +36,8 @@ namespace cricket { class Receiver : public buzz::XmppTask { public: - Receiver(Task *parent, SessionClient *session_client) - : buzz::XmppTask(parent, buzz::XmppEngine::HL_TYPE) { + Receiver(Task *tqparent, SessionClient *session_client) + : buzz::XmppTask(tqparent, buzz::XmppEngine::HL_TYPE) { session_client_ = session_client; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/session/sessionsendtask.h b/kopete/protocols/jabber/jingle/libjingle/talk/session/sessionsendtask.h index 9dc5384c..5f67d58b 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/sessionsendtask.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/sessionsendtask.h @@ -45,8 +45,8 @@ namespace cricket { // session_client is guaranteed to outlive the xmpp session. class SessionSendTask : public buzz::XmppTask { public: - SessionSendTask(Task *parent, SessionClient *session_client) - : buzz::XmppTask(parent, buzz::XmppEngine::HL_SINGLE), + SessionSendTask(Task *tqparent, SessionClient *session_client) + : buzz::XmppTask(tqparent, buzz::XmppEngine::HL_SINGLE), session_client_(session_client), timed_out_(false) { } @@ -54,7 +54,7 @@ public: void Send(const buzz::XmlElement* stanza) { assert(stanza_.get() == NULL); stanza_.reset(new buzz::XmlElement(*stanza)); - stanza_->SetAttr(buzz::QN_ID, task_id()); + stanza_->SetAttr(buzz::TQN_ID, task_id()); } protected: @@ -81,7 +81,7 @@ protected: if (next == NULL) return STATE_BLOCKED; - if (next->Attr(buzz::QN_TYPE) == "result") { + if (next->Attr(buzz::TQN_TYPE) == "result") { return STATE_DONE; } else { session_client_->OnFailedSend(stanza_.get(), next); @@ -90,10 +90,10 @@ protected: } virtual bool HandleStanza(const buzz::XmlElement *stanza) { - if (!MatchResponseIq(stanza, buzz::Jid(stanza_->Attr(buzz::QN_TO)), task_id())) + if (!MatchResponseIq(stanza, buzz::Jid(stanza_->Attr(buzz::TQN_TO)), task_id())) return false; - if (stanza->Attr(buzz::QN_TYPE) == "result" || - stanza->Attr(buzz::QN_TYPE) == "error") { + if (stanza->Attr(buzz::TQN_TYPE) == "result" || + stanza->Attr(buzz::TQN_TYPE) == "error") { QueueStanza(stanza); return true; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/alsacard.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/alsacard.c index 24cc5a3f..6d8868d6 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/alsacard.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/alsacard.c @@ -279,7 +279,7 @@ int __alsa_card_read(AlsaCard *obj,char *buf,int bsize) sigset_t set; sigemptyset(&set); sigaddset(&set,SIGALRM); - sigprocmask(SIG_BLOCK,&set,NULL); + sigproctqmask(SIG_BLOCK,&set,NULL); err=snd_pcm_readi(obj->read_handle,buf,bsize/obj->frame_size); if (err<0) { if (err!=-EPIPE){ @@ -289,7 +289,7 @@ int __alsa_card_read(AlsaCard *obj,char *buf,int bsize) err=snd_pcm_readi(obj->read_handle,buf,bsize/obj->frame_size); if (err<0) g_warning("alsa_card_read: snd_pcm_readi() failed:%s.",snd_strerror(err)); } - sigprocmask(SIG_UNBLOCK,&set,NULL); + sigproctqmask(SIG_UNBLOCK,&set,NULL); return err*obj->frame_size; } @@ -322,7 +322,7 @@ int __alsa_card_write(AlsaCard *obj,char *buf,int size) sigset_t set; sigemptyset(&set); sigaddset(&set,SIGALRM); - sigprocmask(SIG_BLOCK,&set,NULL); + sigproctqmask(SIG_BLOCK,&set,NULL); if ((err=snd_pcm_writei(obj->write_handle,buf,size/obj->frame_size))<0){ if (err!=-EPIPE){ g_warning("alsa_card_write: snd_pcm_writei() failed:%s.",snd_strerror(err)); @@ -332,7 +332,7 @@ int __alsa_card_write(AlsaCard *obj,char *buf,int size) if (err<0) g_warning("alsa_card_write: Error writing sound buffer (size=%i):%s",size,snd_strerror(err)); } - sigprocmask(SIG_UNBLOCK,&set,NULL); + sigproctqmask(SIG_UNBLOCK,&set,NULL); return err; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/alsacard.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/alsacard.h index 1d7ba3a0..9ee33ef4 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/alsacard.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/alsacard.h @@ -27,7 +27,7 @@ #include struct _AlsaCard { - SndCard parent; + SndCard tqparent; gchar *pcmdev; gchar *mixdev; snd_pcm_t *read_handle; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/g711common.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/g711common.h index 3f5ad16f..30128191 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/g711common.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/g711common.h @@ -44,14 +44,14 @@ static inline int val_seg(int val) static inline unsigned char s16_to_alaw(int pcm_val) { - int mask; + int tqmask; int seg; unsigned char aval; if (pcm_val >= 0) { - mask = 0xD5; + tqmask = 0xD5; } else { - mask = 0x55; + tqmask = 0x55; pcm_val = -pcm_val; if (pcm_val > 0x7fff) pcm_val = 0x7fff; @@ -64,7 +64,7 @@ static inline unsigned char s16_to_alaw(int pcm_val) seg = val_seg(pcm_val); aval = (seg << 4) | ((pcm_val >> (seg + 3)) & 0x0f); } - return aval ^ mask; + return aval ^ tqmask; } /* @@ -119,16 +119,16 @@ static inline int alaw_to_s16(unsigned char a_val) static inline unsigned char s16_to_ulaw(int pcm_val) /* 2's complement (16-bit range) */ { - int mask; + int tqmask; int seg; unsigned char uval; if (pcm_val < 0) { pcm_val = 0x84 - pcm_val; - mask = 0x7f; + tqmask = 0x7f; } else { pcm_val += 0x84; - mask = 0xff; + tqmask = 0xff; } if (pcm_val > 0x7fff) pcm_val = 0x7fff; @@ -141,7 +141,7 @@ static inline unsigned char s16_to_ulaw(int pcm_val) /* 2's complement (16-bit r * and complement the code word. */ uval = (seg << 4) | ((pcm_val >> (seg + 3)) & 0x0f); - return uval ^ mask; + return uval ^ tqmask; } /* diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/hpuxsndcard.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/hpuxsndcard.c index 8a636c99..fe98df74 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/hpuxsndcard.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/hpuxsndcard.c @@ -194,7 +194,7 @@ void hpux_snd_card_set_level(HpuxSndCard *obj,gint way,gint a) g_warning("hpux_snd_card_set_level: unsupported command."); return; } - gain.channel_mask=AUDIO_CHANNEL_RIGHT|AUDIO_CHANNEL_LEFT; + gain.channel_tqmask=AUDIO_CHANNEL_RIGHT|AUDIO_CHANNEL_LEFT; mix_fd = open(obj->mixdev_name, O_WRONLY); g_return_if_fail(mix_fd>0); error=ioctl(mix_fd,AUDIO_SET_GAINS,&gain); @@ -210,7 +210,7 @@ gint hpux_snd_card_get_level(HpuxSndCard *obj,gint way) int p=0,mix_fd,error; g_return_if_fail(obj->mixdev_name!=NULL); - gain.channel_mask=AUDIO_CHANNEL_RIGHT|AUDIO_CHANNEL_LEFT; + gain.channel_tqmask=AUDIO_CHANNEL_RIGHT|AUDIO_CHANNEL_LEFT; mix_fd = open(obj->mixdev_name, O_RDONLY); g_return_if_fail(mix_fd>0); error=ioctl(mix_fd,AUDIO_GET_GAINS,&gain); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/jackcard.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/jackcard.h index 0118e035..ae6f1c7c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/jackcard.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/jackcard.h @@ -54,7 +54,7 @@ typedef struct { struct _JackCard { - SndCard parent; + SndCard tqparent; jack_client_t *client; gboolean jack_running; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/ms.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/ms.c index e83eb8dc..d243bf76 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/ms.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/ms.c @@ -81,7 +81,7 @@ static gint compare(gconstpointer a, gconstpointer b) static GList *g_list_append_if_new(GList *l,gpointer data) { GList *res=l; - if (g_list_find(res,data)==NULL) + if (g_list_tqfind(res,data)==NULL) res=g_list_append(res,data); return(res); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msAlawdec.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msAlawdec.h index c10d76fd..9e13459e 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msAlawdec.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msAlawdec.h @@ -42,7 +42,7 @@ typedef struct _MSALAWDecoderClass { /* the MSALAWDecoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSALAWDecoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSALAWDecoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msAlawenc.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msAlawenc.h index 66e9fa63..d76f2f62 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msAlawenc.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msAlawenc.h @@ -42,7 +42,7 @@ typedef struct _MSALAWEncoderClass { /* the MSALAWEncoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSALAWEncoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSALAWEncoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msGSMdecoder.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msGSMdecoder.h index 8fbce4a0..dd8d330c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msGSMdecoder.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msGSMdecoder.h @@ -45,7 +45,7 @@ typedef struct _MSGSMDecoderClass { /* the MSGSMDecoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSGSMDecoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSGSMDecoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msGSMencoder.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msGSMencoder.h index e2130625..3fad63e3 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msGSMencoder.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msGSMencoder.h @@ -44,7 +44,7 @@ typedef struct _MSGSMEncoderClass { /* the MSGSMEncoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSGSMEncoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSGSMEncoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msLPC10decoder.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msLPC10decoder.h index 8f61778b..af1ecc7c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msLPC10decoder.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msLPC10decoder.h @@ -45,7 +45,7 @@ typedef struct _MSLPC10DecoderClass { /* the MSLPC10Decoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSLPC10Decoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSLPC10DecoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msLPC10encoder.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msLPC10encoder.h index e72539ec..af900445 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msLPC10encoder.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msLPC10encoder.h @@ -57,7 +57,7 @@ typedef struct _MSLPC10EncoderClass { /* the MSLPC10Encoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSLPC10Encoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSLPC10EncoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msMUlawdec.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msMUlawdec.h index 6e038368..6e516db5 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msMUlawdec.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msMUlawdec.h @@ -42,7 +42,7 @@ typedef struct _MSMULAWDecoderClass { /* the MSMULAWDecoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSMULAWDecoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSMULAWDecoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msMUlawenc.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msMUlawenc.h index b302b339..0192984e 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msMUlawenc.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msMUlawenc.h @@ -42,7 +42,7 @@ typedef struct _MSMULAWEncoderClass { /* the MSMULAWEncoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSMULAWEncoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSMULAWEncoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msavdecoder.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msavdecoder.h index 55008939..71a04d3a 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msavdecoder.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msavdecoder.h @@ -57,7 +57,7 @@ struct _MSAVDecoderClass { /* the MSAVDecoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSAVDecoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; }; typedef struct _MSAVDecoderClass MSAVDecoderClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msavencoder.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msavencoder.h index b703a396..23da59f6 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msavencoder.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msavencoder.h @@ -58,7 +58,7 @@ struct _MSAVEncoderClass { /* the MSAVEncoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSAVEncoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; }; typedef struct _MSAVEncoderClass MSAVEncoderClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mscopy.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mscopy.h index 9b7c438b..2e03e525 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mscopy.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mscopy.h @@ -44,7 +44,7 @@ typedef struct _MSCopyClass { /* the MSCopy derivates from MSFilter, so the MSFilter class MUST be the first of the MSCopy class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSCopyClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfdispatcher.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfdispatcher.c index 623a3682..84859fda 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfdispatcher.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfdispatcher.c @@ -51,15 +51,15 @@ void ms_fdispatcher_init(MSFdispatcher *obj) void ms_fdispatcher_class_init(MSFdispatcherClass *klass) { - MSFilterClass *parent_class=MS_FILTER_CLASS(klass); - ms_filter_class_init(parent_class); - ms_filter_class_set_name(parent_class,"fdispatcher"); - parent_class->max_finputs=MS_FDISPATCHER_MAX_INPUTS; - parent_class->max_foutputs=MS_FDISPATCHER_MAX_OUTPUTS; - parent_class->r_maxgran=MS_FDISPATCHER_DEF_GRAN; - parent_class->w_maxgran=MS_FDISPATCHER_DEF_GRAN; - parent_class->destroy=(MSFilterDestroyFunc)ms_fdispatcher_destroy; - parent_class->process=(MSFilterProcessFunc)ms_fdispatcher_process; + MSFilterClass *tqparent_class=MS_FILTER_CLASS(klass); + ms_filter_class_init(tqparent_class); + ms_filter_class_set_name(tqparent_class,"fdispatcher"); + tqparent_class->max_finputs=MS_FDISPATCHER_MAX_INPUTS; + tqparent_class->max_foutputs=MS_FDISPATCHER_MAX_OUTPUTS; + tqparent_class->r_maxgran=MS_FDISPATCHER_DEF_GRAN; + tqparent_class->w_maxgran=MS_FDISPATCHER_DEF_GRAN; + tqparent_class->destroy=(MSFilterDestroyFunc)ms_fdispatcher_destroy; + tqparent_class->process=(MSFilterProcessFunc)ms_fdispatcher_process; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfdispatcher.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfdispatcher.h index 4aea7e95..a50c5637 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfdispatcher.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfdispatcher.h @@ -44,7 +44,7 @@ typedef struct _MSFdispatcherClass { /* the MSFdispatcher derivates from MSFilter, so the MSFilter class MUST be the first of the MSFdispatcher class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSFdispatcherClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfilter.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfilter.c index cb69904c..c73081a2 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfilter.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfilter.c @@ -130,7 +130,7 @@ int ms_filter_add_link(MSFilter *m1, MSFilter *m2) if ((m1_q!=-1) && (m2_q!=-1)){ /* link with queues */ ms_trace("m1_q=%i , m2_q=%i",m1_q,m2_q); - return ms_filter_link(m1,m1_q,m2,m2_q,LINK_QUEUE); + return ms_filter_link(m1,m1_q,m2,m2_q,LINK_TQUEUE); } if ((m1_f!=-1) && (m2_f!=-1)){ /* link with queues */ @@ -146,7 +146,7 @@ int ms_filter_add_link(MSFilter *m1, MSFilter *m2) * @pin1: The pin number on @m1. * @m2: A #MSFilter object. * @pin2: The pin number on @m2. - * @linktype: Type of connection, it may be #LINK_QUEUE, #LINK_FIFOS. + * @linktype: Type of connection, it may be #LINK_TQUEUE, #LINK_FIFOS. * * This function links two MSFilter object between them. It must be used to make chains of filters. * All data outgoing from pin1 of m1 will go to the input pin2 of m2. @@ -165,7 +165,7 @@ int ms_filter_link(MSFilter *m1, gint pin1, MSFilter *m2,gint pin2, int linktype g_message("ms_filter_add_link: %s,%i -> %s,%i",m1->klass->name,pin1,m2->klass->name,pin2); switch(linktype) { - case LINK_QUEUE: + case LINK_TQUEUE: /* Are filter m1 and m2 able to accept more queues connections ?*/ g_return_val_if_fail(m1->qoutputsmax_qoutputs,-EMLINK); g_return_val_if_fail(m2->qinputsmax_qinputs,-EMLINK); @@ -244,7 +244,7 @@ int ms_filter_link(MSFilter *m1, gint pin1, MSFilter *m2,gint pin2, int linktype * @pin1: The pin number on @m1. * @m2: A #MSFilter object. * @pin2: The pin number on @m2. - * @linktype: Type of connection, it may be #LINK_QUEUE, #LINK_FIFOS. + * @linktype: Type of connection, it may be #LINK_TQUEUE, #LINK_FIFOS. * * Unlink @pin1 of filter @m1 from @pin2 of filter @m2. @linktype specifies what type of connection is removed. * @@ -254,7 +254,7 @@ int ms_filter_unlink(MSFilter *m1, gint pin1, MSFilter *m2,gint pin2,gint linkty { switch(linktype) { - case LINK_QUEUE: + case LINK_TQUEUE: /* Are filter m1 and m2 valid with their inputs and outputs ?*/ g_return_val_if_fail(m1->outqueues!=NULL,-EFAULT); g_return_val_if_fail(m2->inqueues!=NULL,-EFAULT); @@ -321,7 +321,7 @@ gint ms_filter_remove_links(MSFilter *m1, MSFilter *m2) if (rmf==m2){ j=find_iq(rmf,qo); if (j==-1) g_error("Could not find input queue: impossible case."); - ms_filter_unlink(m1,i,m2,j,LINK_QUEUE); + ms_filter_unlink(m1,i,m2,j,LINK_TQUEUE); removed=0; } } @@ -419,7 +419,7 @@ GList *filter_list=NULL; void ms_filter_register(MSFilterInfo *info) { gpointer tmp; - tmp=g_list_find(filter_list,info); + tmp=g_list_tqfind(filter_list,info); if (tmp==NULL) filter_list=g_list_append(filter_list,(gpointer)info); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfilter.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfilter.h index 89f91ad8..60c87411 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfilter.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msfilter.h @@ -98,7 +98,7 @@ typedef struct _MSFilterClass void (*destroy)(MSFilter *filter); guint attributes; #define FILTER_HAS_FIFOS (0x0001) -#define FILTER_HAS_QUEUES (0x0001<<1) +#define FILTER_HAS_TQUEUES (0x0001<<1) #define FILTER_IS_SOURCE (0x0001<<2) #define FILTER_IS_SINK (0x0001<<3) #define FILTER_CAN_SYNC (0x0001<<4) @@ -151,7 +151,7 @@ void ms_filter_destroy(MSFilter *f); #define LINK_DEFAULT 0 #define LINK_FIFO 1 -#define LINK_QUEUE 2 +#define LINK_TQUEUE 2 #define MSFILTER_VERSION(a,b,c) (((a)<<2)|((b)<<1)|(c)) diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msilbcdec.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msilbcdec.h index a3d0a326..035a80fd 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msilbcdec.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msilbcdec.h @@ -49,7 +49,7 @@ typedef struct _MSILBCDecoderClass { /* the MSILBCDecoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSILBCDecoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSILBCDecoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msilbcenc.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msilbcenc.h index b072e430..6995022c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msilbcenc.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msilbcenc.h @@ -64,7 +64,7 @@ typedef struct _MSILBCEncoderClass { /* the MSILBCEncoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSILBCEncoder class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSILBCEncoderClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msnosync.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msnosync.h index a6c9e9e8..7af095f8 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msnosync.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msnosync.h @@ -38,7 +38,7 @@ typedef struct _MSNoSync typedef struct _MSNoSyncClass { /* the MSSyncClass must be the first field of the class in order to the class mechanism to work*/ - MSSyncClass parent_class; + MSSyncClass tqparent_class; } MSNoSyncClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msossread.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msossread.h index e359f271..78fa91ad 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msossread.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msossread.h @@ -53,7 +53,7 @@ struct _MSOssReadClass { /* the MSOssRead derivates from MSSoundRead, so the MSSoundRead class MUST be the first of the MSOssRead class in order to the class mechanism to work*/ - MSSoundReadClass parent_class; + MSSoundReadClass tqparent_class; }; typedef struct _MSOssReadClass MSOssReadClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msosswrite.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msosswrite.h index 024eebb4..21abb2a1 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msosswrite.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msosswrite.h @@ -52,7 +52,7 @@ struct _MSOssWriteClass { /* the MSOssWrite derivates from MSSoundWrite, so the MSSoundWrite class MUST be the first of the MSOssWrite class in order to the class mechanism to work*/ - MSSoundWriteClass parent_class; + MSSoundWriteClass tqparent_class; }; typedef struct _MSOssWriteClass MSOssWriteClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqdispatcher.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqdispatcher.c index b924b0dd..20051b62 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqdispatcher.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqdispatcher.c @@ -43,22 +43,22 @@ void ms_qdispatcher_init(MSQdispatcher *obj) MS_FILTER(obj)->inqueues=obj->q_inputs; MS_FILTER(obj)->outqueues=obj->q_outputs; - memset(obj->q_inputs,0,sizeof(MSQueue*)*MS_QDISPATCHER_MAX_INPUTS); - memset(obj->q_outputs,0,sizeof(MSQueue*)*MS_QDISPATCHER_MAX_OUTPUTS); + memset(obj->q_inputs,0,sizeof(MSQueue*)*MS_TQDISPATCHER_MAX_INPUTS); + memset(obj->q_outputs,0,sizeof(MSQueue*)*MS_TQDISPATCHER_MAX_OUTPUTS); } void ms_qdispatcher_class_init(MSQdispatcherClass *klass) { - MSFilterClass *parent_class=MS_FILTER_CLASS(klass); - ms_filter_class_init(parent_class); - ms_filter_class_set_name(parent_class,"qdispatcher"); - parent_class->max_qinputs=MS_QDISPATCHER_MAX_INPUTS; - parent_class->max_qoutputs=MS_QDISPATCHER_MAX_OUTPUTS; + MSFilterClass *tqparent_class=MS_FILTER_CLASS(klass); + ms_filter_class_init(tqparent_class); + ms_filter_class_set_name(tqparent_class,"qdispatcher"); + tqparent_class->max_qinputs=MS_TQDISPATCHER_MAX_INPUTS; + tqparent_class->max_qoutputs=MS_TQDISPATCHER_MAX_OUTPUTS; - parent_class->destroy=(MSFilterDestroyFunc)ms_qdispatcher_destroy; - parent_class->process=(MSFilterProcessFunc)ms_qdispatcher_process; + tqparent_class->destroy=(MSFilterDestroyFunc)ms_qdispatcher_destroy; + tqparent_class->process=(MSFilterProcessFunc)ms_qdispatcher_process; } @@ -77,7 +77,7 @@ void ms_qdispatcher_process(MSQdispatcher *obj) MSMessage *m1,*m2; while ( (m1=ms_queue_get(inq))!=NULL){ /* dispatch incoming messages to output queues */ - for (i=0;iq_outputs[i]; if (outq!=NULL){ m2=ms_message_dup(m1); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqdispatcher.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqdispatcher.h index 054440d1..66e80902 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqdispatcher.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqdispatcher.h @@ -19,36 +19,36 @@ */ -#ifndef MSQDISPATCHER_H -#define MSQDISPATCHER_H +#ifndef MSTQDISPATCHER_H +#define MSTQDISPATCHER_H #include "msfilter.h" /*this is the class that implements a qdispatcher filter*/ -#define MS_QDISPATCHER_MAX_INPUTS 1 -#define MS_QDISPATCHER_MAX_OUTPUTS 5 +#define MS_TQDISPATCHER_MAX_INPUTS 1 +#define MS_TQDISPATCHER_MAX_OUTPUTS 5 typedef struct _MSQdispatcher { /* the MSQdispatcher derivates from MSFilter, so the MSFilter object MUST be the first of the MSQdispatcher object in order to the object mechanism to work*/ MSFilter filter; - MSQueue *q_inputs[MS_QDISPATCHER_MAX_INPUTS]; - MSQueue *q_outputs[MS_QDISPATCHER_MAX_OUTPUTS]; + MSQueue *q_inputs[MS_TQDISPATCHER_MAX_INPUTS]; + MSQueue *q_outputs[MS_TQDISPATCHER_MAX_OUTPUTS]; } MSQdispatcher; typedef struct _MSQdispatcherClass { /* the MSQdispatcher derivates from MSFilter, so the MSFilter class MUST be the first of the MSQdispatcher class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSQdispatcherClass; /* PUBLIC */ -#define MS_QDISPATCHER(filter) ((MSQdispatcher*)(filter)) -#define MS_QDISPATCHER_CLASS(klass) ((MSQdispatcherClass*)(klass)) +#define MS_TQDISPATCHER(filter) ((MSQdispatcher*)(filter)) +#define MS_TQDISPATCHER_CLASS(klass) ((MSQdispatcherClass*)(klass)) MSFilter * ms_qdispatcher_new(void); /* FOR INTERNAL USE*/ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqueue.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqueue.h index 7094b088..ee8e1f44 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqueue.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msqueue.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef MSQUEUE_H -#define MSQUEUE_H +#ifndef MSTQUEUE_H +#define MSTQUEUE_H #include "msbuffer.h" diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msread.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msread.h index b695f7da..a40f4fa0 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msread.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msread.h @@ -55,7 +55,7 @@ typedef struct _MSReadClass { /* the MSRead derivates from MSFilter, so the MSFilter class MUST be the first of the MSRead class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSReadClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msringplayer.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msringplayer.h index a090afbf..715cdf3c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msringplayer.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msringplayer.h @@ -59,7 +59,7 @@ struct _MSRingPlayerClass { /* the MSRingPlayer derivates from MSFilter, so the MSFilter class MUST be the first of the MSRingPlayer class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; }; typedef struct _MSRingPlayerClass MSRingPlayerClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtprecv.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtprecv.h index 0f36c379..e9fd7937 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtprecv.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtprecv.h @@ -55,7 +55,7 @@ struct _MSRtpRecvClass { /* the MSCopy derivates from MSFilter, so the MSFilter class MUST be the first of the MSCopy class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; }; typedef struct _MSRtpRecvClass MSRtpRecvClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtpsend.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtpsend.h index 96889964..56728f16 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtpsend.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtpsend.h @@ -59,7 +59,7 @@ struct _MSRtpSendClass { /* the MSRtpSend derivates from MSFilter, so the MSFilter class MUST be the first of the MSCopy class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; }; typedef struct _MSRtpSendClass MSRtpSendClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssdlout.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssdlout.h index 0ce08618..b19c7e74 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssdlout.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssdlout.h @@ -36,7 +36,7 @@ struct _MSSdlOut { - MSFilter parent; + MSFilter tqparent; MSQueue *input[2]; gint width,height; const gchar *format; @@ -51,7 +51,7 @@ typedef struct _MSSdlOut MSSdlOut; struct _MSSdlOutClass { - MSFilterClass parent_class; + MSFilterClass tqparent_class; }; typedef struct _MSSdlOutClass MSSdlOutClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssoundread.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssoundread.h index 9c5512b0..31349250 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssoundread.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssoundread.h @@ -38,7 +38,7 @@ struct _MSSoundReadClass { /* the MSOssRead derivates from MSFilter, so the MSFilter class MUST be the first of the MSOssRead class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; gint (*set_device)(MSSoundRead *, gint devid); void (*start)(MSSoundRead *); void (*stop)(MSSoundRead*); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssoundwrite.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssoundwrite.h index 8c1bab2d..e8fae0d8 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssoundwrite.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mssoundwrite.h @@ -38,7 +38,7 @@ struct _MSSoundWriteClass { /* the MSOssWrite derivates from MSFilter, so the MSFilter class MUST be the first of the MSOssWrite class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; gint (*set_device)(MSSoundWrite *, gint devid); void (*start)(MSSoundWrite *); void (*stop)(MSSoundWrite*); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msspeexdec.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msspeexdec.h index 370af69e..9c7f7fc4 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msspeexdec.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msspeexdec.h @@ -27,7 +27,7 @@ struct _MSSpeexDec { - MSFilter parent; + MSFilter tqparent; MSQueue *inq[1]; /* speex has an input q because it can be variable bit rate */ MSFifo *outf[1]; void *speex_state; @@ -42,7 +42,7 @@ typedef struct _MSSpeexDec MSSpeexDec; struct _MSSpeexDecClass { - MSFilterClass parent; + MSFilterClass tqparent; }; typedef struct _MSSpeexDecClass MSSpeexDecClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msspeexenc.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msspeexenc.h index f63edfcd..2325ba23 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msspeexenc.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msspeexenc.h @@ -27,7 +27,7 @@ struct _MSSpeexEnc { - MSFilter parent; + MSFilter tqparent; MSFifo *inf[1]; MSQueue *outq[1]; /* speex has an output q because it can be variable bit rate */ void *speex_state; @@ -42,7 +42,7 @@ typedef struct _MSSpeexEnc MSSpeexEnc; struct _MSSpeexEncClass { - MSFilterClass parent; + MSFilterClass tqparent; }; typedef struct _MSSpeexEncClass MSSpeexEncClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstimer.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstimer.h index 3fe11350..b245ab86 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstimer.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstimer.h @@ -42,7 +42,7 @@ typedef struct _MSTimer typedef struct _MSTimerClass { /* the MSSyncClass must be the first field of the class in order to the class mechanism to work*/ - MSSyncClass parent_class; + MSSyncClass tqparent_class; } MSTimerClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstruespeechdecoder.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstruespeechdecoder.h index a61719ea..105e2603 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstruespeechdecoder.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstruespeechdecoder.h @@ -42,7 +42,7 @@ typedef struct _MSTrueSpeechDecoderClass so the MSFilter class MUST be the first of the MSTrueSpechDecoder class in order for the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; Win32CodecDriver* driver; } MSTrueSpeechDecoderClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstruespeechencoder.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstruespeechencoder.h index 78024946..2637d3ac 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstruespeechencoder.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mstruespeechencoder.h @@ -46,7 +46,7 @@ typedef struct _MSTrueSpeechEncoderClass so the MSFilter class MUST be the first of the MSTrueSpechEncoder class in order for the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; Win32CodecDriver* driver; } MSTrueSpeechEncoderClass; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msutils.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msutils.h index ecd8eb32..2b4f7bd2 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msutils.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msutils.h @@ -50,8 +50,8 @@ #define VIDEO_SIZE_CIF_W 352 #define VIDEO_SIZE_CIF_H 288 -#define VIDEO_SIZE_QCIF_W 176 -#define VIDEO_SIZE_QCIF_H 144 +#define VIDEO_SIZE_TQCIF_W 176 +#define VIDEO_SIZE_TQCIF_H 144 #define VIDEO_SIZE_4CIF_W 704 #define VIDEO_SIZE_4CIF_H 576 #define VIDEO_SIZE_MAX_W VIDEO_SIZE_4CIF_W diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msv4l.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msv4l.h index 3dc5ee04..e289ccc8 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msv4l.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msv4l.h @@ -27,7 +27,7 @@ struct _MSV4l { - MSVideoSource parent; + MSVideoSource tqparent; int fd; char *device; struct video_capability cap; @@ -61,7 +61,7 @@ typedef struct _MSV4l MSV4l; struct _MSV4lClass { - MSVideoSourceClass parent_class; + MSVideoSourceClass tqparent_class; }; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msvideosource.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msvideosource.h index 897b239e..2189a6df 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msvideosource.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msvideosource.h @@ -45,7 +45,7 @@ typedef struct _MSVideoSourceClass { /* the MSVideoSource derivates from MSFilter, so the MSFilter class MUST be the first of the MSVideoSource class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; gint (*set_device)(MSVideoSource *s, const gchar *name); void (*start)(MSVideoSource *s); void (*stop)(MSVideoSource *s); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mswrite.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mswrite.h index 8492a09d..55081793 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mswrite.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/mswrite.h @@ -45,7 +45,7 @@ typedef struct _MSWriteClass { /* the MSWrite derivates from MSFilter, so the MSFilter class MUST be the first of the MSWrite class in order to the class mechanism to work*/ - MSFilterClass parent_class; + MSFilterClass tqparent_class; } MSWriteClass; /* PUBLIC */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/osscard.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/osscard.h index 0f1e09ab..6413c682 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/osscard.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/osscard.h @@ -27,7 +27,7 @@ #define OSS_CARD_BUFFERS 3 struct _OssCard { - SndCard parent; + SndCard tqparent; gchar *dev_name; /* /dev/dsp0 for example */ gchar *mixdev_name; /* /dev/mixer0 for example */ gint fd; /* the file descriptor of the open soundcard, 0 if not open*/ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/portaudiocard.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/portaudiocard.h index 2ffc6cd1..caf906df 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/portaudiocard.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/portaudiocard.h @@ -24,7 +24,7 @@ typedef struct _PortAudioCard { - SndCard parent; + SndCard tqparent; PortAudioStream* stream; char *out_buffer, *out_buffer_read, *out_buffer_write, *out_buffer_end; char *in_buffer, *in_buffer_read, *in_buffer_write, *in_buffer_end; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/ortp.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/ortp.c index 80e07682..1ac35d9c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/ortp.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/ortp.c @@ -101,7 +101,7 @@ void ortp_scheduler_init() sigset_t set; sigemptyset(&set); sigaddset(&set,SIGALRM); - sigprocmask(SIG_BLOCK,&set,NULL); + sigproctqmask(SIG_BLOCK,&set,NULL); #endif /* __hpux */ if (!g_thread_supported()) g_thread_init(NULL); __ortp_scheduler=rtp_scheduler_new(); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtp.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtp.h index 625d2111..f67409d8 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtp.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtp.h @@ -26,7 +26,7 @@ -#define RTP_MAX_RQ_SIZE 100 /* max number of packet allowed to be enqueued */ +#define RTP_MAX_RTQ_SIZE 100 /* max number of packet allowed to be enqueued */ #define IPMAXLEN 20 #define UDP_MAX_SIZE 65536 diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpsession.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpsession.c index de6b2e7d..a73aa121 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpsession.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpsession.c @@ -104,7 +104,7 @@ rtp_session_init (RtpSession * session, gint mode) { memset (session, 0, sizeof (RtpSession)); session->lock = g_mutex_new (); - session->rtp.max_rq_size = RTP_MAX_RQ_SIZE; + session->rtp.max_rq_size = RTP_MAX_RTQ_SIZE; session->mode = mode; if ((mode == RTP_SESSION_RECVONLY) || (mode == RTP_SESSION_SENDRECV)) { diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpsession.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpsession.h index e7702000..81554a06 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpsession.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpsession.h @@ -177,7 +177,7 @@ struct _RtpSession RtpSessionMode mode; struct _RtpScheduler *sched; guint32 flags; - gint mask_pos; /* the position in the scheduler mask of RtpSession */ + gint tqmask_pos; /* the position in the scheduler tqmask of RtpSession */ gpointer user_data; /* telephony events extension */ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/scheduler.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/scheduler.c index 17ff6748..2ea733ac 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/scheduler.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/scheduler.c @@ -148,7 +148,7 @@ gpointer rtp_scheduler_schedule(gpointer psched) g_mutex_unlock(sched->lock); /* now while the scheduler is going to sleep, the other threads can compute their - result mask and see if they have to leave, or to wait for next tick*/ + result tqmask and see if they have to leave, or to wait for next tick*/ //g_message("scheduler: sleeping."); timer->timer_do(); sched->time_+=sched->timer_inc; @@ -174,10 +174,10 @@ void rtp_scheduler_add_session(RtpScheduler *sched, RtpSession *session) if (sched->max_sessions==0){ g_error("rtp_scheduler_add_session: max_session=0 !"); } - /* find a free pos in the session mask*/ + /* find a free pos in the session tqmask*/ for (i=0;imax_sessions;i++){ if (!ORTP_FD_ISSET(i,&sched->all_sessions.rtpset)){ - session->mask_pos=i; + session->tqmask_pos=i; session_set_set(&sched->all_sessions,session); /* make a new session scheduled not blockable if it has not started*/ if (session->flags & RTP_SESSION_RECV_NOT_STARTED) @@ -229,7 +229,7 @@ void rtp_scheduler_remove_session(RtpScheduler *sched, RtpSession *session) } } rtp_session_unset_flag(session,RTP_SESSION_IN_SCHEDULER); - /* delete the bit in the mask */ + /* delete the bit in the tqmask */ session_set_clr(&sched->all_sessions,session); rtp_scheduler_unlock(sched); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/scheduler.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/scheduler.h index 91cde6a9..106f1fcd 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/scheduler.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/scheduler.h @@ -29,15 +29,15 @@ struct _RtpScheduler { RtpSession *list; /* list of scheduled sessions*/ - SessionSet all_sessions; /* mask of scheduled sessions */ - gint all_max; /* the highest pos in the all mask */ - SessionSet r_sessions; /* mask of sessions that have a recv event */ + SessionSet all_sessions; /* tqmask of scheduled sessions */ + gint all_max; /* the highest pos in the all tqmask */ + SessionSet r_sessions; /* tqmask of sessions that have a recv event */ gint r_max; - SessionSet w_sessions; /* mask of sessions that have a send event */ + SessionSet w_sessions; /* tqmask of sessions that have a send event */ gint w_max; - SessionSet e_sessions; /* mask of session that have error event */ + SessionSet e_sessions; /* tqmask of session that have error event */ gint e_max; - gint max_sessions; /* the number of position in the masks */ + gint max_sessions; /* the number of position in the tqmasks */ /* GMutex *unblock_select_mutex; */ GCond *unblock_select_cond; GMutex *lock; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/sessionset.c b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/sessionset.c index 7b5ad921..bea1a7c9 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/sessionset.c +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/sessionset.c @@ -60,27 +60,27 @@ void session_set_destroy(SessionSet *set) gint session_set_and(SessionSet *sched_set, gint maxs, SessionSet *user_set, SessionSet *result_set) { - guint32 *mask1,*mask2,*mask3; + guint32 *tqmask1,*tqmask2,*tqmask3; gint i=0; gint j,ret=0; - mask1=(guint32*)&sched_set->rtpset; - mask2=(guint32*)&user_set->rtpset; - mask3=(guint32*)&result_set->rtpset; + tqmask1=(guint32*)&sched_set->rtpset; + tqmask2=(guint32*)&user_set->rtpset; + tqmask3=(guint32*)&result_set->rtpset; while(i>j) & 1){ + if ( ((*tqmask3)>>j) & 1){ ret++; } } } i+=32; - mask1++; - mask2++; - mask3++; + tqmask1++; + tqmask2++; + tqmask3++; } //printf("session_set_and: ret=%i\n",ret); return ret; @@ -116,12 +116,12 @@ int session_set_select(SessionSet *recvs, SessionSet *sends, SessionSet *errors) SessionSet temp; RtpScheduler *sched=ortp_get_scheduler(); - /*lock the scheduler to not read the masks while they are being modified by the scheduler*/ + /*lock the scheduler to not read the tqmasks while they are being modified by the scheduler*/ rtp_scheduler_lock(sched); while(1){ - /* computes the SessionSet intersection (in the other words mask intersection) between - the mask given by the user and scheduler masks */ + /* computes the SessionSet intersection (in the other words tqmask intersection) between + the tqmask given by the user and scheduler tqmasks */ if (recvs!=NULL){ bits=session_set_and(&sched->r_sessions,sched->all_max,recvs,&temp); if (bits>0){ diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/sessionset.h b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/sessionset.h index 623b9d10..b4a0b904 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/sessionset.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/sessionset.h @@ -45,7 +45,7 @@ typedef fd_set ortp_fd_set; do { \ unsigned int __i; \ ortp_fd_set *__arr = (s); \ - for (__i = 0; __i < sizeof (ortp_fd_set) / sizeof (ortp__fd_mask); ++__i) \ + for (__i = 0; __i < sizeof (ortp_fd_set) / sizeof (ortp__fd_tqmask); ++__i) \ ORTP__FDS_BITS (__arr)[__i] = 0; \ } while (0) #define ORTP_FD_SET(d, s) (ORTP__FDS_BITS (s)[ORTP__FDELT(d)] |= ORTP__FDMASK(d)) @@ -55,22 +55,22 @@ typedef fd_set ortp_fd_set; /* The fd_set member is required to be an array of longs. */ -typedef long int ortp__fd_mask; +typedef long int ortp__fd_tqmask; /* Number of bits per word of `fd_set' (some code assumes this is 32). */ #define ORTP__FD_SETSIZE 1024 /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define ORTP__NFDBITS (8 * sizeof (ortp__fd_mask)) +#define ORTP__NFDBITS (8 * sizeof (ortp__fd_tqmask)) #define ORTP__FDELT(d) ((d) / ORTP__NFDBITS) -#define ORTP__FDMASK(d) ((ortp__fd_mask) 1 << ((d) % ORTP__NFDBITS)) +#define ORTP__FDMASK(d) ((ortp__fd_tqmask) 1 << ((d) % ORTP__NFDBITS)) /* fd_set for select and pselect. */ typedef struct { - ortp__fd_mask fds_bits[ORTP__FD_SETSIZE / ORTP__NFDBITS]; + ortp__fd_tqmask fds_bits[ORTP__FD_SETSIZE / ORTP__NFDBITS]; # define ORTP__FDS_BITS(set) ((set)->fds_bits) } ortp_fd_set; @@ -87,9 +87,9 @@ typedef struct _SessionSet SessionSet; SessionSet * session_set_new(); #define session_set_init(ss) ORTP_FD_ZERO(&(ss)->rtpset) -#define session_set_set(ss,rtpsession) ORTP_FD_SET((rtpsession)->mask_pos,&(ss)->rtpset) -#define session_set_is_set(ss,rtpsession) ORTP_FD_ISSET((rtpsession)->mask_pos,&(ss)->rtpset) -#define session_set_clr(ss,rtpsession) ORTP_FD_CLR((rtpsession)->mask_pos,&(ss)->rtpset) +#define session_set_set(ss,rtpsession) ORTP_FD_SET((rtpsession)->tqmask_pos,&(ss)->rtpset) +#define session_set_is_set(ss,rtpsession) ORTP_FD_ISSET((rtpsession)->tqmask_pos,&(ss)->rtpset) +#define session_set_clr(ss,rtpsession) ORTP_FD_CLR((rtpsession)->tqmask_pos,&(ss)->rtpset) #define session_set_copy(dest,src) memcpy(&(dest)->rtpset,&(src)->rtpset,sizeof(ortp_fd_set)) diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc index 626cfa96..ccb08884 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc @@ -28,14 +28,14 @@ #include #include "talk/base/common.h" #include "talk/xmllite/xmlelement.h" -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" #include "talk/xmllite/xmlconstants.h" //#define new TRACK_NEW namespace buzz { -static int QName_Hash(const std::string & ns, const char * local) { +static int TQName_Hash(const std::string & ns, const char * local) { int result = ns.size() * 101; while (*local) { result *= 19; @@ -46,20 +46,20 @@ static int QName_Hash(const std::string & ns, const char * local) { } static const int bits = 9; -static QName::Data * get_qname_table() { - static QName::Data qname_table[1 << bits]; +static TQName::Data * get_qname_table() { + static TQName::Data qname_table[1 << bits]; return qname_table; } -static QName::Data * +static TQName::Data * AllocateOrFind(const std::string & ns, const char * local) { - int index = QName_Hash(ns, local); + int index = TQName_Hash(ns, local); int increment = index >> (bits - 1) | 1; - QName::Data * qname_table = get_qname_table(); + TQName::Data * qname_table = get_qname_table(); for (;;) { index &= ((1 << bits) - 1); if (!qname_table[index].Occupied()) { - return new QName::Data(ns, local); + return new TQName::Data(ns, local); } if (qname_table[index].localPart_ == local && qname_table[index].namespace_ == ns) { @@ -70,11 +70,11 @@ AllocateOrFind(const std::string & ns, const char * local) { } } -static QName::Data * +static TQName::Data * Add(const std::string & ns, const char * local) { - int index = QName_Hash(ns, local); + int index = TQName_Hash(ns, local); int increment = index >> (bits - 1) | 1; - QName::Data * qname_table = get_qname_table(); + TQName::Data * qname_table = get_qname_table(); for (;;) { index &= ((1 << bits) - 1); if (!qname_table[index].Occupied()) { @@ -93,25 +93,25 @@ Add(const std::string & ns, const char * local) { } } -QName::~QName() { +TQName::~TQName() { data_->Release(); } -QName::QName() : data_(QN_EMPTY.data_) { +TQName::TQName() : data_(TQN_EMPTY.data_) { data_->AddRef(); } -QName::QName(bool add, const std::string & ns, const char * local) : +TQName::TQName(bool add, const std::string & ns, const char * local) : data_(add ? Add(ns, local) : AllocateOrFind(ns, local)) {} -QName::QName(bool add, const std::string & ns, const std::string & local) : +TQName::TQName(bool add, const std::string & ns, const std::string & local) : data_(add ? Add(ns, local.c_str()) : AllocateOrFind(ns, local.c_str())) {} -QName::QName(const std::string & ns, const char * local) : +TQName::TQName(const std::string & ns, const char * local) : data_(AllocateOrFind(ns, local)) {} static std::string -QName_LocalPart(const std::string & name) { +TQName_LocalPart(const std::string & name) { size_t i = name.rfind(':'); if (i == std::string::npos) return name; @@ -119,19 +119,19 @@ QName_LocalPart(const std::string & name) { } static std::string -QName_Namespace(const std::string & name) { +TQName_Namespace(const std::string & name) { size_t i = name.rfind(':'); if (i == std::string::npos) return STR_EMPTY; return name.substr(0, i); } -QName::QName(const std::string & mergedOrLocal) : - data_(AllocateOrFind(QName_Namespace(mergedOrLocal), - QName_LocalPart(mergedOrLocal).c_str())) {} +TQName::TQName(const std::string & mergedOrLocal) : + data_(AllocateOrFind(TQName_Namespace(mergedOrLocal), + TQName_LocalPart(mergedOrLocal).c_str())) {} std::string -QName::Merged() const { +TQName::Merged() const { if (data_->namespace_ == STR_EMPTY) return data_->localPart_; @@ -143,14 +143,14 @@ QName::Merged() const { } bool -QName::operator==(const QName & other) const { +TQName::operator==(const TQName & other) const { return other.data_ == data_ || data_->localPart_ == other.data_->localPart_ && data_->namespace_ == other.data_->namespace_; } int -QName::Compare(const QName & other) const { +TQName::Compare(const TQName & other) const { if (data_ == other.data_) return 0; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h index b1bcec61..dff04cd9 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h @@ -33,30 +33,30 @@ namespace buzz { -class QName +class TQName { public: - explicit QName(); - QName(const QName & qname) : data_(qname.data_) { data_->AddRef(); } - explicit QName(bool add, const std::string & ns, const char * local); - explicit QName(bool add, const std::string & ns, const std::string & local); - explicit QName(const std::string & ns, const char * local); - explicit QName(const std::string & mergedOrLocal); - QName & operator=(const QName & qn) { + explicit TQName(); + TQName(const TQName & qname) : data_(qname.data_) { data_->AddRef(); } + explicit TQName(bool add, const std::string & ns, const char * local); + explicit TQName(bool add, const std::string & ns, const std::string & local); + explicit TQName(const std::string & ns, const char * local); + explicit TQName(const std::string & mergedOrLocal); + TQName & operator=(const TQName & qn) { qn.data_->AddRef(); data_->Release(); data_ = qn.data_; return *this; } - ~QName(); + ~TQName(); const std::string & Namespace() const { return data_->namespace_; } const std::string & LocalPart() const { return data_->localPart_; } std::string Merged() const; - int Compare(const QName & other) const; - bool operator==(const QName & other) const; - bool operator!=(const QName & other) const { return !operator==(other); } - bool operator<(const QName & other) const { return Compare(other) < 0; } + int Compare(const TQName & other) const; + bool operator==(const TQName & other) const; + bool operator!=(const TQName & other) const { return !operator==(other); } + bool operator<(const TQName & other) const { return Compare(other) < 0; } class Data { public: diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc index 313c4013..7b1b10f0 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc @@ -53,8 +53,8 @@ XmlBuilder::Reset() { XmlElement * XmlBuilder::BuildElement(XmlParseContext * pctx, const char * name, const char ** atts) { - QName tagName(pctx->ResolveQName(name, false)); - if (tagName == QN_EMPTY) + TQName tagName(pctx->ResolveTQName(name, false)); + if (tagName == TQN_EMPTY) return NULL; XmlElement * pelNew = new XmlElement(tagName); @@ -62,11 +62,11 @@ XmlBuilder::BuildElement(XmlParseContext * pctx, if (!*atts) return pelNew; - std::set seenNonlocalAtts; + std::set seenNonlocalAtts; while (*atts) { - QName attName(pctx->ResolveQName(*atts, true)); - if (attName == QN_EMPTY) { + TQName attName(pctx->ResolveTQName(*atts, true)); + if (attName == TQN_EMPTY) { delete pelNew; return NULL; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc index d3619a92..a021f67a 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc @@ -32,7 +32,7 @@ #include "talk/base/common.h" #include "talk/xmllite/xmlelement.h" -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" #include "talk/xmllite/xmlparser.h" #include "talk/xmllite/xmlbuilder.h" #include "talk/xmllite/xmlprinter.h" @@ -42,8 +42,8 @@ namespace buzz { -const QName QN_EMPTY(true, STR_EMPTY, STR_EMPTY); -const QName QN_XMLNS(true, STR_EMPTY, STR_XMLNS); +const TQName TQN_EMPTY(true, STR_EMPTY, STR_EMPTY); +const TQName TQN_XMLNS(true, STR_EMPTY, STR_XMLNS); XmlChild::~XmlChild() { @@ -82,7 +82,7 @@ XmlText::AddText(const std::string & text) { XmlText::~XmlText() { } -XmlElement::XmlElement(const QName & name) : +XmlElement::XmlElement(const TQName & name) : name_(name), pFirstAttr_(NULL), pLastAttr_(NULL), @@ -109,7 +109,7 @@ XmlElement::XmlElement(const XmlElement & elt) : } pLastAttr_ = newAttr; - // copy children + // copy tqchildren XmlChild * pChild; XmlChild ** ppLast = &pFirstChild_; XmlChild * newChild = NULL; @@ -127,9 +127,9 @@ XmlElement::XmlElement(const XmlElement & elt) : } -XmlElement::XmlElement(const QName & name, bool useDefaultNs) : +XmlElement::XmlElement(const TQName & name, bool useDefaultNs) : name_(name), - pFirstAttr_(useDefaultNs ? new XmlAttr(QN_XMLNS, name.Namespace()) : NULL), + pFirstAttr_(useDefaultNs ? new XmlAttr(TQN_XMLNS, name.Namespace()) : NULL), pLastAttr_(pFirstAttr_), pFirstChild_(NULL), pLastChild_(NULL) { @@ -173,11 +173,11 @@ XmlElement::SetBodyText(const std::string & text) { } } -const QName & +const TQName & XmlElement::FirstElementName() const { const XmlElement * element = FirstElement(); if (element == NULL) - return QN_EMPTY; + return TQN_EMPTY; return element->Name(); } @@ -187,7 +187,7 @@ XmlElement::FirstAttr() { } const std::string & -XmlElement::Attr(const QName & name) const { +XmlElement::Attr(const TQName & name) const { XmlAttr * pattr; for (pattr = pFirstAttr_; pattr; pattr = pattr->pNextAttr_) { if (pattr->name_ == name) @@ -197,7 +197,7 @@ XmlElement::Attr(const QName & name) const { } bool -XmlElement::HasAttr(const QName & name) const { +XmlElement::HasAttr(const TQName & name) const { XmlAttr * pattr; for (pattr = pFirstAttr_; pattr; pattr = pattr->pNextAttr_) { if (pattr->name_ == name) @@ -207,7 +207,7 @@ XmlElement::HasAttr(const QName & name) const { } void -XmlElement::SetAttr(const QName & name, const std::string & value) { +XmlElement::SetAttr(const TQName & name, const std::string & value) { XmlAttr * pattr; for (pattr = pFirstAttr_; pattr; pattr = pattr->pNextAttr_) { if (pattr->name_ == name) @@ -226,7 +226,7 @@ XmlElement::SetAttr(const QName & name, const std::string & value) { } void -XmlElement::ClearAttr(const QName & name) { +XmlElement::ClearAttr(const TQName & name) { XmlAttr * pattr; XmlAttr *pLastAttr = NULL; for (pattr = pFirstAttr_; pattr; pattr = pattr->pNextAttr_) { @@ -291,7 +291,7 @@ XmlElement::NextWithNamespace(const std::string & ns) { } XmlElement * -XmlElement::FirstNamed(const QName & name) { +XmlElement::FirstNamed(const TQName & name) { XmlChild * pChild; for (pChild = pFirstChild_; pChild; pChild = pChild->pNextChild_) { if (!pChild->IsText() && pChild->AsElement()->Name() == name) @@ -301,7 +301,7 @@ XmlElement::FirstNamed(const QName & name) { } XmlElement * -XmlElement::NextNamed(const QName & name) { +XmlElement::NextNamed(const TQName & name) { XmlChild * pChild; for (pChild = pNextChild_; pChild; pChild = pChild->pNextChild_) { if (!pChild->IsText() && pChild->AsElement()->Name() == name) @@ -311,7 +311,7 @@ XmlElement::NextNamed(const QName & name) { } const std::string & -XmlElement::TextNamed(const QName & name) const { +XmlElement::TextNamed(const TQName & name) const { XmlChild * pChild; for (pChild = pFirstChild_; pChild; pChild = pChild->pNextChild_) { if (!pChild->IsText() && pChild->AsElement()->Name() == name) @@ -352,7 +352,7 @@ XmlElement::RemoveChildAfter(XmlChild * pPredecessor) { } void -XmlElement::AddAttr(const QName & name, const std::string & value) { +XmlElement::AddAttr(const TQName & name, const std::string & value) { ASSERT(!HasAttr(name)); XmlAttr ** pprev = pLastAttr_ ? &(pLastAttr_->pNextAttr_) : &pFirstAttr_; @@ -360,7 +360,7 @@ XmlElement::AddAttr(const QName & name, const std::string & value) { } void -XmlElement::AddAttr(const QName & name, const std::string & value, +XmlElement::AddAttr(const TQName & name, const std::string & value, int depth) { XmlElement * element = this; while (depth--) { @@ -426,7 +426,7 @@ XmlElement::AddElement(XmlElement *pelChild, int depth) { } void -XmlElement::ClearNamedChildren(const QName & name) { +XmlElement::ClearNamedChildren(const TQName & name) { XmlChild * prev_child = NULL; XmlChild * next_child; XmlChild * child; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h index 06545d89..2c9fc860 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h @@ -31,12 +31,12 @@ #include #include #include "talk/base/scoped_ptr.h" -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" namespace buzz { -extern const QName QN_EMPTY; -extern const QName QN_XMLNS; +extern const TQName TQN_EMPTY; +extern const TQName TQN_XMLNS; class XmlChild; @@ -116,11 +116,11 @@ friend class XmlElement; public: XmlAttr * NextAttr() const { return pNextAttr_; } - const QName & Name() const { return name_; } + const TQName & Name() const { return name_; } const std::string & Value() const { return value_; } private: - explicit XmlAttr(const QName & name, const std::string & value) : + explicit XmlAttr(const TQName & name, const std::string & value) : pNextAttr_(NULL), name_(name), value_(value) { @@ -132,24 +132,24 @@ private: } XmlAttr * pNextAttr_; - QName name_; + TQName name_; std::string value_; }; class XmlElement : public XmlChild { public: - explicit XmlElement(const QName & name); - explicit XmlElement(const QName & name, bool useDefaultNs); + explicit XmlElement(const TQName & name); + explicit XmlElement(const TQName & name, bool useDefaultNs); explicit XmlElement(const XmlElement & elt); virtual ~XmlElement(); - const QName & Name() const { return name_; } + const TQName & Name() const { return name_; } const std::string & BodyText() const; void SetBodyText(const std::string & text); - const QName & FirstElementName() const; + const TQName & FirstElementName() const; XmlAttr * FirstAttr(); const XmlAttr * FirstAttr() const @@ -157,10 +157,10 @@ public: //! Attr will return STR_EMPTY if the attribute isn't there: //! use HasAttr to test presence of an attribute. - const std::string & Attr(const QName & name) const; - bool HasAttr(const QName & name) const; - void SetAttr(const QName & name, const std::string & value); - void ClearAttr(const QName & name); + const std::string & Attr(const TQName & name) const; + bool HasAttr(const TQName & name) const; + void SetAttr(const TQName & name, const std::string & value); + void ClearAttr(const TQName & name); XmlChild * FirstChild(); const XmlChild * FirstChild() const @@ -182,15 +182,15 @@ public: const XmlElement * NextWithNamespace(const std::string & ns) const { return const_cast(this)->NextWithNamespace(ns); } - XmlElement * FirstNamed(const QName & name); - const XmlElement * FirstNamed(const QName & name) const + XmlElement * FirstNamed(const TQName & name); + const XmlElement * FirstNamed(const TQName & name) const { return const_cast(this)->FirstNamed(name); } - XmlElement * NextNamed(const QName & name); - const XmlElement * NextNamed(const QName & name) const + XmlElement * NextNamed(const TQName & name); + const XmlElement * NextNamed(const TQName & name) const { return const_cast(this)->NextNamed(name); } - const std::string & TextNamed(const QName & name) const; + const std::string & TextNamed(const TQName & name) const; void InsertChildAfter(XmlChild * pPredecessor, XmlChild * pNewChild); void RemoveChildAfter(XmlChild * pPredecessor); @@ -200,9 +200,9 @@ public: void AddText(const std::string & text, int depth); void AddElement(XmlElement * pelChild); void AddElement(XmlElement * pelChild, int depth); - void AddAttr(const QName & name, const std::string & value); - void AddAttr(const QName & name, const std::string & value, int depth); - void ClearNamedChildren(const QName & name); + void AddAttr(const TQName & name, const std::string & value); + void AddAttr(const TQName & name, const std::string & value, int depth); + void ClearNamedChildren(const TQName & name); void ClearChildren(); static XmlElement * ForStr(const std::string & str); @@ -216,7 +216,7 @@ protected: virtual XmlText * AsTextImpl() const; private: - QName name_; + TQName name_; XmlAttr * pFirstAttr_; XmlAttr * pLastAttr_; XmlChild * pFirstChild_; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc index 4dcb6490..570a8be5 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc @@ -116,7 +116,7 @@ XmlnsStack::PrefixForNs(const std::string & ns, bool isattr) { } std::string -XmlnsStack::FormatQName(const QName & name, bool isAttr) { +XmlnsStack::FormatTQName(const TQName & name, bool isAttr) { std::string prefix(PrefixForNs(name.Namespace(), isAttr).first); if (prefix == STR_EMPTY) return name.LocalPart(); @@ -170,7 +170,7 @@ static std::string SuggestPrefix(const std::string & ns) { if (last - first > 4) last = first + 3; std::string candidate(AsciiLower(ns.substr(first, last - first))); - if (candidate.find("xml") != 0) + if (candidate.tqfind("xml") != 0) return candidate; break; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h index 299ec1ce..6fd7665c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h @@ -31,7 +31,7 @@ #include #include "talk/base/scoped_ptr.h" #include "talk/base/stl_decl.h" -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" namespace buzz { @@ -50,7 +50,7 @@ public: bool PrefixMatchesNs(const std::string & prefix, const std::string & ns); std::pair PrefixForNs(const std::string & ns, bool isAttr); std::pair AddNewPrefix(const std::string & ns, bool isAttr); - std::string FormatQName(const QName & name, bool isAttr); + std::string FormatTQName(const TQName & name, bool isAttr); private: diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc index f2b56778..41cadb84 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc @@ -212,29 +212,29 @@ XmlParser::ParseContext::EndElement() { xmlnsstack_.PopFrame(); } -QName -XmlParser::ParseContext::ResolveQName(const char *qname, bool isAttr) { +TQName +XmlParser::ParseContext::ResolveTQName(const char *qname, bool isAttr) { const char *c; for (c = qname; *c; ++c) { if (*c == ':') { const std::string * result; result = xmlnsstack_.NsForPrefix(std::string(qname, c - qname)); if (result == NULL) - return QN_EMPTY; + return TQN_EMPTY; const char * localname = c + 1; - return QName(*result, localname); + return TQName(*result, localname); } } if (isAttr) { - return QName(STR_EMPTY, qname); + return TQName(STR_EMPTY, qname); } const std::string * result; result = xmlnsstack_.NsForPrefix(STR_EMPTY); if (result == NULL) - return QN_EMPTY; + return TQN_EMPTY; - return QName(*result, qname); + return TQName(*result, qname); } void diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h index 760802e4..8e2e4b5f 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h @@ -43,7 +43,7 @@ class XmlParser; class XmlParseContext { public: - virtual QName ResolveQName(const char * qname, bool isAttr) = 0; + virtual TQName ResolveTQName(const char * qname, bool isAttr) = 0; virtual void RaiseError(XML_Error err) = 0; }; @@ -80,7 +80,7 @@ private: public: ParseContext(XmlParser * parser); virtual ~ParseContext(); - virtual QName ResolveQName(const char * qname, bool isAttr); + virtual TQName ResolveTQName(const char * qname, bool isAttr); virtual void RaiseError(XML_Error err) { if (!raised_) raised_ = err; } XML_Error RaisedError() { return raised_; } void Reset(); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc index 892e2ebb..8e36ac02 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc @@ -79,7 +79,7 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) { // first go through attrs of pel to add xmlns definitions const XmlAttr * pattr; for (pattr = element->FirstAttr(); pattr; pattr = pattr->NextAttr()) { - if (pattr->Name() == QN_XMLNS) + if (pattr->Name() == TQN_XMLNS) xmlnsStack_.AddXmlns(STR_EMPTY, pattr->Value()); else if (pattr->Name().Namespace() == NS_XMLNS) xmlnsStack_.AddXmlns(pattr->Name().LocalPart(), @@ -104,11 +104,11 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) { } // print the element name - *pout_ << '<' << xmlnsStack_.FormatQName(element->Name(), false); + *pout_ << '<' << xmlnsStack_.FormatTQName(element->Name(), false); // and the attributes for (pattr = element->FirstAttr(); pattr; pattr = pattr->NextAttr()) { - *pout_ << ' ' << xmlnsStack_.FormatQName(pattr->Name(), true) << "=\""; + *pout_ << ' ' << xmlnsStack_.FormatTQName(pattr->Name(), true) << "=\""; PrintQuotedValue(pattr->Value()); *pout_ << '"'; } @@ -123,7 +123,7 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) { i += 2; } - // now the children + // now the tqchildren const XmlChild * pchild = element->FirstChild(); if (pchild == NULL) @@ -137,7 +137,7 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) { PrintElement(pchild->AsElement()); pchild = pchild->NextChild(); } - *pout_ << "Name(), false) << '>'; + *pout_ << "Name(), false) << '>'; } xmlnsStack_.PopFrame(); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/constants.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/constants.cc index b2c833f7..18987e7d 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/constants.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/constants.cc @@ -29,7 +29,7 @@ #include "talk/base/basicdefs.h" #include "talk/xmllite/xmlconstants.h" #include "talk/xmllite/xmlelement.h" -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" #include "talk/xmpp/jid.h" #include "talk/xmpp/constants.h" namespace buzz { @@ -135,131 +135,131 @@ const std::string STR_GOOGLEMAIL_COM("googlemail.com"); const std::string STR_DEFAULT_DOMAIN("default.talk.google.com"); const std::string STR_X("x"); -const QName QN_STREAM_STREAM(true, NS_STREAM, STR_STREAM); -const QName QN_STREAM_FEATURES(true, NS_STREAM, "features"); -const QName QN_STREAM_ERROR(true, NS_STREAM, "error"); - -const QName QN_XSTREAM_BAD_FORMAT(true, NS_XSTREAM, "bad-format"); -const QName QN_XSTREAM_BAD_NAMESPACE_PREFIX(true, NS_XSTREAM, "bad-namespace-prefix"); -const QName QN_XSTREAM_CONFLICT(true, NS_XSTREAM, "conflict"); -const QName QN_XSTREAM_CONNECTION_TIMEOUT(true, NS_XSTREAM, "connection-timeout"); -const QName QN_XSTREAM_HOST_GONE(true, NS_XSTREAM, "host-gone"); -const QName QN_XSTREAM_HOST_UNKNOWN(true, NS_XSTREAM, "host-unknown"); -const QName QN_XSTREAM_IMPROPER_ADDRESSIING(true, NS_XSTREAM, "improper-addressing"); -const QName QN_XSTREAM_INTERNAL_SERVER_ERROR(true, NS_XSTREAM, "internal-server-error"); -const QName QN_XSTREAM_INVALID_FROM(true, NS_XSTREAM, "invalid-from"); -const QName QN_XSTREAM_INVALID_ID(true, NS_XSTREAM, "invalid-id"); -const QName QN_XSTREAM_INVALID_NAMESPACE(true, NS_XSTREAM, "invalid-namespace"); -const QName QN_XSTREAM_INVALID_XML(true, NS_XSTREAM, "invalid-xml"); -const QName QN_XSTREAM_NOT_AUTHORIZED(true, NS_XSTREAM, "not-authorized"); -const QName QN_XSTREAM_POLICY_VIOLATION(true, NS_XSTREAM, "policy-violation"); -const QName QN_XSTREAM_REMOTE_CONNECTION_FAILED(true, NS_XSTREAM, "remote-connection-failed"); -const QName QN_XSTREAM_RESOURCE_CONSTRAINT(true, NS_XSTREAM, "resource-constraint"); -const QName QN_XSTREAM_RESTRICTED_XML(true, NS_XSTREAM, "restricted-xml"); -const QName QN_XSTREAM_SEE_OTHER_HOST(true, NS_XSTREAM, "see-other-host"); -const QName QN_XSTREAM_SYSTEM_SHUTDOWN(true, NS_XSTREAM, "system-shutdown"); -const QName QN_XSTREAM_UNDEFINED_CONDITION(true, NS_XSTREAM, "undefined-condition"); -const QName QN_XSTREAM_UNSUPPORTED_ENCODING(true, NS_XSTREAM, "unsupported-encoding"); -const QName QN_XSTREAM_UNSUPPORTED_STANZA_TYPE(true, NS_XSTREAM, "unsupported-stanza-type"); -const QName QN_XSTREAM_UNSUPPORTED_VERSION(true, NS_XSTREAM, "unsupported-version"); -const QName QN_XSTREAM_XML_NOT_WELL_FORMED(true, NS_XSTREAM, "xml-not-well-formed"); -const QName QN_XSTREAM_TEXT(true, NS_XSTREAM, "text"); - -const QName QN_TLS_STARTTLS(true, NS_TLS, "starttls"); -const QName QN_TLS_REQUIRED(true, NS_TLS, "required"); -const QName QN_TLS_PROCEED(true, NS_TLS, "proceed"); -const QName QN_TLS_FAILURE(true, NS_TLS, "failure"); - -const QName QN_SASL_MECHANISMS(true, NS_SASL, "mechanisms"); -const QName QN_SASL_MECHANISM(true, NS_SASL, "mechanism"); -const QName QN_SASL_AUTH(true, NS_SASL, "auth"); -const QName QN_SASL_CHALLENGE(true, NS_SASL, "challenge"); -const QName QN_SASL_RESPONSE(true, NS_SASL, "response"); -const QName QN_SASL_ABORT(true, NS_SASL, "abort"); -const QName QN_SASL_SUCCESS(true, NS_SASL, "success"); -const QName QN_SASL_FAILURE(true, NS_SASL, "failure"); -const QName QN_SASL_ABORTED(true, NS_SASL, "aborted"); -const QName QN_SASL_INCORRECT_ENCODING(true, NS_SASL, "incorrect-encoding"); -const QName QN_SASL_INVALID_AUTHZID(true, NS_SASL, "invalid-authzid"); -const QName QN_SASL_INVALID_MECHANISM(true, NS_SASL, "invalid-mechanism"); -const QName QN_SASL_MECHANISM_TOO_WEAK(true, NS_SASL, "mechanism-too-weak"); -const QName QN_SASL_NOT_AUTHORIZED(true, NS_SASL, "not-authorized"); -const QName QN_SASL_TEMPORARY_AUTH_FAILURE(true, NS_SASL, "temporary-auth-failure"); - -const QName QN_DIALBACK_RESULT(true, NS_DIALBACK, "result"); -const QName QN_DIALBACK_VERIFY(true, NS_DIALBACK, "verify"); - -const QName QN_STANZA_BAD_REQUEST(true, NS_STANZA, "bad-request"); -const QName QN_STANZA_CONFLICT(true, NS_STANZA, "conflict"); -const QName QN_STANZA_FEATURE_NOT_IMPLEMENTED(true, NS_STANZA, "feature-not-implemented"); -const QName QN_STANZA_FORBIDDEN(true, NS_STANZA, "forbidden"); -const QName QN_STANZA_GONE(true, NS_STANZA, "gone"); -const QName QN_STANZA_INTERNAL_SERVER_ERROR(true, NS_STANZA, "internal-server-error"); -const QName QN_STANZA_ITEM_NOT_FOUND(true, NS_STANZA, "item-not-found"); -const QName QN_STANZA_JID_MALFORMED(true, NS_STANZA, "jid-malformed"); -const QName QN_STANZA_NOT_ACCEPTABLE(true, NS_STANZA, "not-acceptable"); -const QName QN_STANZA_NOT_ALLOWED(true, NS_STANZA, "not-allowed"); -const QName QN_STANZA_PAYMENT_REQUIRED(true, NS_STANZA, "payment-required"); -const QName QN_STANZA_RECIPIENT_UNAVAILABLE(true, NS_STANZA, "recipient-unavailable"); -const QName QN_STANZA_REDIRECT(true, NS_STANZA, "redirect"); -const QName QN_STANZA_REGISTRATION_REQUIRED(true, NS_STANZA, "registration-required"); -const QName QN_STANZA_REMOTE_SERVER_NOT_FOUND(true, NS_STANZA, "remote-server-not-found"); -const QName QN_STANZA_REMOTE_SERVER_TIMEOUT(true, NS_STANZA, "remote-server-timeout"); -const QName QN_STANZA_RESOURCE_CONSTRAINT(true, NS_STANZA, "resource-constraint"); -const QName QN_STANZA_SERVICE_UNAVAILABLE(true, NS_STANZA, "service-unavailable"); -const QName QN_STANZA_SUBSCRIPTION_REQUIRED(true, NS_STANZA, "subscription-required"); -const QName QN_STANZA_UNDEFINED_CONDITION(true, NS_STANZA, "undefined-condition"); -const QName QN_STANZA_UNEXPECTED_REQUEST(true, NS_STANZA, "unexpected-request"); -const QName QN_STANZA_TEXT(true, NS_STANZA, "text"); - -const QName QN_BIND_BIND(true, NS_BIND, "bind"); -const QName QN_BIND_RESOURCE(true, NS_BIND, "resource"); -const QName QN_BIND_JID(true, NS_BIND, "jid"); - -const QName QN_MESSAGE(true, NS_CLIENT, "message"); -const QName QN_BODY(true, NS_CLIENT, "body"); -const QName QN_SUBJECT(true, NS_CLIENT, "subject"); -const QName QN_THREAD(true, NS_CLIENT, "thread"); -const QName QN_PRESENCE(true, NS_CLIENT, "presence"); -const QName QN_SHOW(true, NS_CLIENT, "show"); -const QName QN_STATUS(true, NS_CLIENT, "status"); -const QName QN_LANG(true, NS_CLIENT, "lang"); -const QName QN_PRIORITY(true, NS_CLIENT, "priority"); -const QName QN_IQ(true, NS_CLIENT, "iq"); -const QName QN_ERROR(true, NS_CLIENT, "error"); - -const QName QN_SERVER_MESSAGE(true, NS_SERVER, "message"); -const QName QN_SERVER_BODY(true, NS_SERVER, "body"); -const QName QN_SERVER_SUBJECT(true, NS_SERVER, "subject"); -const QName QN_SERVER_THREAD(true, NS_SERVER, "thread"); -const QName QN_SERVER_PRESENCE(true, NS_SERVER, "presence"); -const QName QN_SERVER_SHOW(true, NS_SERVER, "show"); -const QName QN_SERVER_STATUS(true, NS_SERVER, "status"); -const QName QN_SERVER_LANG(true, NS_SERVER, "lang"); -const QName QN_SERVER_PRIORITY(true, NS_SERVER, "priority"); -const QName QN_SERVER_IQ(true, NS_SERVER, "iq"); -const QName QN_SERVER_ERROR(true, NS_SERVER, "error"); - -const QName QN_SESSION_SESSION(true, NS_SESSION, "session"); - -const QName QN_PRIVACY_QUERY(true, NS_PRIVACY, "query"); -const QName QN_PRIVACY_ACTIVE(true, NS_PRIVACY, "active"); -const QName QN_PRIVACY_DEFAULT(true, NS_PRIVACY, "default"); -const QName QN_PRIVACY_LIST(true, NS_PRIVACY, "list"); -const QName QN_PRIVACY_ITEM(true, NS_PRIVACY, "item"); -const QName QN_PRIVACY_IQ(true, NS_PRIVACY, "iq"); -const QName QN_PRIVACY_MESSAGE(true, NS_PRIVACY, "message"); -const QName QN_PRIVACY_PRESENCE_IN(true, NS_PRIVACY, "presence-in"); -const QName QN_PRIVACY_PRESENCE_OUT(true, NS_PRIVACY, "presence-out"); - -const QName QN_ROSTER_QUERY(true, NS_ROSTER, "query"); -const QName QN_ROSTER_ITEM(true, NS_ROSTER, "item"); -const QName QN_ROSTER_GROUP(true, NS_ROSTER, "group"); - -const QName QN_VCARD_QUERY(true, NS_VCARD, "vCard"); -const QName QN_VCARD_FN(true, NS_VCARD, "FN"); - -const QName QN_XML_LANG(true, NS_XML, "lang"); +const TQName TQN_STREAM_STREAM(true, NS_STREAM, STR_STREAM); +const TQName TQN_STREAM_FEATURES(true, NS_STREAM, "features"); +const TQName TQN_STREAM_ERROR(true, NS_STREAM, "error"); + +const TQName TQN_XSTREAM_BAD_FORMAT(true, NS_XSTREAM, "bad-format"); +const TQName TQN_XSTREAM_BAD_NAMESPACE_PREFIX(true, NS_XSTREAM, "bad-namespace-prefix"); +const TQName TQN_XSTREAM_CONFLICT(true, NS_XSTREAM, "conflict"); +const TQName TQN_XSTREAM_CONNECTION_TIMEOUT(true, NS_XSTREAM, "connection-timeout"); +const TQName TQN_XSTREAM_HOST_GONE(true, NS_XSTREAM, "host-gone"); +const TQName TQN_XSTREAM_HOST_UNKNOWN(true, NS_XSTREAM, "host-unknown"); +const TQName TQN_XSTREAM_IMPROPER_ADDRESSIING(true, NS_XSTREAM, "improper-addressing"); +const TQName TQN_XSTREAM_INTERNAL_SERVER_ERROR(true, NS_XSTREAM, "internal-server-error"); +const TQName TQN_XSTREAM_INVALID_FROM(true, NS_XSTREAM, "invalid-from"); +const TQName TQN_XSTREAM_INVALID_ID(true, NS_XSTREAM, "invalid-id"); +const TQName TQN_XSTREAM_INVALID_NAMESPACE(true, NS_XSTREAM, "invalid-namespace"); +const TQName TQN_XSTREAM_INVALID_XML(true, NS_XSTREAM, "invalid-xml"); +const TQName TQN_XSTREAM_NOT_AUTHORIZED(true, NS_XSTREAM, "not-authorized"); +const TQName TQN_XSTREAM_POLICY_VIOLATION(true, NS_XSTREAM, "policy-violation"); +const TQName TQN_XSTREAM_REMOTE_CONNECTION_FAILED(true, NS_XSTREAM, "remote-connection-failed"); +const TQName TQN_XSTREAM_RESOURCE_CONSTRAINT(true, NS_XSTREAM, "resource-constraint"); +const TQName TQN_XSTREAM_RESTRICTED_XML(true, NS_XSTREAM, "restricted-xml"); +const TQName TQN_XSTREAM_SEE_OTHER_HOST(true, NS_XSTREAM, "see-other-host"); +const TQName TQN_XSTREAM_SYSTEM_SHUTDOWN(true, NS_XSTREAM, "system-shutdown"); +const TQName TQN_XSTREAM_UNDEFINED_CONDITION(true, NS_XSTREAM, "undefined-condition"); +const TQName TQN_XSTREAM_UNSUPPORTED_ENCODING(true, NS_XSTREAM, "unsupported-encoding"); +const TQName TQN_XSTREAM_UNSUPPORTED_STANZA_TYPE(true, NS_XSTREAM, "unsupported-stanza-type"); +const TQName TQN_XSTREAM_UNSUPPORTED_VERSION(true, NS_XSTREAM, "unsupported-version"); +const TQName TQN_XSTREAM_XML_NOT_WELL_FORMED(true, NS_XSTREAM, "xml-not-well-formed"); +const TQName TQN_XSTREAM_TEXT(true, NS_XSTREAM, "text"); + +const TQName TQN_TLS_STARTTLS(true, NS_TLS, "starttls"); +const TQName TQN_TLS_RETQUIRED(true, NS_TLS, "required"); +const TQName TQN_TLS_PROCEED(true, NS_TLS, "proceed"); +const TQName TQN_TLS_FAILURE(true, NS_TLS, "failure"); + +const TQName TQN_SASL_MECHANISMS(true, NS_SASL, "mechanisms"); +const TQName TQN_SASL_MECHANISM(true, NS_SASL, "mechanism"); +const TQName TQN_SASL_AUTH(true, NS_SASL, "auth"); +const TQName TQN_SASL_CHALLENGE(true, NS_SASL, "challenge"); +const TQName TQN_SASL_RESPONSE(true, NS_SASL, "response"); +const TQName TQN_SASL_ABORT(true, NS_SASL, "abort"); +const TQName TQN_SASL_SUCCESS(true, NS_SASL, "success"); +const TQName TQN_SASL_FAILURE(true, NS_SASL, "failure"); +const TQName TQN_SASL_ABORTED(true, NS_SASL, "aborted"); +const TQName TQN_SASL_INCORRECT_ENCODING(true, NS_SASL, "incorrect-encoding"); +const TQName TQN_SASL_INVALID_AUTHZID(true, NS_SASL, "invalid-authzid"); +const TQName TQN_SASL_INVALID_MECHANISM(true, NS_SASL, "invalid-mechanism"); +const TQName TQN_SASL_MECHANISM_TOO_WEAK(true, NS_SASL, "mechanism-too-weak"); +const TQName TQN_SASL_NOT_AUTHORIZED(true, NS_SASL, "not-authorized"); +const TQName TQN_SASL_TEMPORARY_AUTH_FAILURE(true, NS_SASL, "temporary-auth-failure"); + +const TQName TQN_DIALBACK_RESULT(true, NS_DIALBACK, "result"); +const TQName TQN_DIALBACK_VERIFY(true, NS_DIALBACK, "verify"); + +const TQName TQN_STANZA_BAD_REQUEST(true, NS_STANZA, "bad-request"); +const TQName TQN_STANZA_CONFLICT(true, NS_STANZA, "conflict"); +const TQName TQN_STANZA_FEATURE_NOT_IMPLEMENTED(true, NS_STANZA, "feature-not-implemented"); +const TQName TQN_STANZA_FORBIDDEN(true, NS_STANZA, "forbidden"); +const TQName TQN_STANZA_GONE(true, NS_STANZA, "gone"); +const TQName TQN_STANZA_INTERNAL_SERVER_ERROR(true, NS_STANZA, "internal-server-error"); +const TQName TQN_STANZA_ITEM_NOT_FOUND(true, NS_STANZA, "item-not-found"); +const TQName TQN_STANZA_JID_MALFORMED(true, NS_STANZA, "jid-malformed"); +const TQName TQN_STANZA_NOT_ACCEPTABLE(true, NS_STANZA, "not-acceptable"); +const TQName TQN_STANZA_NOT_ALLOWED(true, NS_STANZA, "not-allowed"); +const TQName TQN_STANZA_PAYMENT_RETQUIRED(true, NS_STANZA, "payment-required"); +const TQName TQN_STANZA_RECIPIENT_UNAVAILABLE(true, NS_STANZA, "recipient-unavailable"); +const TQName TQN_STANZA_REDIRECT(true, NS_STANZA, "redirect"); +const TQName TQN_STANZA_REGISTRATION_RETQUIRED(true, NS_STANZA, "registration-required"); +const TQName TQN_STANZA_REMOTE_SERVER_NOT_FOUND(true, NS_STANZA, "remote-server-not-found"); +const TQName TQN_STANZA_REMOTE_SERVER_TIMEOUT(true, NS_STANZA, "remote-server-timeout"); +const TQName TQN_STANZA_RESOURCE_CONSTRAINT(true, NS_STANZA, "resource-constraint"); +const TQName TQN_STANZA_SERVICE_UNAVAILABLE(true, NS_STANZA, "service-unavailable"); +const TQName TQN_STANZA_SUBSCRIPTION_RETQUIRED(true, NS_STANZA, "subscription-required"); +const TQName TQN_STANZA_UNDEFINED_CONDITION(true, NS_STANZA, "undefined-condition"); +const TQName TQN_STANZA_UNEXPECTED_REQUEST(true, NS_STANZA, "unexpected-request"); +const TQName TQN_STANZA_TEXT(true, NS_STANZA, "text"); + +const TQName TQN_BIND_BIND(true, NS_BIND, "bind"); +const TQName TQN_BIND_RESOURCE(true, NS_BIND, "resource"); +const TQName TQN_BIND_JID(true, NS_BIND, "jid"); + +const TQName TQN_MESSAGE(true, NS_CLIENT, "message"); +const TQName TQN_BODY(true, NS_CLIENT, "body"); +const TQName TQN_SUBJECT(true, NS_CLIENT, "subject"); +const TQName TQN_THREAD(true, NS_CLIENT, "thread"); +const TQName TQN_PRESENCE(true, NS_CLIENT, "presence"); +const TQName TQN_SHOW(true, NS_CLIENT, "show"); +const TQName TQN_STATUS(true, NS_CLIENT, "status"); +const TQName TQN_LANG(true, NS_CLIENT, "lang"); +const TQName TQN_PRIORITY(true, NS_CLIENT, "priority"); +const TQName TQN_IQ(true, NS_CLIENT, "iq"); +const TQName TQN_ERROR(true, NS_CLIENT, "error"); + +const TQName TQN_SERVER_MESSAGE(true, NS_SERVER, "message"); +const TQName TQN_SERVER_BODY(true, NS_SERVER, "body"); +const TQName TQN_SERVER_SUBJECT(true, NS_SERVER, "subject"); +const TQName TQN_SERVER_THREAD(true, NS_SERVER, "thread"); +const TQName TQN_SERVER_PRESENCE(true, NS_SERVER, "presence"); +const TQName TQN_SERVER_SHOW(true, NS_SERVER, "show"); +const TQName TQN_SERVER_STATUS(true, NS_SERVER, "status"); +const TQName TQN_SERVER_LANG(true, NS_SERVER, "lang"); +const TQName TQN_SERVER_PRIORITY(true, NS_SERVER, "priority"); +const TQName TQN_SERVER_IQ(true, NS_SERVER, "iq"); +const TQName TQN_SERVER_ERROR(true, NS_SERVER, "error"); + +const TQName TQN_SESSION_SESSION(true, NS_SESSION, "session"); + +const TQName TQN_PRIVACY_TQUERY(true, NS_PRIVACY, "query"); +const TQName TQN_PRIVACY_ACTIVE(true, NS_PRIVACY, "active"); +const TQName TQN_PRIVACY_DEFAULT(true, NS_PRIVACY, "default"); +const TQName TQN_PRIVACY_LIST(true, NS_PRIVACY, "list"); +const TQName TQN_PRIVACY_ITEM(true, NS_PRIVACY, "item"); +const TQName TQN_PRIVACY_IQ(true, NS_PRIVACY, "iq"); +const TQName TQN_PRIVACY_MESSAGE(true, NS_PRIVACY, "message"); +const TQName TQN_PRIVACY_PRESENCE_IN(true, NS_PRIVACY, "presence-in"); +const TQName TQN_PRIVACY_PRESENCE_OUT(true, NS_PRIVACY, "presence-out"); + +const TQName TQN_ROSTER_TQUERY(true, NS_ROSTER, "query"); +const TQName TQN_ROSTER_ITEM(true, NS_ROSTER, "item"); +const TQName TQN_ROSTER_GROUP(true, NS_ROSTER, "group"); + +const TQName TQN_VCARD_TQUERY(true, NS_VCARD, "vCard"); +const TQName TQN_VCARD_FN(true, NS_VCARD, "FN"); + +const TQName TQN_XML_LANG(true, NS_XML, "lang"); const std::string STR_TYPE("type"); const std::string STR_ID("id"); @@ -268,26 +268,26 @@ const std::string STR_JID("jid"); const std::string STR_SUBSCRIPTION("subscription"); const std::string STR_ASK("ask"); -const QName QN_ENCODING(true, STR_EMPTY, STR_ENCODING); -const QName QN_VERSION(true, STR_EMPTY, STR_VERSION); -const QName QN_TO(true, STR_EMPTY, "to"); -const QName QN_FROM(true, STR_EMPTY, "from"); -const QName QN_TYPE(true, STR_EMPTY, "type"); -const QName QN_ID(true, STR_EMPTY, "id"); -const QName QN_CODE(true, STR_EMPTY, "code"); -const QName QN_NAME(true, STR_EMPTY, "name"); -const QName QN_VALUE(true, STR_EMPTY, "value"); -const QName QN_ACTION(true, STR_EMPTY, "action"); -const QName QN_ORDER(true, STR_EMPTY, "order"); -const QName QN_MECHANISM(true, STR_EMPTY, "mechanism"); -const QName QN_ASK(true, STR_EMPTY, "ask"); -const QName QN_JID(true, STR_EMPTY, "jid"); -const QName QN_SUBSCRIPTION(true, STR_EMPTY, "subscription"); -const QName QN_SOURCE(true, STR_EMPTY, "source"); - -const QName QN_XMLNS_CLIENT(true, NS_XMLNS, STR_CLIENT); -const QName QN_XMLNS_SERVER(true, NS_XMLNS, STR_SERVER); -const QName QN_XMLNS_STREAM(true, NS_XMLNS, STR_STREAM); +const TQName TQN_ENCODING(true, STR_EMPTY, STR_ENCODING); +const TQName TQN_VERSION(true, STR_EMPTY, STR_VERSION); +const TQName TQN_TO(true, STR_EMPTY, "to"); +const TQName TQN_FROM(true, STR_EMPTY, "from"); +const TQName TQN_TYPE(true, STR_EMPTY, "type"); +const TQName TQN_ID(true, STR_EMPTY, "id"); +const TQName TQN_CODE(true, STR_EMPTY, "code"); +const TQName TQN_NAME(true, STR_EMPTY, "name"); +const TQName TQN_VALUE(true, STR_EMPTY, "value"); +const TQName TQN_ACTION(true, STR_EMPTY, "action"); +const TQName TQN_ORDER(true, STR_EMPTY, "order"); +const TQName TQN_MECHANISM(true, STR_EMPTY, "mechanism"); +const TQName TQN_ASK(true, STR_EMPTY, "ask"); +const TQName TQN_JID(true, STR_EMPTY, "jid"); +const TQName TQN_SUBSCRIPTION(true, STR_EMPTY, "subscription"); +const TQName TQN_SOURCE(true, STR_EMPTY, "source"); + +const TQName TQN_XMLNS_CLIENT(true, NS_XMLNS, STR_CLIENT); +const TQName TQN_XMLNS_SERVER(true, NS_XMLNS, STR_SERVER); +const TQName TQN_XMLNS_STREAM(true, NS_XMLNS, STR_STREAM); // Presence const std::string STR_SHOW_AWAY("away"); @@ -303,29 +303,29 @@ const std::string STR_UNSUBSCRIBED("unsubscribed"); // JEP 0030 -const QName QN_NODE(true, STR_EMPTY, "node"); -const QName QN_CATEGORY(true, STR_EMPTY, "category"); -const QName QN_VAR(true, STR_EMPTY, "var"); +const TQName TQN_NODE(true, STR_EMPTY, "node"); +const TQName TQN_CATEGORY(true, STR_EMPTY, "category"); +const TQName TQN_VAR(true, STR_EMPTY, "var"); const std::string NS_DISCO_INFO("http://jabber.org/protocol/disco#info"); const std::string NS_DISCO_ITEMS("http://jabber.org/protocol/disco#items"); -const QName QN_DISCO_INFO_QUERY(true, NS_DISCO_INFO, "query"); -const QName QN_DISCO_IDENTITY(true, NS_DISCO_INFO, "identity"); -const QName QN_DISCO_FEATURE(true, NS_DISCO_INFO, "feature"); +const TQName TQN_DISCO_INFO_TQUERY(true, NS_DISCO_INFO, "query"); +const TQName TQN_DISCO_IDENTITY(true, NS_DISCO_INFO, "identity"); +const TQName TQN_DISCO_FEATURE(true, NS_DISCO_INFO, "feature"); -const QName QN_DISCO_ITEMS_QUERY(true, NS_DISCO_ITEMS, "query"); -const QName QN_DISCO_ITEM(true, NS_DISCO_ITEMS, "item"); +const TQName TQN_DISCO_ITEMS_TQUERY(true, NS_DISCO_ITEMS, "query"); +const TQName TQN_DISCO_ITEM(true, NS_DISCO_ITEMS, "item"); // JEP 0115 const std::string NS_CAPS("http://jabber.org/protocol/caps"); -const QName QN_CAPS_C(true, NS_CAPS, "c"); -const QName QN_VER(true, STR_EMPTY, "ver"); -const QName QN_EXT(true, STR_EMPTY, "ext"); +const TQName TQN_CAPS_C(true, NS_CAPS, "c"); +const TQName TQN_VER(true, STR_EMPTY, "ver"); +const TQName TQN_EXT(true, STR_EMPTY, "ext"); // JEP 0091 Delayed Delivery const std::string kNSDelay("jabber:x:delay"); -const QName kQnDelayX(true, kNSDelay, "x"); -const QName kQnStamp(true, STR_EMPTY, "stamp"); +const TQName kQnDelayX(true, kNSDelay, "x"); +const TQName kQnStamp(true, STR_EMPTY, "stamp"); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/constants.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/constants.h index b05af965..00ff8e8d 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/constants.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/constants.h @@ -29,7 +29,7 @@ #define _CRICKET_XMPP_XMPPLIB_BUZZ_CONSTANTS_H_ #include -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" #include "talk/xmpp/jid.h" @@ -108,152 +108,152 @@ extern const std::string STR_DEFAULT_DOMAIN; extern const std::string STR_UNAVAILABLE; extern const std::string STR_INVISIBLE; -extern const QName QN_STREAM_STREAM; -extern const QName QN_STREAM_FEATURES; -extern const QName QN_STREAM_ERROR; - -extern const QName QN_XSTREAM_BAD_FORMAT; -extern const QName QN_XSTREAM_BAD_NAMESPACE_PREFIX; -extern const QName QN_XSTREAM_CONFLICT; -extern const QName QN_XSTREAM_CONNECTION_TIMEOUT; -extern const QName QN_XSTREAM_HOST_GONE; -extern const QName QN_XSTREAM_HOST_UNKNOWN; -extern const QName QN_XSTREAM_IMPROPER_ADDRESSIING; -extern const QName QN_XSTREAM_INTERNAL_SERVER_ERROR; -extern const QName QN_XSTREAM_INVALID_FROM; -extern const QName QN_XSTREAM_INVALID_ID; -extern const QName QN_XSTREAM_INVALID_NAMESPACE; -extern const QName QN_XSTREAM_INVALID_XML; -extern const QName QN_XSTREAM_NOT_AUTHORIZED; -extern const QName QN_XSTREAM_POLICY_VIOLATION; -extern const QName QN_XSTREAM_REMOTE_CONNECTION_FAILED; -extern const QName QN_XSTREAM_RESOURCE_CONSTRAINT; -extern const QName QN_XSTREAM_RESTRICTED_XML; -extern const QName QN_XSTREAM_SEE_OTHER_HOST; -extern const QName QN_XSTREAM_SYSTEM_SHUTDOWN; -extern const QName QN_XSTREAM_UNDEFINED_CONDITION; -extern const QName QN_XSTREAM_UNSUPPORTED_ENCODING; -extern const QName QN_XSTREAM_UNSUPPORTED_STANZA_TYPE; -extern const QName QN_XSTREAM_UNSUPPORTED_VERSION; -extern const QName QN_XSTREAM_XML_NOT_WELL_FORMED; -extern const QName QN_XSTREAM_TEXT; - -extern const QName QN_TLS_STARTTLS; -extern const QName QN_TLS_REQUIRED; -extern const QName QN_TLS_PROCEED; -extern const QName QN_TLS_FAILURE; - -extern const QName QN_SASL_MECHANISMS; -extern const QName QN_SASL_MECHANISM; -extern const QName QN_SASL_AUTH; -extern const QName QN_SASL_CHALLENGE; -extern const QName QN_SASL_RESPONSE; -extern const QName QN_SASL_ABORT; -extern const QName QN_SASL_SUCCESS; -extern const QName QN_SASL_FAILURE; -extern const QName QN_SASL_ABORTED; -extern const QName QN_SASL_INCORRECT_ENCODING; -extern const QName QN_SASL_INVALID_AUTHZID; -extern const QName QN_SASL_INVALID_MECHANISM; -extern const QName QN_SASL_MECHANISM_TOO_WEAK; -extern const QName QN_SASL_NOT_AUTHORIZED; -extern const QName QN_SASL_TEMPORARY_AUTH_FAILURE; - -extern const QName QN_DIALBACK_RESULT; -extern const QName QN_DIALBACK_VERIFY; - -extern const QName QN_STANZA_BAD_REQUEST; -extern const QName QN_STANZA_CONFLICT; -extern const QName QN_STANZA_FEATURE_NOT_IMPLEMENTED; -extern const QName QN_STANZA_FORBIDDEN; -extern const QName QN_STANZA_GONE; -extern const QName QN_STANZA_INTERNAL_SERVER_ERROR; -extern const QName QN_STANZA_ITEM_NOT_FOUND; -extern const QName QN_STANZA_JID_MALFORMED; -extern const QName QN_STANZA_NOT_ACCEPTABLE; -extern const QName QN_STANZA_NOT_ALLOWED; -extern const QName QN_STANZA_PAYMENT_REQUIRED; -extern const QName QN_STANZA_RECIPIENT_UNAVAILABLE; -extern const QName QN_STANZA_REDIRECT; -extern const QName QN_STANZA_REGISTRATION_REQUIRED; -extern const QName QN_STANZA_REMOTE_SERVER_NOT_FOUND; -extern const QName QN_STANZA_REMOTE_SERVER_TIMEOUT; -extern const QName QN_STANZA_RESOURCE_CONSTRAINT; -extern const QName QN_STANZA_SERVICE_UNAVAILABLE; -extern const QName QN_STANZA_SUBSCRIPTION_REQUIRED; -extern const QName QN_STANZA_UNDEFINED_CONDITION; -extern const QName QN_STANZA_UNEXPECTED_REQUEST; -extern const QName QN_STANZA_TEXT; - -extern const QName QN_BIND_BIND; -extern const QName QN_BIND_RESOURCE; -extern const QName QN_BIND_JID; - -extern const QName QN_MESSAGE; -extern const QName QN_BODY; -extern const QName QN_SUBJECT; -extern const QName QN_THREAD; -extern const QName QN_PRESENCE; -extern const QName QN_SHOW; -extern const QName QN_STATUS; -extern const QName QN_LANG; -extern const QName QN_PRIORITY; -extern const QName QN_IQ; -extern const QName QN_ERROR; - -extern const QName QN_SERVER_MESSAGE; -extern const QName QN_SERVER_BODY; -extern const QName QN_SERVER_SUBJECT; -extern const QName QN_SERVER_THREAD; -extern const QName QN_SERVER_PRESENCE; -extern const QName QN_SERVER_SHOW; -extern const QName QN_SERVER_STATUS; -extern const QName QN_SERVER_LANG; -extern const QName QN_SERVER_PRIORITY; -extern const QName QN_SERVER_IQ; -extern const QName QN_SERVER_ERROR; - -extern const QName QN_SESSION_SESSION; - -extern const QName QN_PRIVACY_QUERY; -extern const QName QN_PRIVACY_ACTIVE; -extern const QName QN_PRIVACY_DEFAULT; -extern const QName QN_PRIVACY_LIST; -extern const QName QN_PRIVACY_ITEM; -extern const QName QN_PRIVACY_IQ; -extern const QName QN_PRIVACY_MESSAGE; -extern const QName QN_PRIVACY_PRESENCE_IN; -extern const QName QN_PRIVACY_PRESENCE_OUT; - -extern const QName QN_ROSTER_QUERY; -extern const QName QN_ROSTER_ITEM; -extern const QName QN_ROSTER_GROUP; - -extern const QName QN_VCARD_QUERY; -extern const QName QN_VCARD_FN; - -extern const QName QN_XML_LANG; - -extern const QName QN_ENCODING; -extern const QName QN_VERSION; -extern const QName QN_TO; -extern const QName QN_FROM; -extern const QName QN_TYPE; -extern const QName QN_ID; -extern const QName QN_CODE; -extern const QName QN_NAME; -extern const QName QN_VALUE; -extern const QName QN_ACTION; -extern const QName QN_ORDER; -extern const QName QN_MECHANISM; -extern const QName QN_ASK; -extern const QName QN_JID; -extern const QName QN_SUBSCRIPTION; - - -extern const QName QN_XMLNS_CLIENT; -extern const QName QN_XMLNS_SERVER; -extern const QName QN_XMLNS_STREAM; +extern const TQName TQN_STREAM_STREAM; +extern const TQName TQN_STREAM_FEATURES; +extern const TQName TQN_STREAM_ERROR; + +extern const TQName TQN_XSTREAM_BAD_FORMAT; +extern const TQName TQN_XSTREAM_BAD_NAMESPACE_PREFIX; +extern const TQName TQN_XSTREAM_CONFLICT; +extern const TQName TQN_XSTREAM_CONNECTION_TIMEOUT; +extern const TQName TQN_XSTREAM_HOST_GONE; +extern const TQName TQN_XSTREAM_HOST_UNKNOWN; +extern const TQName TQN_XSTREAM_IMPROPER_ADDRESSIING; +extern const TQName TQN_XSTREAM_INTERNAL_SERVER_ERROR; +extern const TQName TQN_XSTREAM_INVALID_FROM; +extern const TQName TQN_XSTREAM_INVALID_ID; +extern const TQName TQN_XSTREAM_INVALID_NAMESPACE; +extern const TQName TQN_XSTREAM_INVALID_XML; +extern const TQName TQN_XSTREAM_NOT_AUTHORIZED; +extern const TQName TQN_XSTREAM_POLICY_VIOLATION; +extern const TQName TQN_XSTREAM_REMOTE_CONNECTION_FAILED; +extern const TQName TQN_XSTREAM_RESOURCE_CONSTRAINT; +extern const TQName TQN_XSTREAM_RESTRICTED_XML; +extern const TQName TQN_XSTREAM_SEE_OTHER_HOST; +extern const TQName TQN_XSTREAM_SYSTEM_SHUTDOWN; +extern const TQName TQN_XSTREAM_UNDEFINED_CONDITION; +extern const TQName TQN_XSTREAM_UNSUPPORTED_ENCODING; +extern const TQName TQN_XSTREAM_UNSUPPORTED_STANZA_TYPE; +extern const TQName TQN_XSTREAM_UNSUPPORTED_VERSION; +extern const TQName TQN_XSTREAM_XML_NOT_WELL_FORMED; +extern const TQName TQN_XSTREAM_TEXT; + +extern const TQName TQN_TLS_STARTTLS; +extern const TQName TQN_TLS_RETQUIRED; +extern const TQName TQN_TLS_PROCEED; +extern const TQName TQN_TLS_FAILURE; + +extern const TQName TQN_SASL_MECHANISMS; +extern const TQName TQN_SASL_MECHANISM; +extern const TQName TQN_SASL_AUTH; +extern const TQName TQN_SASL_CHALLENGE; +extern const TQName TQN_SASL_RESPONSE; +extern const TQName TQN_SASL_ABORT; +extern const TQName TQN_SASL_SUCCESS; +extern const TQName TQN_SASL_FAILURE; +extern const TQName TQN_SASL_ABORTED; +extern const TQName TQN_SASL_INCORRECT_ENCODING; +extern const TQName TQN_SASL_INVALID_AUTHZID; +extern const TQName TQN_SASL_INVALID_MECHANISM; +extern const TQName TQN_SASL_MECHANISM_TOO_WEAK; +extern const TQName TQN_SASL_NOT_AUTHORIZED; +extern const TQName TQN_SASL_TEMPORARY_AUTH_FAILURE; + +extern const TQName TQN_DIALBACK_RESULT; +extern const TQName TQN_DIALBACK_VERIFY; + +extern const TQName TQN_STANZA_BAD_REQUEST; +extern const TQName TQN_STANZA_CONFLICT; +extern const TQName TQN_STANZA_FEATURE_NOT_IMPLEMENTED; +extern const TQName TQN_STANZA_FORBIDDEN; +extern const TQName TQN_STANZA_GONE; +extern const TQName TQN_STANZA_INTERNAL_SERVER_ERROR; +extern const TQName TQN_STANZA_ITEM_NOT_FOUND; +extern const TQName TQN_STANZA_JID_MALFORMED; +extern const TQName TQN_STANZA_NOT_ACCEPTABLE; +extern const TQName TQN_STANZA_NOT_ALLOWED; +extern const TQName TQN_STANZA_PAYMENT_RETQUIRED; +extern const TQName TQN_STANZA_RECIPIENT_UNAVAILABLE; +extern const TQName TQN_STANZA_REDIRECT; +extern const TQName TQN_STANZA_REGISTRATION_RETQUIRED; +extern const TQName TQN_STANZA_REMOTE_SERVER_NOT_FOUND; +extern const TQName TQN_STANZA_REMOTE_SERVER_TIMEOUT; +extern const TQName TQN_STANZA_RESOURCE_CONSTRAINT; +extern const TQName TQN_STANZA_SERVICE_UNAVAILABLE; +extern const TQName TQN_STANZA_SUBSCRIPTION_RETQUIRED; +extern const TQName TQN_STANZA_UNDEFINED_CONDITION; +extern const TQName TQN_STANZA_UNEXPECTED_REQUEST; +extern const TQName TQN_STANZA_TEXT; + +extern const TQName TQN_BIND_BIND; +extern const TQName TQN_BIND_RESOURCE; +extern const TQName TQN_BIND_JID; + +extern const TQName TQN_MESSAGE; +extern const TQName TQN_BODY; +extern const TQName TQN_SUBJECT; +extern const TQName TQN_THREAD; +extern const TQName TQN_PRESENCE; +extern const TQName TQN_SHOW; +extern const TQName TQN_STATUS; +extern const TQName TQN_LANG; +extern const TQName TQN_PRIORITY; +extern const TQName TQN_IQ; +extern const TQName TQN_ERROR; + +extern const TQName TQN_SERVER_MESSAGE; +extern const TQName TQN_SERVER_BODY; +extern const TQName TQN_SERVER_SUBJECT; +extern const TQName TQN_SERVER_THREAD; +extern const TQName TQN_SERVER_PRESENCE; +extern const TQName TQN_SERVER_SHOW; +extern const TQName TQN_SERVER_STATUS; +extern const TQName TQN_SERVER_LANG; +extern const TQName TQN_SERVER_PRIORITY; +extern const TQName TQN_SERVER_IQ; +extern const TQName TQN_SERVER_ERROR; + +extern const TQName TQN_SESSION_SESSION; + +extern const TQName TQN_PRIVACY_TQUERY; +extern const TQName TQN_PRIVACY_ACTIVE; +extern const TQName TQN_PRIVACY_DEFAULT; +extern const TQName TQN_PRIVACY_LIST; +extern const TQName TQN_PRIVACY_ITEM; +extern const TQName TQN_PRIVACY_IQ; +extern const TQName TQN_PRIVACY_MESSAGE; +extern const TQName TQN_PRIVACY_PRESENCE_IN; +extern const TQName TQN_PRIVACY_PRESENCE_OUT; + +extern const TQName TQN_ROSTER_TQUERY; +extern const TQName TQN_ROSTER_ITEM; +extern const TQName TQN_ROSTER_GROUP; + +extern const TQName TQN_VCARD_TQUERY; +extern const TQName TQN_VCARD_FN; + +extern const TQName TQN_XML_LANG; + +extern const TQName TQN_ENCODING; +extern const TQName TQN_VERSION; +extern const TQName TQN_TO; +extern const TQName TQN_FROM; +extern const TQName TQN_TYPE; +extern const TQName TQN_ID; +extern const TQName TQN_CODE; +extern const TQName TQN_NAME; +extern const TQName TQN_VALUE; +extern const TQName TQN_ACTION; +extern const TQName TQN_ORDER; +extern const TQName TQN_MECHANISM; +extern const TQName TQN_ASK; +extern const TQName TQN_JID; +extern const TQName TQN_SUBSCRIPTION; + + +extern const TQName TQN_XMLNS_CLIENT; +extern const TQName TQN_XMLNS_SERVER; +extern const TQName TQN_XMLNS_STREAM; // Presence extern const std::string STR_SHOW_AWAY; @@ -269,31 +269,31 @@ extern const std::string STR_UNSUBSCRIBED; // JEP 0030 -extern const QName QN_NODE; -extern const QName QN_CATEGORY; -extern const QName QN_VAR; +extern const TQName TQN_NODE; +extern const TQName TQN_CATEGORY; +extern const TQName TQN_VAR; extern const std::string NS_DISCO_INFO; extern const std::string NS_DISCO_ITEMS; -extern const QName QN_DISCO_INFO_QUERY; -extern const QName QN_DISCO_IDENTITY; -extern const QName QN_DISCO_FEATURE; +extern const TQName TQN_DISCO_INFO_TQUERY; +extern const TQName TQN_DISCO_IDENTITY; +extern const TQName TQN_DISCO_FEATURE; -extern const QName QN_DISCO_ITEMS_QUERY; -extern const QName QN_DISCO_ITEM; +extern const TQName TQN_DISCO_ITEMS_TQUERY; +extern const TQName TQN_DISCO_ITEM; // JEP 0115 extern const std::string NS_CAPS; -extern const QName QN_CAPS_C; -extern const QName QN_VER; -extern const QName QN_EXT; +extern const TQName TQN_CAPS_C; +extern const TQName TQN_VER; +extern const TQName TQN_EXT; // JEP 0091 Delayed Delivery extern const std::string kNSDelay; -extern const QName kQnDelayX; -extern const QName kQnStamp; +extern const TQName kQnDelayX; +extern const TQName kQnStamp; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/jid.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/jid.cc index b742e03a..48a89504 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/jid.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/jid.cc @@ -56,13 +56,13 @@ Jid::Jid(const std::string & jid_string) { } // First find the slash and slice of that part - size_t slash = jid_string.find('/'); + size_t slash = jid_string.tqfind('/'); std::string resource_name = (slash == std::string::npos ? STR_EMPTY : jid_string.substr(slash + 1)); // Now look for the node std::string node_name; - size_t at = jid_string.find('@'); + size_t at = jid_string.tqfind('@'); size_t domain_begin; if (at < slash && at != std::string::npos) { node_name = jid_string.substr(0, at); @@ -80,13 +80,13 @@ Jid::Jid(const std::string & jid_string) { // avoid allocating these constants repeatedly std::string domain_name; - if (domain_length == 9 && jid_string.find("gmail.com", domain_begin) == domain_begin) { + if (domain_length == 9 && jid_string.tqfind("gmail.com", domain_begin) == domain_begin) { domain_name = STR_GMAIL_COM; } - else if (domain_length == 14 && jid_string.find("googlemail.com", domain_begin) == domain_begin) { + else if (domain_length == 14 && jid_string.tqfind("googlemail.com", domain_begin) == domain_begin) { domain_name = STR_GOOGLEMAIL_COM; } - else if (domain_length == 10 && jid_string.find("google.com", domain_begin) == domain_begin) { + else if (domain_length == 10 && jid_string.tqfind("google.com", domain_begin) == domain_begin) { domain_name = STR_GOOGLE_COM; } else { diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/plainsaslhandler.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/plainsaslhandler.h index 659820f5..488dc56e 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/plainsaslhandler.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/plainsaslhandler.h @@ -49,7 +49,7 @@ public: return ""; } - std::vector::const_iterator it = std::find(mechanisms.begin(), mechanisms.end(), "PLAIN"); + std::vector::const_iterator it = std::tqfind(mechanisms.begin(), mechanisms.end(), "PLAIN"); if (it == mechanisms.end()) { return ""; } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslcookiemechanism.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslcookiemechanism.h index a6630d90..dbd56a24 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslcookiemechanism.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslcookiemechanism.h @@ -44,8 +44,8 @@ public: virtual XmlElement * StartSaslAuth() { // send initial request - XmlElement * el = new XmlElement(QN_SASL_AUTH, true); - el->AddAttr(QN_MECHANISM, mechanism_); + XmlElement * el = new XmlElement(TQN_SASL_AUTH, true); + el->AddAttr(TQN_MECHANISM, mechanism_); std::string credential; credential.append("\0", 1); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslmechanism.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslmechanism.cc index 092df104..4a6d7c24 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslmechanism.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslmechanism.cc @@ -34,12 +34,12 @@ namespace buzz { XmlElement * SaslMechanism::StartSaslAuth() { - return new XmlElement(QN_SASL_AUTH, true); + return new XmlElement(TQN_SASL_AUTH, true); } XmlElement * SaslMechanism::HandleSaslChallenge(const XmlElement * challenge) { - return new XmlElement(QN_SASL_ABORT, true); + return new XmlElement(TQN_SASL_ABORT, true); } void diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslplainmechanism.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslplainmechanism.h index 7e0b0562..2d8c1b76 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslplainmechanism.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/saslplainmechanism.h @@ -43,8 +43,8 @@ public: virtual XmlElement * StartSaslAuth() { // send initial request - XmlElement * el = new XmlElement(QN_SASL_AUTH, true); - el->AddAttr(QN_MECHANISM, "PLAIN"); + XmlElement * el = new XmlElement(TQN_SASL_AUTH, true); + el->AddAttr(TQN_MECHANISM, "PLAIN"); FormatXmppPassword credential; credential.Append("\0", 1); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.cc index 959b6f88..f5b9d0b4 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.cc @@ -86,7 +86,7 @@ public: void OnSocketClosed(); }; -XmppReturnStatus +XmppReturntqStatus XmppClient::Connect(const XmppClientSettings & settings, AsyncSocket * socket, PreXmppAuth * pre_auth) { if (socket == NULL) return XMPP_RETURN_BADARGUMENT; @@ -237,7 +237,7 @@ XmppClient::ProcessResponse() { return STATE_BLOCKED; } -XmppReturnStatus +XmppReturntqStatus XmppClient::Disconnect() { if (d_->socket_.get() == NULL) return XMPP_RETURN_BADSTATE; @@ -245,7 +245,7 @@ XmppClient::Disconnect() { return XMPP_RETURN_OK; } -XmppClient::XmppClient(Task * parent) : Task(parent), +XmppClient::XmppClient(Task * tqparent) : Task(tqparent), delivering_signal_(false) { d_.reset(new Private(this)); } @@ -263,17 +263,17 @@ XmppClient::NextId() { return d_->engine_->NextId(); } -XmppReturnStatus +XmppReturntqStatus XmppClient::SendStanza(const XmlElement * stanza) { return d_->engine_->SendStanza(stanza); } -XmppReturnStatus +XmppReturntqStatus XmppClient::SendStanzaError(const XmlElement * old_stanza, XmppStanzaError xse, const std::string & message) { return d_->engine_->SendStanzaError(old_stanza, xse, message); } -XmppReturnStatus +XmppReturntqStatus XmppClient::SendRaw(const std::string & text) { return d_->engine_->SendRaw(text); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.h index f8b4798c..540d774d 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.h @@ -51,9 +51,9 @@ class CaptchaChallenge; // ///////////////////////////////////////////////////////////////////// // -// See Task first. XmppClient is a parent task for XmppTasks. +// See Task first. XmppClient is a tqparent task for XmppTasks. // -// XmppClient is a task which is designed to be the parent task for +// XmppClient is a task which is designed to be the tqparent task for // all tasks that depend on a single Xmpp connection. If you want to, // for example, listen for subscription requests forever, then your // listener should be a task that is a child of the XmppClient that owns @@ -71,17 +71,17 @@ class CaptchaChallenge; class XmppClient : public Task, public sigslot::has_slots<> { public: - XmppClient(Task * parent); + XmppClient(Task * tqparent); ~XmppClient(); - XmppReturnStatus Connect(const XmppClientSettings & settings, + XmppReturntqStatus Connect(const XmppClientSettings & settings, AsyncSocket * socket, PreXmppAuth * preauth); virtual Task * GetParent(int code); virtual int ProcessStart(); virtual int ProcessResponse(); - XmppReturnStatus Disconnect(); + XmppReturntqStatus Disconnect(); const Jid & jid(); sigslot::signal1 SignalStateChange; @@ -97,9 +97,9 @@ public: std::string GetAuthCookie(); std::string NextId(); - XmppReturnStatus SendStanza(const XmlElement *stanza); - XmppReturnStatus SendRaw(const std::string & text); - XmppReturnStatus SendStanzaError(const XmlElement * pelOriginal, + XmppReturntqStatus SendStanza(const XmlElement *stanza); + XmppReturntqStatus SendRaw(const std::string & text); + XmppReturntqStatus SendStanzaError(const XmlElement * pelOriginal, XmppStanzaError code, const std::string & text); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengine.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengine.h index ef8f2ea8..58576328 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengine.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengine.h @@ -30,7 +30,7 @@ // also part of the API #include "talk/xmpp/jid.h" -#include "talk/xmllite/qname.h" +#include "talk/xmllite/tqname.h" #include "talk/xmllite/xmlelement.h" @@ -53,22 +53,22 @@ enum XmppStanzaError { XSE_JID_MALFORMED, XSE_NOT_ACCEPTABLE, XSE_NOT_ALLOWED, - XSE_PAYMENT_REQUIRED, + XSE_PAYMENT_RETQUIRED, XSE_RECIPIENT_UNAVAILABLE, XSE_REDIRECT, - XSE_REGISTRATION_REQUIRED, + XSE_REGISTRATION_RETQUIRED, XSE_SERVER_NOT_FOUND, XSE_SERVER_TIMEOUT, XSE_RESOURCE_CONSTRAINT, XSE_SERVICE_UNAVAILABLE, - XSE_SUBSCRIPTION_REQUIRED, + XSE_SUBSCRIPTION_RETQUIRED, XSE_UNDEFINED_CONDITION, XSE_UNEXPECTED_REQUEST, }; -// XmppReturnStatus +// XmppReturntqStatus // This is used by API functions to synchronously return status. -enum XmppReturnStatus { +enum XmppReturntqStatus { XMPP_RETURN_OK, XMPP_RETURN_BADARGUMENT, XMPP_RETURN_BADSTATE, @@ -171,34 +171,34 @@ public: // SOCKET INPUT AND OUTPUT ------------------------------------------------ //! Registers the handler for socket output - virtual XmppReturnStatus SetOutputHandler(XmppOutputHandler *pxoh) = 0; + virtual XmppReturntqStatus SetOutputHandler(XmppOutputHandler *pxoh) = 0; //! Provides socket input to the engine - virtual XmppReturnStatus HandleInput(const char * bytes, size_t len) = 0; + virtual XmppReturntqStatus HandleInput(const char * bytes, size_t len) = 0; //! Advises the engine that the socket has closed - virtual XmppReturnStatus ConnectionClosed() = 0; + virtual XmppReturntqStatus ConnectionClosed() = 0; // SESSION SETUP --------------------------------------------------------- //! Indicates the (bare) JID for the user to use. - virtual XmppReturnStatus SetUser(const Jid & jid)= 0; + virtual XmppReturntqStatus SetUser(const Jid & jid)= 0; //! Get the login (bare) JID. virtual const Jid & GetUser() = 0; //! Provides different methods for credentials for login. //! Takes ownership of this object; deletes when login is done - virtual XmppReturnStatus SetSaslHandler(SaslHandler * h) = 0; + virtual XmppReturntqStatus SetSaslHandler(SaslHandler * h) = 0; //! Sets whether TLS will be used within the connection (default true). - virtual XmppReturnStatus SetUseTls(bool useTls) = 0; + virtual XmppReturntqStatus SetUseTls(bool useTls) = 0; //! Sets an alternate domain from which we allows TLS certificates. //! This is for use in the case where a we want to allow a proxy to //! serve up its own certificate rather than one owned by the underlying //! domain. - virtual XmppReturnStatus SetTlsServerDomain(const std::string & proxy_domain) = 0; + virtual XmppReturntqStatus SetTlsServerDomain(const std::string & proxy_domain) = 0; //! Gets whether TLS will be used within the connection. virtual bool GetUseTls() = 0; @@ -206,7 +206,7 @@ public: //! Sets the request resource name, if any (optional). //! Note that the resource name may be overridden by the server; after //! binding, the actual resource name is available as part of FullJid(). - virtual XmppReturnStatus SetRequestedResource(const std::string& resource) = 0; + virtual XmppReturntqStatus SetRequestedResource(const std::string& resource) = 0; //! Gets the request resource name. virtual const std::string & GetRequestedResource() = 0; @@ -214,12 +214,12 @@ public: // SESSION MANAGEMENT --------------------------------------------------- //! Set callback for state changes. - virtual XmppReturnStatus SetSessionHandler(XmppSessionHandler* handler) = 0; + virtual XmppReturntqStatus SetSessionHandler(XmppSessionHandler* handler) = 0; //! Initiates the XMPP connection. //! After supplying connection settings, call this once to initiate, //! (optionally) encrypt, authenticate, and bind the connection. - virtual XmppReturnStatus Connect() = 0; + virtual XmppReturntqStatus Connect() = 0; //! The current engine state. virtual State GetState() = 0; @@ -240,7 +240,7 @@ public: //! Sends CloseConnection to output, and disconnects and registered //! session handlers. After Disconnect completes, it is guaranteed //! that no further callbacks will be made. - virtual XmppReturnStatus Disconnect() = 0; + virtual XmppReturntqStatus Disconnect() = 0; // APPLICATION USE ------------------------------------------------------- @@ -257,33 +257,33 @@ public: //! Adds a listener for session events. //! Stanza delivery is chained to session handlers; the first to //! return 'true' is the last to get each stanza. - virtual XmppReturnStatus AddStanzaHandler(XmppStanzaHandler* handler, HandlerLevel level = HL_PEEK) = 0; + virtual XmppReturntqStatus AddStanzaHandler(XmppStanzaHandler* handler, HandlerLevel level = HL_PEEK) = 0; //! Removes a listener for session events. - virtual XmppReturnStatus RemoveStanzaHandler(XmppStanzaHandler* handler) = 0; + virtual XmppReturntqStatus RemoveStanzaHandler(XmppStanzaHandler* handler) = 0; //! Sends a stanza to the server. - virtual XmppReturnStatus SendStanza(const XmlElement * pelStanza) = 0; + virtual XmppReturntqStatus SendStanza(const XmlElement * pelStanza) = 0; //! Sends raw text to the server - virtual XmppReturnStatus SendRaw(const std::string & text) = 0; + virtual XmppReturntqStatus SendRaw(const std::string & text) = 0; //! Sends an iq to the server, and registers a callback for the result. //! Returns the cookie passed to the result handler. - virtual XmppReturnStatus SendIq(const XmlElement* pelStanza, + virtual XmppReturntqStatus SendIq(const XmlElement* pelStanza, XmppIqHandler* iq_handler, XmppIqCookie* cookie) = 0; //! Unregisters an iq callback handler given its cookie. //! No callback will come to this handler after it's unregistered. - virtual XmppReturnStatus RemoveIqHandler(XmppIqCookie cookie, + virtual XmppReturntqStatus RemoveIqHandler(XmppIqCookie cookie, XmppIqHandler** iq_handler) = 0; //! Forms and sends an error in response to the given stanza. //! Swaps to and from, sets type to "error", and adds error information //! based on the passed code. Text is optional and may be STR_EMPTY. - virtual XmppReturnStatus SendStanzaError(const XmlElement * pelOriginal, + virtual XmppReturntqStatus SendStanzaError(const XmlElement * pelOriginal, XmppStanzaError code, const std::string & text) = 0; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.cc index 173d711b..c9569524 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.cc @@ -85,7 +85,7 @@ XmppEngineImpl::~XmppEngineImpl() { DeleteIqCookies(); } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SetOutputHandler(XmppOutputHandler* output_handler) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -95,7 +95,7 @@ XmppEngineImpl::SetOutputHandler(XmppOutputHandler* output_handler) { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SetSessionHandler(XmppSessionHandler* session_handler) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -105,7 +105,7 @@ XmppEngineImpl::SetSessionHandler(XmppSessionHandler* session_handler) { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::HandleInput(const char * bytes, size_t len) { if (state_ < STATE_OPENING || state_ > STATE_OPEN) return XMPP_RETURN_BADSTATE; @@ -117,7 +117,7 @@ XmppEngineImpl::HandleInput(const char * bytes, size_t len) { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::ConnectionClosed() { if (state_ != STATE_CLOSED) { EnterExit ee(this); @@ -128,7 +128,7 @@ XmppEngineImpl::ConnectionClosed() { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SetUseTls(bool useTls) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -138,7 +138,7 @@ XmppEngineImpl::SetUseTls(bool useTls) { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SetTlsServerDomain(const std::string & tls_server_domain) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -153,7 +153,7 @@ XmppEngineImpl::GetUseTls() { return tls_needed_; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SetUser(const Jid & jid) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -168,7 +168,7 @@ XmppEngineImpl::GetUser() { return user_jid_; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SetSaslHandler(SaslHandler * sasl_handler) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -177,7 +177,7 @@ XmppEngineImpl::SetSaslHandler(SaslHandler * sasl_handler) { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SetRequestedResource(const std::string & resource) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -192,7 +192,7 @@ XmppEngineImpl::GetRequestedResource() { return requested_resource_; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::AddStanzaHandler(XmppStanzaHandler * stanza_handler, XmppEngine::HandlerLevel level) { if (state_ == STATE_CLOSED) @@ -203,7 +203,7 @@ XmppEngineImpl::AddStanzaHandler(XmppStanzaHandler * stanza_handler, return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::RemoveStanzaHandler(XmppStanzaHandler * stanza_handler) { bool found = false; @@ -227,7 +227,7 @@ XmppEngineImpl::RemoveStanzaHandler(XmppStanzaHandler * stanza_handler) { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::Connect() { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -245,7 +245,7 @@ XmppEngineImpl::Connect() { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SendStanza(const XmlElement * element) { if (state_ == STATE_CLOSED) return XMPP_RETURN_BADSTATE; @@ -263,7 +263,7 @@ XmppEngineImpl::SendStanza(const XmlElement * element) { return XMPP_RETURN_OK; } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SendRaw(const std::string & text) { if (state_ == STATE_CLOSED || login_task_.get()) return XMPP_RETURN_BADSTATE; @@ -282,7 +282,7 @@ XmppEngineImpl::NextId() { return ss.str(); } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::Disconnect() { if (state_ != STATE_CLOSED) { @@ -317,7 +317,7 @@ XmppEngineImpl::IncomingStanza(const XmlElement * stanza) { if (HasError() || raised_reset_) return; - if (stanza->Name() == QN_STREAM_ERROR) { + if (stanza->Name() == TQN_STREAM_ERROR) { // Explicit XMPP stream error SignalStreamError(stanza); } else if (login_task_.get()) { @@ -344,8 +344,8 @@ XmppEngineImpl::IncomingStanza(const XmlElement * stanza) { // If nobody wants to handle a stanza then send back an error. // Only do this for IQ stanzas as messages should probably just be dropped // and presence stanzas should certainly be dropped. - std::string type = stanza->Attr(QN_TYPE); - if (stanza->Name() == QN_IQ && + std::string type = stanza->Attr(TQN_TYPE); + if (stanza->Name() == TQN_IQ && !(type == "error" || type == "result")) { SendStanzaError(stanza, XSE_FEATURE_NOT_IMPLEMENTED, STR_EMPTY); } @@ -377,7 +377,7 @@ XmppEngineImpl::InternalSendStanza(const XmlElement * element) { // It should really never be necessary to set a FROM attribute on a stanza. // It is implied by the bind on the stream and if you get it wrong // (by flipping from/to on a message?) the server will close the stream. - ASSERT(!element->HasAttr(QN_FROM)); + ASSERT(!element->HasAttr(TQN_FROM)); // TODO: consider caching the XmlPrinter XmlPrinter::PrintXml(output_.get(), element, diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.h index c36f168c..6011d9e8 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.h @@ -57,33 +57,33 @@ public: // SOCKET INPUT AND OUTPUT ------------------------------------------------ //! Registers the handler for socket output - virtual XmppReturnStatus SetOutputHandler(XmppOutputHandler *pxoh); + virtual XmppReturntqStatus SetOutputHandler(XmppOutputHandler *pxoh); //! Provides socket input to the engine - virtual XmppReturnStatus HandleInput(const char * bytes, size_t len); + virtual XmppReturntqStatus HandleInput(const char * bytes, size_t len); //! Advises the engine that the socket has closed - virtual XmppReturnStatus ConnectionClosed(); + virtual XmppReturntqStatus ConnectionClosed(); // SESSION SETUP --------------------------------------------------------- //! Indicates the (bare) JID for the user to use. - virtual XmppReturnStatus SetUser(const Jid & jid); + virtual XmppReturntqStatus SetUser(const Jid & jid); //! Get the login (bare) JID. virtual const Jid & GetUser(); //! Indicates the autentication to use. Takes ownership of the object. - virtual XmppReturnStatus SetSaslHandler(SaslHandler * sasl_handler); + virtual XmppReturntqStatus SetSaslHandler(SaslHandler * sasl_handler); //! Sets whether TLS will be used within the connection (default true). - virtual XmppReturnStatus SetUseTls(bool useTls); + virtual XmppReturntqStatus SetUseTls(bool useTls); //! Sets an alternate domain from which we allows TLS certificates. //! This is for use in the case where a we want to allow a proxy to //! serve up its own certificate rather than one owned by the underlying //! domain. - virtual XmppReturnStatus SetTlsServerDomain(const std::string & proxy_domain); + virtual XmppReturntqStatus SetTlsServerDomain(const std::string & proxy_domain); //! Gets whether TLS will be used within the connection. virtual bool GetUseTls(); @@ -91,7 +91,7 @@ public: //! Sets the request resource name, if any (optional). //! Note that the resource name may be overridden by the server; after //! binding, the actual resource name is available as part of FullJid(). - virtual XmppReturnStatus SetRequestedResource(const std::string& resource); + virtual XmppReturntqStatus SetRequestedResource(const std::string& resource); //! Gets the request resource name. virtual const std::string & GetRequestedResource(); @@ -99,12 +99,12 @@ public: // SESSION MANAGEMENT --------------------------------------------------- //! Set callback for state changes. - virtual XmppReturnStatus SetSessionHandler(XmppSessionHandler* handler); + virtual XmppReturntqStatus SetSessionHandler(XmppSessionHandler* handler); //! Initiates the XMPP connection. //! After supplying connection settings, call this once to initiate, //! (optionally) encrypt, authenticate, and bind the connection. - virtual XmppReturnStatus Connect(); + virtual XmppReturntqStatus Connect(); //! The current engine state. virtual State GetState() { return state_; } @@ -125,40 +125,40 @@ public: //! Sends CloseConnection to output, and disconnects and registered //! session handlers. After Disconnect completes, it is guaranteed //! that no further callbacks will be made. - virtual XmppReturnStatus Disconnect(); + virtual XmppReturntqStatus Disconnect(); // APPLICATION USE ------------------------------------------------------- //! Adds a listener for session events. //! Stanza delivery is chained to session handlers; the first to //! return 'true' is the last to get each stanza. - virtual XmppReturnStatus AddStanzaHandler(XmppStanzaHandler* handler, + virtual XmppReturntqStatus AddStanzaHandler(XmppStanzaHandler* handler, XmppEngine::HandlerLevel level); //! Removes a listener for session events. - virtual XmppReturnStatus RemoveStanzaHandler(XmppStanzaHandler* handler); + virtual XmppReturntqStatus RemoveStanzaHandler(XmppStanzaHandler* handler); //! Sends a stanza to the server. - virtual XmppReturnStatus SendStanza(const XmlElement * pelStanza); + virtual XmppReturntqStatus SendStanza(const XmlElement * pelStanza); //! Sends raw text to the server - virtual XmppReturnStatus SendRaw(const std::string & text); + virtual XmppReturntqStatus SendRaw(const std::string & text); //! Sends an iq to the server, and registers a callback for the result. //! Returns the cookie passed to the result handler. - virtual XmppReturnStatus SendIq(const XmlElement* pelStanza, + virtual XmppReturntqStatus SendIq(const XmlElement* pelStanza, XmppIqHandler* iq_handler, XmppIqCookie* cookie); //! Unregisters an iq callback handler given its cookie. //! No callback will come to this handler after it's unregistered. - virtual XmppReturnStatus RemoveIqHandler(XmppIqCookie cookie, + virtual XmppReturntqStatus RemoveIqHandler(XmppIqCookie cookie, XmppIqHandler** iq_handler); //! Forms and sends an error in response to the given stanza. //! Swaps to and from, sets type to "error", and adds error information //! based on the passed code. Text is optional and may be STR_EMPTY. - virtual XmppReturnStatus SendStanzaError(const XmlElement * pelOriginal, + virtual XmppReturntqStatus SendStanzaError(const XmlElement * pelOriginal, XmppStanzaError code, const std::string & text); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl_iq.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl_iq.cc index eb623ed9..50ca23c1 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl_iq.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl_iq.cc @@ -54,26 +54,26 @@ private: }; -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SendIq(const XmlElement * element, XmppIqHandler * iq_handler, XmppIqCookie* cookie) { if (state_ == STATE_CLOSED) return XMPP_RETURN_BADSTATE; if (NULL == iq_handler) return XMPP_RETURN_BADARGUMENT; - if (!element || element->Name() != QN_IQ) + if (!element || element->Name() != TQN_IQ) return XMPP_RETURN_BADARGUMENT; - const std::string& type = element->Attr(QN_TYPE); + const std::string& type = element->Attr(TQN_TYPE); if (type != "get" && type != "set") return XMPP_RETURN_BADARGUMENT; - if (!element->HasAttr(QN_ID)) + if (!element->HasAttr(TQN_ID)) return XMPP_RETURN_BADARGUMENT; - const std::string& id = element->Attr(QN_ID); + const std::string& id = element->Attr(TQN_ID); XmppIqEntry * iq_entry = new XmppIqEntry(id, - element->Attr(QN_TO), + element->Attr(TQN_TO), this, iq_handler); iq_entries_->push_back(iq_entry); SendStanza(element); @@ -85,13 +85,13 @@ XmppEngineImpl::SendIq(const XmlElement * element, XmppIqHandler * iq_handler, } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::RemoveIqHandler(XmppIqCookie cookie, XmppIqHandler ** iq_handler) { std::vector >::iterator pos; - pos = std::find(iq_entries_->begin(), + pos = std::tqfind(iq_entries_->begin(), iq_entries_->end(), reinterpret_cast(cookie)); @@ -118,11 +118,11 @@ XmppEngineImpl::DeleteIqCookies() { } static void -AecImpl(XmlElement * error_element, const QName & name, +AecImpl(XmlElement * error_element, const TQName & name, const char * type, const char * code) { - error_element->AddElement(new XmlElement(QN_ERROR)); - error_element->AddAttr(QN_CODE, code, 1); - error_element->AddAttr(QN_TYPE, type, 1); + error_element->AddElement(new XmlElement(TQN_ERROR)); + error_element->AddAttr(TQN_CODE, code, 1); + error_element->AddAttr(TQN_TYPE, type, 1); error_element->AddElement(new XmlElement(name, true), 1); } @@ -131,75 +131,75 @@ static void AddErrorCode(XmlElement * error_element, XmppStanzaError code) { switch (code) { case XSE_BAD_REQUEST: - AecImpl(error_element, QN_STANZA_BAD_REQUEST, "modify", "400"); + AecImpl(error_element, TQN_STANZA_BAD_REQUEST, "modify", "400"); break; case XSE_CONFLICT: - AecImpl(error_element, QN_STANZA_CONFLICT, "cancel", "409"); + AecImpl(error_element, TQN_STANZA_CONFLICT, "cancel", "409"); break; case XSE_FEATURE_NOT_IMPLEMENTED: - AecImpl(error_element, QN_STANZA_FEATURE_NOT_IMPLEMENTED, + AecImpl(error_element, TQN_STANZA_FEATURE_NOT_IMPLEMENTED, "cancel", "501"); break; case XSE_FORBIDDEN: - AecImpl(error_element, QN_STANZA_FORBIDDEN, "auth", "403"); + AecImpl(error_element, TQN_STANZA_FORBIDDEN, "auth", "403"); break; case XSE_GONE: - AecImpl(error_element, QN_STANZA_GONE, "modify", "302"); + AecImpl(error_element, TQN_STANZA_GONE, "modify", "302"); break; case XSE_INTERNAL_SERVER_ERROR: - AecImpl(error_element, QN_STANZA_INTERNAL_SERVER_ERROR, "wait", "500"); + AecImpl(error_element, TQN_STANZA_INTERNAL_SERVER_ERROR, "wait", "500"); break; case XSE_ITEM_NOT_FOUND: - AecImpl(error_element, QN_STANZA_ITEM_NOT_FOUND, "cancel", "404"); + AecImpl(error_element, TQN_STANZA_ITEM_NOT_FOUND, "cancel", "404"); break; case XSE_JID_MALFORMED: - AecImpl(error_element, QN_STANZA_JID_MALFORMED, "modify", "400"); + AecImpl(error_element, TQN_STANZA_JID_MALFORMED, "modify", "400"); break; case XSE_NOT_ACCEPTABLE: - AecImpl(error_element, QN_STANZA_NOT_ACCEPTABLE, "cancel", "406"); + AecImpl(error_element, TQN_STANZA_NOT_ACCEPTABLE, "cancel", "406"); break; case XSE_NOT_ALLOWED: - AecImpl(error_element, QN_STANZA_NOT_ALLOWED, "cancel", "405"); + AecImpl(error_element, TQN_STANZA_NOT_ALLOWED, "cancel", "405"); break; - case XSE_PAYMENT_REQUIRED: - AecImpl(error_element, QN_STANZA_PAYMENT_REQUIRED, "auth", "402"); + case XSE_PAYMENT_RETQUIRED: + AecImpl(error_element, TQN_STANZA_PAYMENT_RETQUIRED, "auth", "402"); break; case XSE_RECIPIENT_UNAVAILABLE: - AecImpl(error_element, QN_STANZA_RECIPIENT_UNAVAILABLE, "wait", "404"); + AecImpl(error_element, TQN_STANZA_RECIPIENT_UNAVAILABLE, "wait", "404"); break; case XSE_REDIRECT: - AecImpl(error_element, QN_STANZA_REDIRECT, "modify", "302"); + AecImpl(error_element, TQN_STANZA_REDIRECT, "modify", "302"); break; - case XSE_REGISTRATION_REQUIRED: - AecImpl(error_element, QN_STANZA_REGISTRATION_REQUIRED, "auth", "407"); + case XSE_REGISTRATION_RETQUIRED: + AecImpl(error_element, TQN_STANZA_REGISTRATION_RETQUIRED, "auth", "407"); break; case XSE_SERVER_NOT_FOUND: - AecImpl(error_element, QN_STANZA_REMOTE_SERVER_NOT_FOUND, + AecImpl(error_element, TQN_STANZA_REMOTE_SERVER_NOT_FOUND, "cancel", "404"); break; case XSE_SERVER_TIMEOUT: - AecImpl(error_element, QN_STANZA_REMOTE_SERVER_TIMEOUT, "wait", "502"); + AecImpl(error_element, TQN_STANZA_REMOTE_SERVER_TIMEOUT, "wait", "502"); break; case XSE_RESOURCE_CONSTRAINT: - AecImpl(error_element, QN_STANZA_RESOURCE_CONSTRAINT, "wait", "500"); + AecImpl(error_element, TQN_STANZA_RESOURCE_CONSTRAINT, "wait", "500"); break; case XSE_SERVICE_UNAVAILABLE: - AecImpl(error_element, QN_STANZA_SERVICE_UNAVAILABLE, "cancel", "503"); + AecImpl(error_element, TQN_STANZA_SERVICE_UNAVAILABLE, "cancel", "503"); break; - case XSE_SUBSCRIPTION_REQUIRED: - AecImpl(error_element, QN_STANZA_SUBSCRIPTION_REQUIRED, "auth", "407"); + case XSE_SUBSCRIPTION_RETQUIRED: + AecImpl(error_element, TQN_STANZA_SUBSCRIPTION_RETQUIRED, "auth", "407"); break; case XSE_UNDEFINED_CONDITION: - AecImpl(error_element, QN_STANZA_UNDEFINED_CONDITION, "wait", "500"); + AecImpl(error_element, TQN_STANZA_UNDEFINED_CONDITION, "wait", "500"); break; case XSE_UNEXPECTED_REQUEST: - AecImpl(error_element, QN_STANZA_UNEXPECTED_REQUEST, "wait", "400"); + AecImpl(error_element, TQN_STANZA_UNEXPECTED_REQUEST, "wait", "400"); break; } } -XmppReturnStatus +XmppReturntqStatus XmppEngineImpl::SendStanzaError(const XmlElement * element_original, XmppStanzaError code, const std::string & text) { @@ -208,22 +208,22 @@ XmppEngineImpl::SendStanzaError(const XmlElement * element_original, return XMPP_RETURN_BADSTATE; XmlElement error_element(element_original->Name()); - error_element.AddAttr(QN_TYPE, "error"); + error_element.AddAttr(TQN_TYPE, "error"); // copy attrs, copy 'from' to 'to' and strip 'from' for (const XmlAttr * attribute = element_original->FirstAttr(); attribute; attribute = attribute->NextAttr()) { - QName name = attribute->Name(); - if (name == QN_TO) + TQName name = attribute->Name(); + if (name == TQN_TO) continue; // no need to put a from attr. Server will stamp stanza - else if (name == QN_FROM) - name = QN_TO; - else if (name == QN_TYPE) + else if (name == TQN_FROM) + name = TQN_TO; + else if (name == TQN_TYPE) continue; error_element.AddAttr(name, attribute->Value()); } - // copy children + // copy tqchildren for (const XmlChild * child = element_original->FirstChild(); child; child = child->NextChild()) { @@ -237,7 +237,7 @@ XmppEngineImpl::SendStanzaError(const XmlElement * element_original, // add error information AddErrorCode(&error_element, code); if (text != STR_EMPTY) { - XmlElement * text_element = new XmlElement(QN_STANZA_TEXT, true); + XmlElement * text_element = new XmlElement(TQN_STANZA_TEXT, true); text_element->AddText(text); error_element.AddElement(text_element); } @@ -252,15 +252,15 @@ bool XmppEngineImpl::HandleIqResponse(const XmlElement * element) { if (iq_entries_->empty()) return false; - if (element->Name() != QN_IQ) + if (element->Name() != TQN_IQ) return false; - std::string type = element->Attr(QN_TYPE); + std::string type = element->Attr(TQN_TYPE); if (type != "result" && type != "error") return false; - if (!element->HasAttr(QN_ID)) + if (!element->HasAttr(TQN_ID)) return false; - std::string id = element->Attr(QN_ID); - std::string from = element->Attr(QN_FROM); + std::string id = element->Attr(TQN_ID); + std::string from = element->Attr(TQN_FROM); for (std::vector::iterator it = iq_entries_->begin(); it != iq_entries_->end(); it += 1) { diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpplogintask.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpplogintask.cc index 470c2dc2..9b3fe9bc 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpplogintask.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpplogintask.cc @@ -127,11 +127,11 @@ XmppLoginTask::Advance() { } case LOGINSTATE_TLS_INIT: { - const XmlElement * pelTls = GetFeature(QN_TLS_STARTTLS); + const XmlElement * pelTls = GetFeature(TQN_TLS_STARTTLS); if (!pelTls) return Failure(XmppEngine::ERROR_TLS); - XmlElement el(QN_TLS_STARTTLS, true); + XmlElement el(TQN_TLS_STARTTLS, true); pctx_->InternalSendStanza(&el); state_ = LOGINSTATE_TLS_REQUESTED; continue; @@ -140,7 +140,7 @@ XmppLoginTask::Advance() { case LOGINSTATE_TLS_REQUESTED: { if (NULL == (element = NextStanza())) return true; - if (element->Name() != QN_TLS_PROCEED) + if (element->Name() != TQN_TLS_PROCEED) return Failure(XmppEngine::ERROR_TLS); // The proper domain to verify against is the real underlying @@ -155,7 +155,7 @@ XmppLoginTask::Advance() { } case LOGINSTATE_AUTH_INIT: { - const XmlElement * pelSaslAuth = GetFeature(QN_SASL_MECHANISMS); + const XmlElement * pelSaslAuth = GetFeature(TQN_SASL_MECHANISMS); if (!pelSaslAuth) { return Failure(XmppEngine::ERROR_AUTH); } @@ -163,9 +163,9 @@ XmppLoginTask::Advance() { // Collect together the SASL auth mechanisms presented by the server std::vector mechanisms; for (const XmlElement * pelMech = - pelSaslAuth->FirstNamed(QN_SASL_MECHANISM); + pelSaslAuth->FirstNamed(TQN_SASL_MECHANISM); pelMech; - pelMech = pelMech->NextNamed(QN_SASL_MECHANISM)) { + pelMech = pelMech->NextNamed(TQN_SASL_MECHANISM)) { mechanisms.push_back(pelMech->BodyText()); } @@ -199,7 +199,7 @@ XmppLoginTask::Advance() { return true; if (element->Name().Namespace() != NS_SASL) return Failure(XmppEngine::ERROR_AUTH); - if (element->Name() == QN_SASL_CHALLENGE) { + if (element->Name() == TQN_SASL_CHALLENGE) { XmlElement * response = sasl_mech_->HandleSaslChallenge(element); if (response == NULL) { return Failure(XmppEngine::ERROR_AUTH); @@ -209,7 +209,7 @@ XmppLoginTask::Advance() { state_ = LOGINSTATE_SASL_RUNNING; continue; } - if (element->Name() != QN_SASL_SUCCESS) { + if (element->Name() != TQN_SASL_SUCCESS) { return Failure(XmppEngine::ERROR_UNAUTHORIZED); } @@ -220,20 +220,20 @@ XmppLoginTask::Advance() { } case LOGINSTATE_BIND_INIT: { - const XmlElement * pelBindFeature = GetFeature(QN_BIND_BIND); - const XmlElement * pelSessionFeature = GetFeature(QN_SESSION_SESSION); + const XmlElement * pelBindFeature = GetFeature(TQN_BIND_BIND); + const XmlElement * pelSessionFeature = GetFeature(TQN_SESSION_SESSION); if (!pelBindFeature || !pelSessionFeature) return Failure(XmppEngine::ERROR_BIND); - XmlElement iq(QN_IQ); - iq.AddAttr(QN_TYPE, "set"); + XmlElement iq(TQN_IQ); + iq.AddAttr(TQN_TYPE, "set"); iqId_ = pctx_->NextId(); - iq.AddAttr(QN_ID, iqId_); - iq.AddElement(new XmlElement(QN_BIND_BIND, true)); + iq.AddAttr(TQN_ID, iqId_); + iq.AddElement(new XmlElement(TQN_BIND_BIND, true)); if (pctx_->requested_resource_ != STR_EMPTY) { - iq.AddElement(new XmlElement(QN_BIND_RESOURCE), 1); + iq.AddElement(new XmlElement(TQN_BIND_RESOURCE), 1); iq.AddText(pctx_->requested_resource_, 2); } pctx_->InternalSendStanza(&iq); @@ -245,15 +245,15 @@ XmppLoginTask::Advance() { if (NULL == (element = NextStanza())) return true; - if (element->Name() != QN_IQ || element->Attr(QN_ID) != iqId_ || - element->Attr(QN_TYPE) == "get" || element->Attr(QN_TYPE) == "set") + if (element->Name() != TQN_IQ || element->Attr(TQN_ID) != iqId_ || + element->Attr(TQN_TYPE) == "get" || element->Attr(TQN_TYPE) == "set") return true; - if (element->Attr(QN_TYPE) != "result" || element->FirstElement() == NULL || - element->FirstElement()->Name() != QN_BIND_BIND) + if (element->Attr(TQN_TYPE) != "result" || element->FirstElement() == NULL || + element->FirstElement()->Name() != TQN_BIND_BIND) return Failure(XmppEngine::ERROR_BIND); - fullJid_ = Jid(element->FirstElement()->TextNamed(QN_BIND_JID)); + fullJid_ = Jid(element->FirstElement()->TextNamed(TQN_BIND_JID)); if (!fullJid_.IsFull()) { return Failure(XmppEngine::ERROR_BIND); } @@ -264,12 +264,12 @@ XmppLoginTask::Advance() { } // now request session - XmlElement iq(QN_IQ); - iq.AddAttr(QN_TYPE, "set"); + XmlElement iq(TQN_IQ); + iq.AddAttr(TQN_TYPE, "set"); iqId_ = pctx_->NextId(); - iq.AddAttr(QN_ID, iqId_); - iq.AddElement(new XmlElement(QN_SESSION_SESSION, true)); + iq.AddAttr(TQN_ID, iqId_); + iq.AddElement(new XmlElement(TQN_SESSION_SESSION, true)); pctx_->InternalSendStanza(&iq); state_ = LOGINSTATE_SESSION_REQUESTED; @@ -279,11 +279,11 @@ XmppLoginTask::Advance() { case LOGINSTATE_SESSION_REQUESTED: { if (NULL == (element = NextStanza())) return true; - if (element->Name() != QN_IQ || element->Attr(QN_ID) != iqId_ || - element->Attr(QN_TYPE) == "get" || element->Attr(QN_TYPE) == "set") + if (element->Name() != TQN_IQ || element->Attr(TQN_ID) != iqId_ || + element->Attr(TQN_TYPE) == "get" || element->Attr(TQN_TYPE) == "set") return false; - if (element->Attr(QN_TYPE) != "result") + if (element->Attr(TQN_TYPE) != "result") return Failure(XmppEngine::ERROR_BIND); pctx_->SignalBound(fullJid_); @@ -301,26 +301,26 @@ XmppLoginTask::Advance() { bool XmppLoginTask::HandleStartStream(const XmlElement *element) { - if (element->Name() != QN_STREAM_STREAM) + if (element->Name() != TQN_STREAM_STREAM) return false; - if (element->Attr(QN_XMLNS) != "jabber:client") + if (element->Attr(TQN_XMLNS) != "jabber:client") return false; - if (element->Attr(QN_VERSION) != "1.0") + if (element->Attr(TQN_VERSION) != "1.0") return false; - if (!element->HasAttr(QN_ID)) + if (!element->HasAttr(TQN_ID)) return false; - streamId_ = element->Attr(QN_ID); + streamId_ = element->Attr(TQN_ID); return true; } bool XmppLoginTask::HandleFeatures(const XmlElement *element) { - if (element->Name() != QN_STREAM_FEATURES) + if (element->Name() != TQN_STREAM_FEATURES) return false; pelFeatures_.reset(new XmlElement(*element)); @@ -328,7 +328,7 @@ XmppLoginTask::HandleFeatures(const XmlElement *element) { } const XmlElement * -XmppLoginTask::GetFeature(const QName & name) { +XmppLoginTask::GetFeature(const TQName & name) { return pelFeatures_->FirstNamed(name); } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpplogintask.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpplogintask.h index 7f321a30..18c70312 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpplogintask.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpplogintask.h @@ -71,7 +71,7 @@ private: bool Advance(); bool HandleStartStream(const XmlElement * element); bool HandleFeatures(const XmlElement * element); - const XmlElement * GetFeature(const QName & name); + const XmlElement * GetFeature(const TQName & name); bool Failure(XmppEngine::Error reason); void FlushQueuedStanzas(); diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc index 82207f3b..38ed1994 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc @@ -32,9 +32,9 @@ namespace buzz { -XmppTask::XmppTask(Task * parent, XmppEngine::HandlerLevel level) - : Task(parent), client_(NULL) { - XmppClient * client = (XmppClient*)parent->GetParent(XMPP_CLIENT_TASK_CODE); +XmppTask::XmppTask(Task * tqparent, XmppEngine::HandlerLevel level) + : Task(tqparent), client_(NULL) { + XmppClient * client = (XmppClient*)tqparent->GetParent(XMPP_CLIENT_TASK_CODE); client_ = client; id_ = client->NextId(); client->AddXmppTask(this, level); @@ -55,14 +55,14 @@ XmppTask::StopImpl() { } } -XmppReturnStatus +XmppReturntqStatus XmppTask::SendStanza(const XmlElement * stanza) { if (client_ == NULL) return XMPP_RETURN_BADSTATE; return client_->SendStanza(stanza); } -XmppReturnStatus +XmppReturntqStatus XmppTask::SendStanzaError(const XmlElement * element_original, XmppStanzaError code, const std::string & text) { @@ -102,37 +102,37 @@ XmppTask::NextStanza() { XmlElement * XmppTask::MakeIq(const std::string & type, const buzz::Jid & to, const std::string id) { - XmlElement * result = new XmlElement(QN_IQ); + XmlElement * result = new XmlElement(TQN_IQ); if (!type.empty()) - result->AddAttr(QN_TYPE, type); + result->AddAttr(TQN_TYPE, type); if (to != JID_EMPTY) - result->AddAttr(QN_TO, to.Str()); + result->AddAttr(TQN_TO, to.Str()); if (!id.empty()) - result->AddAttr(QN_ID, id); + result->AddAttr(TQN_ID, id); return result; } XmlElement * XmppTask::MakeIqResult(const XmlElement * query) { - XmlElement * result = new XmlElement(QN_IQ); - result->AddAttr(QN_TYPE, STR_RESULT); - if (query->HasAttr(QN_FROM)) { - result->AddAttr(QN_TO, query->Attr(QN_FROM)); + XmlElement * result = new XmlElement(TQN_IQ); + result->AddAttr(TQN_TYPE, STR_RESULT); + if (query->HasAttr(TQN_FROM)) { + result->AddAttr(TQN_TO, query->Attr(TQN_FROM)); } - result->AddAttr(QN_ID, query->Attr(QN_ID)); + result->AddAttr(TQN_ID, query->Attr(TQN_ID)); return result; } bool XmppTask::MatchResponseIq(const XmlElement * stanza, const Jid & to, const std::string & id) { - if (stanza->Name() != QN_IQ) + if (stanza->Name() != TQN_IQ) return false; - if (stanza->Attr(QN_ID) != id) + if (stanza->Attr(TQN_ID) != id) return false; - Jid from(stanza->Attr(QN_FROM)); + Jid from(stanza->Attr(TQN_FROM)); if (from != to) { Jid me = client_->jid(); // we address the server as "", but it is legal for the server @@ -152,11 +152,11 @@ XmppTask::MatchResponseIq(const XmlElement * stanza, bool XmppTask::MatchRequestIq(const XmlElement * stanza, - const std::string & type, const QName & qn) { - if (stanza->Name() != QN_IQ) + const std::string & type, const TQName & qn) { + if (stanza->Name() != TQN_IQ) return false; - if (stanza->Attr(QN_TYPE) != type) + if (stanza->Attr(TQN_TYPE) != type) return false; if (stanza->FirstNamed(qn) == NULL) diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.h index 3b56a1c9..d84019a2 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.h @@ -45,7 +45,7 @@ namespace buzz { // See Task and XmppClient first. // // XmppTask is a task that is designed to go underneath XmppClient and be -// useful there. It has a way of finding its XmppClient parent so you +// useful there. It has a way of finding its XmppClient tqparent so you // can have it nested arbitrarily deep under an XmppClient and it can // still find the XMPP services. // @@ -69,7 +69,7 @@ class XmppTask : public sigslot::has_slots<> { public: - XmppTask(Task * parent, XmppEngine::HandlerLevel level = XmppEngine::HL_NONE); + XmppTask(Task * tqparent, XmppEngine::HandlerLevel level = XmppEngine::HL_NONE); virtual ~XmppTask(); virtual XmppClient * GetClient() const { return client_; } @@ -78,9 +78,9 @@ public: protected: friend class XmppClient; - XmppReturnStatus SendStanza(const XmlElement * stanza); - XmppReturnStatus SetResult(const std::string & code); - XmppReturnStatus SendStanzaError(const XmlElement * element_original, + XmppReturntqStatus SendStanza(const XmlElement * stanza); + XmppReturntqStatus SetResult(const std::string & code); + XmppReturntqStatus SendStanzaError(const XmlElement * element_original, XmppStanzaError code, const std::string & text); @@ -93,7 +93,7 @@ protected: const XmlElement * NextStanza(); bool MatchResponseIq(const XmlElement * stanza, const Jid & to, const std::string & task_id); - bool MatchRequestIq(const XmlElement * stanza, const std::string & type, const QName & qn); + bool MatchRequestIq(const XmlElement * stanza, const std::string & type, const TQName & qn); XmlElement *MakeIqResult(const XmlElement * query); XmlElement *MakeIq(const std::string & type, const Jid & to, const std::string task_id); diff --git a/kopete/protocols/jabber/jingle/voicecaller.h b/kopete/protocols/jabber/jingle/voicecaller.h index 0f0d18bb..6907f09d 100644 --- a/kopete/protocols/jabber/jingle/voicecaller.h +++ b/kopete/protocols/jabber/jingle/voicecaller.h @@ -14,9 +14,10 @@ using namespace XMPP; /** * \brief An abstract class for a voice call implementation. */ -class VoiceCaller : public QObject +class VoiceCaller : public TQObject { Q_OBJECT + TQ_OBJECT public: /** -- cgit v1.2.1