|
|
@ -49,6 +49,7 @@ class HeadlessLoader: QObject { |
|
|
|
// TODO: Listen on socket for parameters
|
|
|
|
// TODO: Listen on socket for parameters
|
|
|
|
// Instanciate Bittorrent Object
|
|
|
|
// Instanciate Bittorrent Object
|
|
|
|
BTSession = new Bittorrent(); |
|
|
|
BTSession = new Bittorrent(); |
|
|
|
|
|
|
|
connect(BTSession, SIGNAL(newConsoleMessage(QString)), this, SLOT(displayConsoleMessage(QString))); |
|
|
|
// Resume unfinished torrents
|
|
|
|
// Resume unfinished torrents
|
|
|
|
BTSession->startUpTorrents(); |
|
|
|
BTSession->startUpTorrents(); |
|
|
|
// TODO: Process command line parameter
|
|
|
|
// TODO: Process command line parameter
|
|
|
@ -64,6 +65,10 @@ class HeadlessLoader: QObject { |
|
|
|
void exit() { |
|
|
|
void exit() { |
|
|
|
qApp->quit(); |
|
|
|
qApp->quit(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void displayConsoleMessage(QString msg) { |
|
|
|
|
|
|
|
std::cout << msg.toLocal8Bit().data() << std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|