1 /* This file is part of the KDE project
3 Copyright (C) 2007 Manolo Valdes <nolis71cu@gmail.com>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
11 #ifndef SPEEDLIMITER_H
12 #define SPEEDLIMITER_H
16 #include <QtCore/QTime>
18 class KJobSpeedLimiter
;
21 * The KSpeedLimiter is designed to throtle the speed in kio jobs
28 KSpeedLimiter(unsigned long speed
);
31 void setSpeedLimit(unsigned long speed
);
32 unsigned long speedLimit();
34 void addJob(KJob
*job
);
37 unsigned long m_speedLimit
;
38 QList
<KJobSpeedLimiter
*> m_JobSpeedLimiters
;
42 class KJobSpeedLimiter
: public QObject
47 KJobSpeedLimiter(KJob
*job
, unsigned long speedLimit
);
53 void slotResult(KJob
*job
);
61 unsigned long m_speedLimit
;
62 unsigned long m_channelSpeed
;