Changeset View
Changeset View
Standalone View
Standalone View
plugins/htmlinterface/htmlinterfaceplugin.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2008 by Joris Guisson and Ivan Vasic * | ||||
3 | * joris.guisson@gmail.com * | ||||
4 | * ivasic@gmail.com * | ||||
5 | * * | ||||
6 | * Copyright (C) 2018 by Emmanuel Eytan * | ||||
7 | * eje211@gmail.com * | ||||
8 | * * | ||||
9 | * This program is free software; you can redistribute it and/or modify * | ||||
10 | * it under the terms of the GNU General Public License as published by * | ||||
11 | * the Free Software Foundation; either version 2 of the License, or * | ||||
12 | * (at your option) any later version. * | ||||
13 | * * | ||||
14 | * This program is distributed in the hope that it will be useful, * | ||||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||||
17 | * GNU General Public License for more details. * | ||||
18 | * * | ||||
19 | * You should have received a copy of the GNU General Public License * | ||||
20 | * along with this program; if not, write to the * | ||||
21 | * Free Software Foundation, Inc., * | ||||
22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | ||||
23 | ***************************************************************************/ | ||||
24 | | ||||
25 | #ifndef KTHTMLINTERFACEPLUGIN_H | ||||
26 | #define KTHTMLINTERFACEPLUGIN_H | ||||
27 | | ||||
28 | #include <util/ptrmap.h> | ||||
29 | #include <interfaces/torrentactivityinterface.h> | ||||
30 | #include <interfaces/plugin.h> | ||||
31 | #include <QtGlobal> | ||||
32 | #include "webserver.h" | ||||
33 | | ||||
34 | | ||||
35 | namespace kt | ||||
36 | { | ||||
37 | class HtmlInterfacePlugin: public Plugin, public ViewListener | ||||
38 | { | ||||
39 | Q_OBJECT | ||||
40 | public: | ||||
41 | HtmlInterfacePlugin(QObject* parent, const QVariantList& args); | ||||
42 | ~HtmlInterfacePlugin(); | ||||
43 | | ||||
44 | bool versionCheck(const QString& version) const override; | ||||
45 | void load() override; | ||||
46 | void unload() override; | ||||
47 | void currentTorrentChanged(bt::TorrentInterface* tc) override; | ||||
48 | | ||||
49 | HtmlInterfacePlugin * instance; | ||||
50 | | ||||
51 | private: | ||||
52 | QThread* thread; | ||||
53 | WebServer * ws; | ||||
54 | }; | ||||
55 | | ||||
56 | } | ||||
57 | | ||||
58 | #endif |