diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/jabber/jingle/libjingle/talk/base | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
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
Diffstat (limited to 'kopete/protocols/jabber/jingle/libjingle/talk/base')
12 files changed, 56 insertions, 56 deletions
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<MessageQueue *>::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<std::string,std::string> StrMap; @@ -261,7 +261,7 @@ void NetworkManager::GetNetworks(std::vector<Network*>& 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<unsigned long>( _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<Task *> 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(); } |