diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/ioLAG.cpp | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/ioLAG.cpp')
-rw-r--r-- | ksirc/ioLAG.cpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/ksirc/ioLAG.cpp b/ksirc/ioLAG.cpp new file mode 100644 index 00000000..50f3f082 --- /dev/null +++ b/ksirc/ioLAG.cpp @@ -0,0 +1,61 @@ +/********************************************************************** + + The IO LAG Controller + + $$Id$$ + +**********************************************************************/ + +#include "ioLAG.h" +#include "control_message.h" +#include "ksircprocess.h" + +#include <kdebug.h> + +KSircIOLAG::KSircIOLAG(KSircProcess *_proc) + : QObject(), + KSircMessageReceiver(_proc) +{ + proc = _proc; + setBroadcast(FALSE); + startTimer(30000); +// startTimer(5000); +//(proc->getWindowList())["!all"]->control_message(SET_LAG, "99"); +} + + +KSircIOLAG::~KSircIOLAG() +{ + killTimers(); +} + +void KSircIOLAG::sirc_receive(QCString str, bool) +{ + + if(str.contains("*L*")){ + int s1, s2; + s1 = str.find("*L* ") + 4; + s2 = str.length(); + if(s1 < 0 || s2 < 0){ + kdDebug(5008) << "Lag mesage broken: " << str << endl; + return; + } + QString lag = str.mid(s1, s2 - s1); + // cerr << "Lag: " << str << endl; + // cerr << "Setting lag to: " << lag << endl; + (proc->getWindowList())["!all"]->control_message(SET_LAG, lag); + } + +} + +void KSircIOLAG::control_message(int, QString) +{ +} + +void KSircIOLAG::timerEvent ( QTimerEvent * ) +{ + QCString cmd = "/lag\n"; + emit outputLine(cmd); +} + +#include "ioLAG.moc" |