diff options
Diffstat (limited to 'kopete/protocols/jabber/jingle')
32 files changed, 187 insertions, 187 deletions
diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp index 4208e0d8..f6911a3b 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp @@ -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").tqarg(jid.full())); + qDebug(TQString("Removing unterminated call to %1").arg(jid.full())); voiceCaller_->removeCall(jid); emit voiceCaller_->terminated(jid); } @@ -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)").tqarg(state)); + qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").arg(state)); // Why is c_str() stuff needed to make it compile on OS X ? Jid jid(session->remote_address().c_str()); @@ -156,7 +156,7 @@ void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *sess } else if (state == cricket::Session::STATE_SENTMODIFY) { } else if (state == cricket::Session::STATE_RECEIVEDMODIFY) { - qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").tqarg(jid.full())); + qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); } else if (state == cricket::Session::STATE_SENTREJECT) { } else if (state == cricket::Session::STATE_RECEIVEDREJECT) { @@ -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").tqarg(jid)); + qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid)); if (jid.isEmpty()) { qWarning("jinglevoicecaller.cpp: Empty JID"); return; @@ -271,7 +271,7 @@ bool JingleVoiceCaller::calling(const Jid& jid) void JingleVoiceCaller::call(const Jid& jid) { - qDebug(TQString("jinglevoicecaller.cpp: Calling %1").tqarg(jid.full())); + qDebug(TQString("jinglevoicecaller.cpp: Calling %1").arg(jid.full())); cricket::Call *c = ((cricket::PhoneSessionClient*)(phone_client_))->CreateCall(); c->InitiateSession(buzz::Jid(jid.full().ascii())); phone_client_->SetFocus(c); @@ -299,7 +299,7 @@ void JingleVoiceCaller::reject(const Jid& j) void JingleVoiceCaller::terminate(const Jid& j) { - qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").tqarg(j.full())); + qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full())); cricket::Call* call = calls_[j.full()]; if (call != NULL) { call->Terminate(); @@ -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").tqarg(j.full())); + qDebug(TQString("JingleVoiceCaller: Removing call to %1").arg(j.full())); calls_.remove(j.full()); } @@ -363,7 +363,7 @@ void JingleVoiceCaller::receiveStanza(const TQString& stanza) // Spread the word if (ok) { - qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").tqarg(stanza)); + qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").arg(stanza)); buzz::XmlElement *e = buzz::XmlElement::ForStr(stanza.ascii()); phone_client_->OnIncomingStanza(e); } diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp index c5bc775d..daa0d7c0 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp @@ -115,7 +115,7 @@ public: {} else if (state == cricket::Session::STATE_RECEIVEDMODIFY) { - //qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").tqarg(jid.full())); + //qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); } else if (state == cricket::Session::STATE_SENTREJECT) {} diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp index a389730b..86fc606f 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp @@ -44,7 +44,7 @@ JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCall : JingleVoiceSessionDialogBase(parent, name), m_session(caller), m_peerJid(peerJid), m_sessionState(Incoming) { TQString contactJid = m_peerJid.full(); - setCaption( i18n("Voice session with %1").tqarg(contactJid) ); + setCaption( i18n("Voice session with %1").arg(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 ); } - labelSessiontqStatus->setText( i18n("Incoming Session...") ); + labelSessionStatus->setText( i18n("Incoming Session...") ); buttonAccept->setEnabled(true); buttonDecline->setEnabled(true); } @@ -95,7 +95,7 @@ void JingleVoiceSessionDialog::setContactInformation(JabberContact *contact) void JingleVoiceSessionDialog::start() { - labelSessiontqStatus->setText( i18n("Waiting for other peer...") ); + labelSessionStatus->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() { - labelSessiontqStatus->setText( i18n("Session accepted.") ); + labelSessionStatus->setText( i18n("Session accepted.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(true); @@ -118,7 +118,7 @@ void JingleVoiceSessionDialog::slotAcceptClicked() void JingleVoiceSessionDialog::slotDeclineClicked() { - labelSessiontqStatus->setText( i18n("Session declined.") ); + labelSessionStatus->setText( i18n("Session declined.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(false); @@ -131,7 +131,7 @@ void JingleVoiceSessionDialog::slotDeclineClicked() void JingleVoiceSessionDialog::slotTerminateClicked() { - labelSessiontqStatus->setText( i18n("Session terminated.") ); + labelSessionStatus->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) ) { - labelSessiontqStatus->setText( i18n("Session in progress.") ); + labelSessionStatus->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) ) { - labelSessiontqStatus->setText( i18n("Session accepted.") ); + labelSessionStatus->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) ) { - labelSessiontqStatus->setText( i18n("Session declined.") ); + labelSessionStatus->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) ) { - labelSessiontqStatus->setText( i18n("Session terminated.") ); + labelSessionStatus->setText( i18n("Session terminated.") ); buttonAccept->setEnabled(false); buttonDecline->setEnabled(false); buttonTerminate->setEnabled(false); diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialogbase.ui b/kopete/protocols/jabber/jingle/jinglevoicesessiondialogbase.ui index 72e3827c..bea1ac4e 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialogbase.ui +++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialogbase.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout8</cstring> + <cstring>layout8</cstring> </property> <vbox> <property name="name"> @@ -29,7 +29,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <hbox> <property name="name"> @@ -45,7 +45,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>16</width> <height>20</height> @@ -70,7 +70,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> @@ -81,7 +81,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout4</cstring> + <cstring>layout4</cstring> </property> <hbox> <property name="name"> @@ -97,7 +97,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>16</width> <height>20</height> @@ -116,7 +116,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>128</width> <height>128</height> @@ -136,7 +136,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>16</width> <height>20</height> @@ -147,7 +147,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout7</cstring> + <cstring>layout7</cstring> </property> <hbox> <property name="name"> @@ -163,7 +163,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> @@ -188,7 +188,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> @@ -209,7 +209,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> @@ -232,7 +232,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout1</cstring> + <cstring>layout1</cstring> </property> <hbox> <property name="name"> @@ -248,7 +248,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> @@ -298,7 +298,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> @@ -309,7 +309,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout3</cstring> + <cstring>layout3</cstring> </property> <hbox> <property name="name"> @@ -325,7 +325,7 @@ </widget> <widget class="TQLabel"> <property name="name"> - <cstring>labelSessiontqStatus</cstring> + <cstring>labelSessionStatus</cstring> </property> <property name="sizePolicy"> <sizepolicy> @@ -351,7 +351,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/task.cc b/kopete/protocols/jabber/jingle/libjingle/talk/base/task.cc index 6d85cb0d..a5a94941 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/base/task.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/base/task.cc @@ -194,12 +194,12 @@ int Task::Process(int state) { void Task::AddChild(Task * child) { - tqchildren_.insert(child); + children_.insert(child); } bool Task::AllChildrenDone() { - for (ChildSet::iterator it = tqchildren_.begin(); it != tqchildren_.end(); ++it) { + for (ChildSet::iterator it = children_.begin(); it != children_.end(); ++it) { if (!(*it)->IsDone()) return false; } @@ -213,8 +213,8 @@ Task::AnyChildError() { void Task::AbortAllChildren() { - if (tqchildren_.size() > 0) { - ChildSet copy = tqchildren_; + if (children_.size() > 0) { + ChildSet copy = children_; for (ChildSet::iterator it = copy.begin(); it != copy.end(); ++it) { (*it)->Abort(true); // Note we do not wake } @@ -231,7 +231,7 @@ void Task::OnChildStopped(Task * child) { if (child->HasError()) child_error_ = true; - tqchildren_.erase(child); + children_.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 7140b691..5a486198 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 tqchildren. If a parent -// task gets aborted, all the tqchildren tasks are too. The nice thing +// (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 // 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 tqchildren are aborted and get deleted. +// sure all those children are aborted and get deleted. // // Notice that Task has a few built-in states, e.g., // @@ -122,7 +122,7 @@ public: // Called from outside to stop task without any more callbacks void Abort(bool nowake = false); - // For managing tqchildren + // For managing children bool AllChildrenDone(); bool AnyChildError(); @@ -153,7 +153,7 @@ protected: virtual int ProcessStart() = 0; virtual int ProcessResponse() { return STATE_DONE; } - // for managing tqchildren (if any) + // for managing children (if any) void AddChild(Task * child); void AbortAllChildren(); @@ -172,9 +172,9 @@ private: bool child_error_; unsigned long long start_time_; - // for managing tqchildren + // for managing children typedef std::set<Task *> ChildSet; - ChildSet tqchildren_; + ChildSet children_; }; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/base/taskrunner.cc b/kopete/protocols/jabber/jingle/libjingle/talk/base/taskrunner.cc index 43728eb7..b5ecc55e 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 tqchildren silently! + // this kills and deletes children 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 40c1fbfe..6d818932 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* DescribetqStatus(buzz::tqStatus::Show show, const std::string& desc) { +const char* DescribeStatus(buzz::Status::Show show, const std::string& desc) { switch (show) { - 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"; + 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"; delault: return "offline"; } } @@ -320,11 +320,11 @@ void CallClient::InitPresence() { this, &CallClient::OnStatusUpdate); presence_push_->Start(); - buzz::tqStatus my_status; + buzz::Status my_status; my_status.set_jid(xmpp_client_->jid()); my_status.set_available(true); my_status.set_invisible(false); - my_status.set_show(buzz::tqStatus::SHOW_ONLINE); + my_status.set_show(buzz::Status::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::tqStatus& status) { +void CallClient::OnStatusUpdate(const buzz::Status& status) { RosterItem item; item.jid = status.jid(); item.show = status.show(); @@ -362,7 +362,7 @@ void CallClient::PrintRoster() { while (iter != roster_->end()) { Console()->Printf("%s - %s", iter->second.jid.BareJid().Str().c_str(), - DescribetqStatus(iter->second.show, iter->second.status)); + DescribeStatus(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 24ce1545..d35a6114 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 tqStatus; +class Status; } namespace cricket { @@ -43,7 +43,7 @@ class Call; struct RosterItem { buzz::Jid jid; - buzz::tqStatus::Show show; + buzz::Status::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::tqStatus& status); + void OnStatusUpdate(const buzz::Status& 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 7fd68120..a15a6c83 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.cc @@ -42,27 +42,27 @@ bool ToString(const T &t, return !oss.fail(); } -XmppReturntqStatus -PresenceOutTask::Send(const tqStatus & s) { +XmppReturnStatus +PresenceOutTask::Send(const Status & s) { if (GetState() != STATE_INIT) return XMPP_RETURN_BADSTATE; - stanza_.reset(TranslatetqStatus(s)); + stanza_.reset(TranslateStatus(s)); return XMPP_RETURN_OK; } -XmppReturntqStatus -PresenceOutTask::SendDirected(const Jid & j, const tqStatus & s) { +XmppReturnStatus +PresenceOutTask::SendDirected(const Jid & j, const Status & s) { if (GetState() != STATE_INIT) return XMPP_RETURN_BADSTATE; - XmlElement * presence = TranslatetqStatus(s); + XmlElement * presence = TranslateStatus(s); presence->AddAttr(TQN_TO, j.Str()); stanza_.reset(presence); return XMPP_RETURN_OK; } -XmppReturntqStatus PresenceOutTask::SendProbe(const Jid & jid) { +XmppReturnStatus PresenceOutTask::SendProbe(const Jid & jid) { if (GetState() != STATE_INIT) return XMPP_RETURN_BADSTATE; @@ -82,7 +82,7 @@ PresenceOutTask::ProcessStart() { } XmlElement * -PresenceOutTask::TranslatetqStatus(const tqStatus & s) { +PresenceOutTask::TranslateStatus(const Status & s) { XmlElement * result = new XmlElement(TQN_PRESENCE); if (!s.available()) { result->AddAttr(TQN_TYPE, STR_UNAVAILABLE); @@ -92,19 +92,19 @@ PresenceOutTask::TranslatetqStatus(const tqStatus & s) { result->AddAttr(TQN_TYPE, STR_INVISIBLE); } - if (s.show() != tqStatus::SHOW_ONLINE && s.show() != tqStatus::SHOW_OFFLINE) { + if (s.show() != Status::SHOW_ONLINE && s.show() != Status::SHOW_OFFLINE) { result->AddElement(new XmlElement(TQN_SHOW)); switch (s.show()) { default: result->AddText(STR_SHOW_AWAY, 1); break; - case tqStatus::SHOW_XA: + case Status::SHOW_XA: result->AddText(STR_SHOW_XA, 1); break; - case tqStatus::SHOW_DND: + case Status::SHOW_DND: result->AddText(STR_SHOW_DND, 1); break; - case tqStatus::SHOW_CHAT: + case Status::SHOW_CHAT: result->AddText(STR_SHOW_CHAT, 1); break; } 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 47660514..2b65a553 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.h @@ -31,13 +31,13 @@ public: PresenceOutTask(Task * parent) : XmppTask(parent) {} virtual ~PresenceOutTask() {} - XmppReturntqStatus Send(const tqStatus & s); - XmppReturntqStatus SendDirected(const Jid & j, const tqStatus & s); - XmppReturntqStatus SendProbe(const Jid& jid); + XmppReturnStatus Send(const Status & s); + XmppReturnStatus SendDirected(const Jid & j, const Status & s); + XmppReturnStatus SendProbe(const Jid& jid); virtual int ProcessStart(); private: - XmlElement * TranslatetqStatus(const tqStatus & s); + XmlElement * TranslateStatus(const Status & s); scoped_ptr<XmlElement> 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 cee7058a..31d1ae77 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.cc @@ -77,7 +77,7 @@ PresencePushTask::ProcessStart() { const XmlElement * stanza = NextStanza(); if (stanza == NULL) return STATE_BLOCKED; - tqStatus s; + Status s; s.set_jid(Jid(stanza->Attr(TQN_FROM))); @@ -114,23 +114,23 @@ PresencePushTask::ProcessStart() { const XmlElement * show = stanza->FirstNamed(TQN_SHOW); if (show == NULL || show->FirstChild() == NULL) { - s.set_show(tqStatus::SHOW_ONLINE); + s.set_show(Status::SHOW_ONLINE); } else { if (show->BodyText() == "away") { - s.set_show(tqStatus::SHOW_AWAY); + s.set_show(Status::SHOW_AWAY); } else if (show->BodyText() == "xa") { - s.set_show(tqStatus::SHOW_XA); + s.set_show(Status::SHOW_XA); } else if (show->BodyText() == "dnd") { - s.set_show(tqStatus::SHOW_DND); + s.set_show(Status::SHOW_DND); } else if (show->BodyText() == "chat") { - s.set_show(tqStatus::SHOW_CHAT); + s.set_show(Status::SHOW_CHAT); } else { - s.set_show(tqStatus::SHOW_ONLINE); + s.set_show(Status::SHOW_ONLINE); } } 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 06c68015..77459647 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.h @@ -32,7 +32,7 @@ class PresencePushTask : public XmppTask { public: PresencePushTask(Task * parent) : XmppTask(parent, XmppEngine::HL_TYPE) {} virtual int ProcessStart(); - sigslot::signal1<const tqStatus &>SignalStatusUpdate; + sigslot::signal1<const Status &>SignalStatusUpdate; 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 264ed725..cab9312f 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 tqStatus { +class Status { public: - tqStatus() : + Status() : pri_(0), show_(SHOW_NONE), available_(false), @@ -39,7 +39,7 @@ public: is_google_client_(false), feedback_probation_(false) {}; - ~tqStatus() {} + ~Status() {} // 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 tqStatus & new_value) { + void UpdateWith(const Status & new_value) { if (!new_value.know_capabilities()) { bool k = know_capabilities(); bool i = is_google_client(); @@ -105,15 +105,15 @@ public: } } - bool HasQuiettqStatus() const { + bool HasQuietStatus() const { if (status_.empty()) return false; - return !(QuiettqStatus().empty()); + return !(QuietStatus().empty()); } // Knowledge of other clients' silly automatic status strings - // Don't show these. - std::string QuiettqStatus() const { + std::string QuietStatus() const { if (jid_.resource().find("Psi") != std::string::npos) { if (status_ == "Online" || status_.find("Auto Status") != std::string::npos) @@ -123,18 +123,18 @@ public: if (status_ == "Sorry, I ran out for a bit!") return STR_EMPTY; } - return TrimtqStatus(status_); + return TrimStatus(status_); } - std::string ExplicittqStatus() const { - std::string result = QuiettqStatus(); + std::string ExplicitStatus() const { + std::string result = QuietStatus(); if (result.empty()) { - result = ShowtqStatus(); + result = ShowStatus(); } return result; } - std::string ShowtqStatus() const { + std::string ShowStatus() const { std::string result; if (!available()) { result = "Offline"; @@ -159,7 +159,7 @@ public: return result; } - static std::string TrimtqStatus(const std::string & st) { + static std::string TrimStatus(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/xmpppump.cc b/kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.cc index 40e694e2..7d966fb3 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::XmppReturntqStatus XmppPump::SendStanza(const buzz::XmlElement *stanza) { +buzz::XmppReturnStatus 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 0314b2fd..fd6f88bb 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::XmppReturntqStatus SendStanza(const buzz::XmlElement *stanza); + buzz::XmppReturnStatus SendStanza(const buzz::XmlElement *stanza); private: buzz::XmppClient *client_; 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 8456a90f..f3244c54 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::SetPtqlayout(bool ptqlayout) { - play_ = ptqlayout; +void LinphoneMediaChannel::SetPlayout(bool playout) { + play_ = playout; } 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 2639c7ac..0c00be75 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 SetPtqlayout(bool ptqlayout); + virtual void SetPlayout(bool playout); 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 4a2e4560..db2f9654 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 SetPtqlayout(bool ptqlayout) = 0; + virtual void SetPlayout(bool playout) = 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/portaudiomediaengine.cc b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.cc index 90092283..24036b02 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/session/phone/portaudiomediaengine.cc @@ -126,12 +126,12 @@ void PortAudioMediaChannel::OnPacketReceived(const void *data, int len) } } -void PortAudioMediaChannel::SetPtqlayout(bool ptqlayout) +void PortAudioMediaChannel::SetPlayout(bool playout) { if (!stream_) return; - if (play_ && !ptqlayout) { + if (play_ && !playout) { 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::SetPtqlayout(bool ptqlayout) } play_ = false; } - else if (!play_ && ptqlayout) { + else if (!play_ && playout) { 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 89922e77..95c39a1a 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 SetPtqlayout(bool ptqlayout); + virtual void SetPlayout(bool playout); 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 c55ef287..58e1db60 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_->SetPtqlayout(false); + channel_->SetPlayout(false); channel_->SetSend(false); } else { if (muted_) { channel_->SetSend(false); - channel_->SetPtqlayout(true); + channel_->SetPlayout(true); } else { channel_->SetSend(true); - channel_->SetPtqlayout(true); + channel_->SetPlayout(true); } } } diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc index a021f67a..08ccd288 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc @@ -109,7 +109,7 @@ XmlElement::XmlElement(const XmlElement & elt) : } pLastAttr_ = newAttr; - // copy tqchildren + // copy children XmlChild * pChild; XmlChild ** ppLast = &pFirstChild_; XmlChild * newChild = NULL; diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc index 8e36ac02..e0d2c006 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc @@ -123,7 +123,7 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) { i += 2; } - // now the tqchildren + // now the children const XmlChild * pchild = element->FirstChild(); if (pchild == NULL) diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.cc index fa6a14a6..959b6f88 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(); }; -XmppReturntqStatus +XmppReturnStatus 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; } -XmppReturntqStatus +XmppReturnStatus XmppClient::Disconnect() { if (d_->socket_.get() == NULL) return XMPP_RETURN_BADSTATE; @@ -263,17 +263,17 @@ XmppClient::NextId() { return d_->engine_->NextId(); } -XmppReturntqStatus +XmppReturnStatus XmppClient::SendStanza(const XmlElement * stanza) { return d_->engine_->SendStanza(stanza); } -XmppReturntqStatus +XmppReturnStatus XmppClient::SendStanzaError(const XmlElement * old_stanza, XmppStanzaError xse, const std::string & message) { return d_->engine_->SendStanzaError(old_stanza, xse, message); } -XmppReturntqStatus +XmppReturnStatus 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 fd65c39c..f8b4798c 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppclient.h @@ -74,14 +74,14 @@ public: XmppClient(Task * parent); ~XmppClient(); - XmppReturntqStatus Connect(const XmppClientSettings & settings, + XmppReturnStatus Connect(const XmppClientSettings & settings, AsyncSocket * socket, PreXmppAuth * preauth); virtual Task * GetParent(int code); virtual int ProcessStart(); virtual int ProcessResponse(); - XmppReturntqStatus Disconnect(); + XmppReturnStatus Disconnect(); const Jid & jid(); sigslot::signal1<XmppEngine::State> SignalStateChange; @@ -97,9 +97,9 @@ public: std::string GetAuthCookie(); std::string NextId(); - XmppReturntqStatus SendStanza(const XmlElement *stanza); - XmppReturntqStatus SendRaw(const std::string & text); - XmppReturntqStatus SendStanzaError(const XmlElement * pelOriginal, + XmppReturnStatus SendStanza(const XmlElement *stanza); + XmppReturnStatus SendRaw(const std::string & text); + XmppReturnStatus 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 58576328..1497c3ec 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengine.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengine.h @@ -66,9 +66,9 @@ enum XmppStanzaError { XSE_UNEXPECTED_REQUEST, }; -// XmppReturntqStatus +// XmppReturnStatus // This is used by API functions to synchronously return status. -enum XmppReturntqStatus { +enum XmppReturnStatus { 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 XmppReturntqStatus SetOutputHandler(XmppOutputHandler *pxoh) = 0; + virtual XmppReturnStatus SetOutputHandler(XmppOutputHandler *pxoh) = 0; //! Provides socket input to the engine - virtual XmppReturntqStatus HandleInput(const char * bytes, size_t len) = 0; + virtual XmppReturnStatus HandleInput(const char * bytes, size_t len) = 0; //! Advises the engine that the socket has closed - virtual XmppReturntqStatus ConnectionClosed() = 0; + virtual XmppReturnStatus ConnectionClosed() = 0; // SESSION SETUP --------------------------------------------------------- //! Indicates the (bare) JID for the user to use. - virtual XmppReturntqStatus SetUser(const Jid & jid)= 0; + virtual XmppReturnStatus 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 XmppReturntqStatus SetSaslHandler(SaslHandler * h) = 0; + virtual XmppReturnStatus SetSaslHandler(SaslHandler * h) = 0; //! Sets whether TLS will be used within the connection (default true). - virtual XmppReturntqStatus SetUseTls(bool useTls) = 0; + virtual XmppReturnStatus 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 XmppReturntqStatus SetTlsServerDomain(const std::string & proxy_domain) = 0; + virtual XmppReturnStatus 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 XmppReturntqStatus SetRequestedResource(const std::string& resource) = 0; + virtual XmppReturnStatus 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 XmppReturntqStatus SetSessionHandler(XmppSessionHandler* handler) = 0; + virtual XmppReturnStatus 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 XmppReturntqStatus Connect() = 0; + virtual XmppReturnStatus 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 XmppReturntqStatus Disconnect() = 0; + virtual XmppReturnStatus 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 XmppReturntqStatus AddStanzaHandler(XmppStanzaHandler* handler, HandlerLevel level = HL_PEEK) = 0; + virtual XmppReturnStatus AddStanzaHandler(XmppStanzaHandler* handler, HandlerLevel level = HL_PEEK) = 0; //! Removes a listener for session events. - virtual XmppReturntqStatus RemoveStanzaHandler(XmppStanzaHandler* handler) = 0; + virtual XmppReturnStatus RemoveStanzaHandler(XmppStanzaHandler* handler) = 0; //! Sends a stanza to the server. - virtual XmppReturntqStatus SendStanza(const XmlElement * pelStanza) = 0; + virtual XmppReturnStatus SendStanza(const XmlElement * pelStanza) = 0; //! Sends raw text to the server - virtual XmppReturntqStatus SendRaw(const std::string & text) = 0; + virtual XmppReturnStatus 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 XmppReturntqStatus SendIq(const XmlElement* pelStanza, + virtual XmppReturnStatus 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 XmppReturntqStatus RemoveIqHandler(XmppIqCookie cookie, + virtual XmppReturnStatus 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 XmppReturntqStatus SendStanzaError(const XmlElement * pelOriginal, + virtual XmppReturnStatus 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 c9569524..3d363a78 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(); } -XmppReturntqStatus +XmppReturnStatus 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; } -XmppReturntqStatus +XmppReturnStatus 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; } -XmppReturntqStatus +XmppReturnStatus 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; } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::ConnectionClosed() { if (state_ != STATE_CLOSED) { EnterExit ee(this); @@ -128,7 +128,7 @@ XmppEngineImpl::ConnectionClosed() { return XMPP_RETURN_OK; } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::SetUseTls(bool useTls) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -138,7 +138,7 @@ XmppEngineImpl::SetUseTls(bool useTls) { return XMPP_RETURN_OK; } -XmppReturntqStatus +XmppReturnStatus 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_; } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::SetUser(const Jid & jid) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -168,7 +168,7 @@ XmppEngineImpl::GetUser() { return user_jid_; } -XmppReturntqStatus +XmppReturnStatus 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; } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::SetRequestedResource(const std::string & resource) { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -192,7 +192,7 @@ XmppEngineImpl::GetRequestedResource() { return requested_resource_; } -XmppReturntqStatus +XmppReturnStatus 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; } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::RemoveStanzaHandler(XmppStanzaHandler * stanza_handler) { bool found = false; @@ -227,7 +227,7 @@ XmppEngineImpl::RemoveStanzaHandler(XmppStanzaHandler * stanza_handler) { return XMPP_RETURN_OK; } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::Connect() { if (state_ != STATE_START) return XMPP_RETURN_BADSTATE; @@ -245,7 +245,7 @@ XmppEngineImpl::Connect() { return XMPP_RETURN_OK; } -XmppReturntqStatus +XmppReturnStatus 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; } -XmppReturntqStatus +XmppReturnStatus 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(); } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::Disconnect() { if (state_ != STATE_CLOSED) { diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl.h index 6011d9e8..c36f168c 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 XmppReturntqStatus SetOutputHandler(XmppOutputHandler *pxoh); + virtual XmppReturnStatus SetOutputHandler(XmppOutputHandler *pxoh); //! Provides socket input to the engine - virtual XmppReturntqStatus HandleInput(const char * bytes, size_t len); + virtual XmppReturnStatus HandleInput(const char * bytes, size_t len); //! Advises the engine that the socket has closed - virtual XmppReturntqStatus ConnectionClosed(); + virtual XmppReturnStatus ConnectionClosed(); // SESSION SETUP --------------------------------------------------------- //! Indicates the (bare) JID for the user to use. - virtual XmppReturntqStatus SetUser(const Jid & jid); + virtual XmppReturnStatus SetUser(const Jid & jid); //! Get the login (bare) JID. virtual const Jid & GetUser(); //! Indicates the autentication to use. Takes ownership of the object. - virtual XmppReturntqStatus SetSaslHandler(SaslHandler * sasl_handler); + virtual XmppReturnStatus SetSaslHandler(SaslHandler * sasl_handler); //! Sets whether TLS will be used within the connection (default true). - virtual XmppReturntqStatus SetUseTls(bool useTls); + virtual XmppReturnStatus 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 XmppReturntqStatus SetTlsServerDomain(const std::string & proxy_domain); + virtual XmppReturnStatus 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 XmppReturntqStatus SetRequestedResource(const std::string& resource); + virtual XmppReturnStatus 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 XmppReturntqStatus SetSessionHandler(XmppSessionHandler* handler); + virtual XmppReturnStatus SetSessionHandler(XmppSessionHandler* handler); //! Initiates the XMPP connection. //! After supplying connection settings, call this once to initiate, //! (optionally) encrypt, authenticate, and bind the connection. - virtual XmppReturntqStatus Connect(); + virtual XmppReturnStatus 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 XmppReturntqStatus Disconnect(); + virtual XmppReturnStatus 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 XmppReturntqStatus AddStanzaHandler(XmppStanzaHandler* handler, + virtual XmppReturnStatus AddStanzaHandler(XmppStanzaHandler* handler, XmppEngine::HandlerLevel level); //! Removes a listener for session events. - virtual XmppReturntqStatus RemoveStanzaHandler(XmppStanzaHandler* handler); + virtual XmppReturnStatus RemoveStanzaHandler(XmppStanzaHandler* handler); //! Sends a stanza to the server. - virtual XmppReturntqStatus SendStanza(const XmlElement * pelStanza); + virtual XmppReturnStatus SendStanza(const XmlElement * pelStanza); //! Sends raw text to the server - virtual XmppReturntqStatus SendRaw(const std::string & text); + virtual XmppReturnStatus 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 XmppReturntqStatus SendIq(const XmlElement* pelStanza, + virtual XmppReturnStatus 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 XmppReturntqStatus RemoveIqHandler(XmppIqCookie cookie, + virtual XmppReturnStatus 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 XmppReturntqStatus SendStanzaError(const XmlElement * pelOriginal, + virtual XmppReturnStatus 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 38f268b9..cdcfa9e7 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl_iq.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmppengineimpl_iq.cc @@ -54,7 +54,7 @@ private: }; -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::SendIq(const XmlElement * element, XmppIqHandler * iq_handler, XmppIqCookie* cookie) { if (state_ == STATE_CLOSED) @@ -85,7 +85,7 @@ XmppEngineImpl::SendIq(const XmlElement * element, XmppIqHandler * iq_handler, } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::RemoveIqHandler(XmppIqCookie cookie, XmppIqHandler ** iq_handler) { @@ -199,7 +199,7 @@ AddErrorCode(XmlElement * error_element, XmppStanzaError code) { } -XmppReturntqStatus +XmppReturnStatus XmppEngineImpl::SendStanzaError(const XmlElement * element_original, XmppStanzaError code, const std::string & text) { @@ -223,7 +223,7 @@ XmppEngineImpl::SendStanzaError(const XmlElement * element_original, error_element.AddAttr(name, attribute->Value()); } - // copy tqchildren + // copy children for (const XmlChild * child = element_original->FirstChild(); child; child = child->NextChild()) { diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc index e7ac0e04..c9d86ba6 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc @@ -55,14 +55,14 @@ XmppTask::StopImpl() { } } -XmppReturntqStatus +XmppReturnStatus XmppTask::SendStanza(const XmlElement * stanza) { if (client_ == NULL) return XMPP_RETURN_BADSTATE; return client_->SendStanza(stanza); } -XmppReturntqStatus +XmppReturnStatus XmppTask::SendStanzaError(const XmlElement * element_original, XmppStanzaError code, const std::string & text) { diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.h index a1ed3dd3..0bd7c4b8 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.h +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.h @@ -78,9 +78,9 @@ public: protected: friend class XmppClient; - XmppReturntqStatus SendStanza(const XmlElement * stanza); - XmppReturntqStatus SetResult(const std::string & code); - XmppReturntqStatus SendStanzaError(const XmlElement * element_original, + XmppReturnStatus SendStanza(const XmlElement * stanza); + XmppReturnStatus SetResult(const std::string & code); + XmppReturnStatus SendStanzaError(const XmlElement * element_original, XmppStanzaError code, const std::string & text); |