X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fengine%2FQBittorrentSession.h;fp=src%2Fengine%2FQBittorrentSession.h;h=82665b47287e6247cb3afcbcb7a4ab29b9c3a127;hb=b00c42d2b71e46b466d5796900f5bf5cb6017063;hp=19de9d79ce8362042ad8638a5021c40a24cdc4e8;hpb=afa034e0adbbeaf337e34671efd44f5e487c17ba;p=qtrapids diff --git a/src/engine/QBittorrentSession.h b/src/engine/QBittorrentSession.h index 19de9d7..82665b4 100644 --- a/src/engine/QBittorrentSession.h +++ b/src/engine/QBittorrentSession.h @@ -20,20 +20,44 @@ #ifndef QBITTORRENTSESSION_H #define QBITTORRENTSESSION_H +#include + +#include + +#include "QTorrentHandle.h" + + +// Forward declarations and typedefs +class AlertWaiterThread; +typedef libtorrent::session TorrentSession; +typedef libtorrent::add_torrent_params AddTorrentParams; +typedef libtorrent::alert TorrentAlert; + + /** @author Lassi Väätämöinen */ -class QBittorrentSession { - +class QBittorrentSession : public QObject { + Q_OBJECT +// class BitTorrentSession; + public: - QBittorrentSession(); - + QBittorrentSession(QObject *parent = 0); ~QBittorrentSession(); - public slots: + + /// @brief Add torrent to session. + QTorrentHandle addTorrent(AddTorrentParams const& params); + + signals: + void alert(TorrentAlert const *al); + private slots: + void on_alert(TorrentAlert const *al); + private: + TorrentSession btSession_; + AlertWaiterThread *alertWaiter_; - }; #endif