diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 2fc07675a..1a953f406 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -1,6 +1,7 @@ find_package(ZLIB REQUIRED) set(QBT_BASE_HEADERS +bittorrent/addtorrentparams.h bittorrent/cachestatus.h bittorrent/infohash.h bittorrent/magneturi.h diff --git a/src/base/base.pri b/src/base/base.pri index 6289676cc..21a67f7b1 100644 --- a/src/base/base.pri +++ b/src/base/base.pri @@ -25,6 +25,7 @@ HEADERS += \ $$PWD/net/reverseresolution.h \ $$PWD/net/smtp.h \ $$PWD/net/private/geoipdatabase.h \ + $$PWD/bittorrent/addtorrentparams.h \ $$PWD/bittorrent/infohash.h \ $$PWD/bittorrent/session.h \ $$PWD/bittorrent/sessionstatus.h \ diff --git a/src/base/bittorrent/addtorrentparams.h b/src/base/bittorrent/addtorrentparams.h new file mode 100644 index 000000000..2f82303f9 --- /dev/null +++ b/src/base/bittorrent/addtorrentparams.h @@ -0,0 +1,52 @@ +/* + * Bittorrent Client using Qt and libtorrent. + * Copyright (C) 2015 Vladimir Golovnev + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * In addition, as a special exception, the copyright holders give permission to + * link this program with the OpenSSL project's "OpenSSL" library (or with + * modified versions of it that use the same license as the "OpenSSL" library), + * and distribute the linked executables. You must obey the GNU General Public + * License in all respects for all of the code used other than "OpenSSL". If you + * modify file(s), you may extend this exception to your version of the file(s), + * but you are not obligated to do so. If you do not wish to do so, delete this + * exception statement from your version. + */ + +#pragma once + +#include +#include + +#include "../tristatebool.h" + +namespace BitTorrent +{ + struct AddTorrentParams + { + QString name; + QString category; + QString savePath; + bool disableTempPath = false; // e.g. for imported torrents + bool sequential = false; + TriStateBool addForced; + TriStateBool addPaused; + QVector filePriorities; // used if TorrentInfo is set + bool ignoreShareRatio = false; + bool skipChecking = false; + TriStateBool createSubfolder; + }; +} diff --git a/src/base/bittorrent/session.h b/src/base/bittorrent/session.h index b65a70063..59aa2828b 100644 --- a/src/base/bittorrent/session.h +++ b/src/base/bittorrent/session.h @@ -49,6 +49,7 @@ #include "base/settingvalue.h" #include "base/tristatebool.h" #include "base/types.h" +#include "addtorrentparams.h" #include "torrentinfo.h" namespace libtorrent @@ -135,21 +136,6 @@ namespace BitTorrent class TrackerEntry; struct AddTorrentData; - struct AddTorrentParams - { - QString name; - QString category; - QString savePath; - bool disableTempPath = false; // e.g. for imported torrents - bool sequential = false; - TriStateBool addForced; - TriStateBool addPaused; - QVector filePriorities; // used if TorrentInfo is set - bool ignoreShareRatio = false; - bool skipChecking = false; - TriStateBool createSubfolder; - }; - struct TorrentStatusReport { uint nbDownloading = 0;