Server methods to store/get options
[qtrapids] / src / server / TorrentSession.hpp
index 1baffac..4f56050 100644 (file)
@@ -16,6 +16,8 @@
 #include <libtorrent/alert_types.hpp>
 #include <libtorrent/error_code.hpp>
 
+#include <utility>
+
 class QSettings;
 
 namespace qtrapids
@@ -35,6 +37,7 @@ typedef libtorrent::libtorrent_exception torrent_exception_t;
 
 typedef QSharedPointer<TorrentHandle> TorrentHandlePtr;
 typedef QHash<QString, TorrentHandlePtr > torrents_t;
+typedef std::pair<int, int> ports_range_t;
 
 class ServerDb;
 class ServerSettings;
@@ -55,6 +58,8 @@ public slots:
        void addTorrent(const QString &path, const QString &save_path
                        , qtrapids::ParamsMap_t other_params);
        void removeTorrent(const QString &hash);
+       void setOptions(qtrapids::ParamsMap_t options);
+       qtrapids::ParamsMap_t getOptions();
 
 signals:
        void alert(qtrapids::TorrentState info, qtrapids::ParamsMap_t other_info);