summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/jingle/libjingle/talk/examples
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:49:40 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:49:40 -0600
commit808e453c56036211f57482ed847d54aca01bba68 (patch)
tree75515d5768dea10d4fbe4cd772e0a89c1c4b3aa9 /kopete/protocols/jabber/jingle/libjingle/talk/examples
parentcd9b9ed7fd0ac8a75106148254aa58e2e5c04863 (diff)
downloadtdenetwork-808e453c56036211f57482ed847d54aca01bba68.tar.gz
tdenetwork-808e453c56036211f57482ed847d54aca01bba68.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kopete/protocols/jabber/jingle/libjingle/talk/examples')
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.cc20
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/call/callclient.h6
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.cc24
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presenceouttask.h8
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.cc14
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/call/presencepushtask.h2
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/call/status.h26
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.cc2
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/examples/login/xmpppump.h2
9 files changed, 52 insertions, 52 deletions
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_;