/***************************************************************************
- * Copyright (C) 2009 by Lassi Väätämöinen *
- * lassi.vaatamoinen@ixonos.com *
+ * Copyright (C) 2010 by Ixonos Plc *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
+ * the Free Software Foundation; version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
alertWaiter_->allAlerts();
connect(alertWaiter_, SIGNAL(alert(Alert const*)), this, SLOT(on_alert(Alert const*)));
alertWaiter_->start();
+
+ SessionSettings settings;
+ settings.ignore_limits_on_local_network = false;
+ btSession_.set_settings(settings);
+
}
}
+void QBittorrentSession::setUploadRateLimit(int rate)
+{
+ btSession_.set_upload_rate_limit(rate);
+}
+
+
+void QBittorrentSession::setDownloadRateLimit(int rate)
+{
+ btSession_.set_download_rate_limit(rate);
+}
+
+
+int QBittorrentSession::getUploadRateLimt() const
+{
+ return btSession_.upload_rate_limit();
+}
+
+
+int QBittorrentSession::getDownloadRateLimit() const
+{
+ return btSession_.download_rate_limit();
+}
+
+
+
+
+
// ========================== SLOTS ==============================
/// @TODO This function is called when AlertWaiterThread emits alert()
/// If connection is direct, as it is now, we need to use QMutex here (if necessary?)
{
#ifdef QTRAPIDS_DEBUG
- if (al)
- qDebug() << "on_alert():" << QString::fromStdString(al->message());
+ //if (al)
+ // qDebug() << "on_alert():" << QString::fromStdString(al->message());
#endif
std::auto_ptr<Alert> alertPtr = btSession_.pop_alert();