mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
- Prepare a little headlessloader class
This commit is contained in:
parent
3dc1107b40
commit
1923a51c59
3 changed files with 24 additions and 3 deletions
|
@ -33,13 +33,29 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <QCoreApplication>
|
||||
#include "preferences.h"
|
||||
#include "bittorrent.h"
|
||||
|
||||
class HeadlessLoader: QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
HeadlessLoader() {
|
||||
private:
|
||||
Bittorrent *BTSession;
|
||||
|
||||
public:
|
||||
HeadlessLoader(QStringList torrentCmdLine) {
|
||||
// Enable Web UI
|
||||
Preferences::setWebUiEnabled(true);
|
||||
// TODO: Listen on socket for parameters
|
||||
// Instanciate Bittorrent Object
|
||||
BTSession = new Bittorrent();
|
||||
// Resume unfinished torrents
|
||||
BTSession->startUpTorrents();
|
||||
// TODO: Process command line parameter
|
||||
}
|
||||
|
||||
~HeadlessLoader() {
|
||||
delete BTSession;
|
||||
}
|
||||
|
||||
public slots:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue