2 * Bittorrent Client using Qt and libtorrent.
3 * Copyright (C) 2015-2024 Vladimir Golovnev <glassez@yandex.ru>
4 * Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * In addition, as a special exception, the copyright holders give permission to
21 * link this program with the OpenSSL project's "OpenSSL" library (or with
22 * modified versions of it that use the same license as the "OpenSSL" library),
23 * and distribute the linked executables. You must obey the GNU General Public
24 * License in all respects for all of the code used other than "OpenSSL". If you
25 * modify file(s), you may extend this exception to your version of the file(s),
26 * but you are not obligated to do so. If you do not wish to do so, delete this
27 * exception statement from your version.
32 #include <QtContainerFwd>
35 #include "base/pathfwd.h"
36 #include "base/tagset.h"
37 #include "addtorrentparams.h"
38 #include "categoryoptions.h"
39 #include "sharelimitaction.h"
40 #include "trackerentry.h"
41 #include "trackerentrystatus.h"
55 class TorrentDescriptor
;
61 // Using `Q_ENUM_NS()` without a wrapper namespace in our case is not advised
62 // since `Q_NAMESPACE` cannot be used when the same namespace resides at different files.
63 // https://www.kdab.com/new-qt-5-8-meta-object-support-namespaces/#comment-143779
64 inline namespace SessionSettingsEnums
68 enum class BTProtocol
: int
76 enum class ChokingAlgorithm
: int
81 Q_ENUM_NS(ChokingAlgorithm
)
83 enum class DiskIOReadMode
: int
88 Q_ENUM_NS(DiskIOReadMode
)
90 enum class DiskIOType
: int
98 enum class DiskIOWriteMode
: int
102 #ifdef QBT_USES_LIBTORRENT2
106 Q_ENUM_NS(DiskIOWriteMode
)
108 enum class MixedModeAlgorithm
: int
113 Q_ENUM_NS(MixedModeAlgorithm
)
115 enum class SeedChokingAlgorithm
: int
121 Q_ENUM_NS(SeedChokingAlgorithm
)
123 enum class ResumeDataStorageType
128 Q_ENUM_NS(ResumeDataStorageType
)
131 class Session
: public QObject
134 Q_DISABLE_COPY_MOVE(Session
)
137 static void initInstance();
138 static void freeInstance();
139 static Session
*instance();
141 using QObject::QObject
;
143 virtual Path
savePath() const = 0;
144 virtual void setSavePath(const Path
&path
) = 0;
145 virtual Path
downloadPath() const = 0;
146 virtual void setDownloadPath(const Path
&path
) = 0;
147 virtual bool isDownloadPathEnabled() const = 0;
148 virtual void setDownloadPathEnabled(bool enabled
) = 0;
150 static bool isValidCategoryName(const QString
&name
);
151 static QString
subcategoryName(const QString
&category
);
152 static QString
parentCategoryName(const QString
&category
);
153 // returns category itself and all top level categories
154 static QStringList
expandCategory(const QString
&category
);
156 virtual QStringList
categories() const = 0;
157 virtual CategoryOptions
categoryOptions(const QString
&categoryName
) const = 0;
158 virtual Path
categorySavePath(const QString
&categoryName
) const = 0;
159 virtual Path
categorySavePath(const QString
&categoryName
, const CategoryOptions
&options
) const = 0;
160 virtual Path
categoryDownloadPath(const QString
&categoryName
) const = 0;
161 virtual Path
categoryDownloadPath(const QString
&categoryName
, const CategoryOptions
&options
) const = 0;
162 virtual bool addCategory(const QString
&name
, const CategoryOptions
&options
= {}) = 0;
163 virtual bool editCategory(const QString
&name
, const CategoryOptions
&options
) = 0;
164 virtual bool removeCategory(const QString
&name
) = 0;
165 virtual bool isSubcategoriesEnabled() const = 0;
166 virtual void setSubcategoriesEnabled(bool value
) = 0;
167 virtual bool useCategoryPathsInManualMode() const = 0;
168 virtual void setUseCategoryPathsInManualMode(bool value
) = 0;
170 virtual Path
suggestedSavePath(const QString
&categoryName
, std::optional
<bool> useAutoTMM
) const = 0;
171 virtual Path
suggestedDownloadPath(const QString
&categoryName
, std::optional
<bool> useAutoTMM
) const = 0;
173 virtual TagSet
tags() const = 0;
174 virtual bool hasTag(const Tag
&tag
) const = 0;
175 virtual bool addTag(const Tag
&tag
) = 0;
176 virtual bool removeTag(const Tag
&tag
) = 0;
178 // Torrent Management Mode subsystem (TMM)
180 // Each torrent can be either in Manual mode or in Automatic mode
181 // In Manual Mode various torrent properties are set explicitly(eg save path)
182 // In Automatic Mode various torrent properties are set implicitly(eg save path)
183 // based on the associated category.
184 // In Automatic Mode torrent save path can be changed in following cases:
185 // 1. Default save path changed
186 // 2. Torrent category save path changed
187 // 3. Torrent category changed
188 // (unless otherwise is specified)
189 virtual bool isAutoTMMDisabledByDefault() const = 0;
190 virtual void setAutoTMMDisabledByDefault(bool value
) = 0;
191 virtual bool isDisableAutoTMMWhenCategoryChanged() const = 0;
192 virtual void setDisableAutoTMMWhenCategoryChanged(bool value
) = 0;
193 virtual bool isDisableAutoTMMWhenDefaultSavePathChanged() const = 0;
194 virtual void setDisableAutoTMMWhenDefaultSavePathChanged(bool value
) = 0;
195 virtual bool isDisableAutoTMMWhenCategorySavePathChanged() const = 0;
196 virtual void setDisableAutoTMMWhenCategorySavePathChanged(bool value
) = 0;
198 virtual qreal
globalMaxRatio() const = 0;
199 virtual void setGlobalMaxRatio(qreal ratio
) = 0;
200 virtual int globalMaxSeedingMinutes() const = 0;
201 virtual void setGlobalMaxSeedingMinutes(int minutes
) = 0;
202 virtual int globalMaxInactiveSeedingMinutes() const = 0;
203 virtual void setGlobalMaxInactiveSeedingMinutes(int minutes
) = 0;
204 virtual ShareLimitAction
shareLimitAction() const = 0;
205 virtual void setShareLimitAction(ShareLimitAction act
) = 0;
207 virtual QString
getDHTBootstrapNodes() const = 0;
208 virtual void setDHTBootstrapNodes(const QString
&nodes
) = 0;
209 virtual bool isDHTEnabled() const = 0;
210 virtual void setDHTEnabled(bool enabled
) = 0;
211 virtual bool isLSDEnabled() const = 0;
212 virtual void setLSDEnabled(bool enabled
) = 0;
213 virtual bool isPeXEnabled() const = 0;
214 virtual void setPeXEnabled(bool enabled
) = 0;
215 virtual bool isAddTorrentToQueueTop() const = 0;
216 virtual void setAddTorrentToQueueTop(bool value
) = 0;
217 virtual bool isAddTorrentStopped() const = 0;
218 virtual void setAddTorrentStopped(bool value
) = 0;
219 virtual Torrent::StopCondition
torrentStopCondition() const = 0;
220 virtual void setTorrentStopCondition(Torrent::StopCondition stopCondition
) = 0;
221 virtual TorrentContentLayout
torrentContentLayout() const = 0;
222 virtual void setTorrentContentLayout(TorrentContentLayout value
) = 0;
223 virtual bool isTrackerEnabled() const = 0;
224 virtual void setTrackerEnabled(bool enabled
) = 0;
225 virtual bool isAppendExtensionEnabled() const = 0;
226 virtual void setAppendExtensionEnabled(bool enabled
) = 0;
227 virtual bool isUnwantedFolderEnabled() const = 0;
228 virtual void setUnwantedFolderEnabled(bool enabled
) = 0;
229 virtual int refreshInterval() const = 0;
230 virtual void setRefreshInterval(int value
) = 0;
231 virtual bool isPreallocationEnabled() const = 0;
232 virtual void setPreallocationEnabled(bool enabled
) = 0;
233 virtual Path
torrentExportDirectory() const = 0;
234 virtual void setTorrentExportDirectory(const Path
&path
) = 0;
235 virtual Path
finishedTorrentExportDirectory() const = 0;
236 virtual void setFinishedTorrentExportDirectory(const Path
&path
) = 0;
238 virtual int globalDownloadSpeedLimit() const = 0;
239 virtual void setGlobalDownloadSpeedLimit(int limit
) = 0;
240 virtual int globalUploadSpeedLimit() const = 0;
241 virtual void setGlobalUploadSpeedLimit(int limit
) = 0;
242 virtual int altGlobalDownloadSpeedLimit() const = 0;
243 virtual void setAltGlobalDownloadSpeedLimit(int limit
) = 0;
244 virtual int altGlobalUploadSpeedLimit() const = 0;
245 virtual void setAltGlobalUploadSpeedLimit(int limit
) = 0;
246 virtual int downloadSpeedLimit() const = 0;
247 virtual void setDownloadSpeedLimit(int limit
) = 0;
248 virtual int uploadSpeedLimit() const = 0;
249 virtual void setUploadSpeedLimit(int limit
) = 0;
250 virtual bool isAltGlobalSpeedLimitEnabled() const = 0;
251 virtual void setAltGlobalSpeedLimitEnabled(bool enabled
) = 0;
252 virtual bool isBandwidthSchedulerEnabled() const = 0;
253 virtual void setBandwidthSchedulerEnabled(bool enabled
) = 0;
255 virtual bool isPerformanceWarningEnabled() const = 0;
256 virtual void setPerformanceWarningEnabled(bool enable
) = 0;
257 virtual int saveResumeDataInterval() const = 0;
258 virtual void setSaveResumeDataInterval(int value
) = 0;
259 virtual int shutdownTimeout() const = 0;
260 virtual void setShutdownTimeout(int value
) = 0;
261 virtual int port() const = 0;
262 virtual void setPort(int port
) = 0;
263 virtual bool isSSLEnabled() const = 0;
264 virtual void setSSLEnabled(bool enabled
) = 0;
265 virtual int sslPort() const = 0;
266 virtual void setSSLPort(int port
) = 0;
267 virtual QString
networkInterface() const = 0;
268 virtual void setNetworkInterface(const QString
&iface
) = 0;
269 virtual QString
networkInterfaceName() const = 0;
270 virtual void setNetworkInterfaceName(const QString
&name
) = 0;
271 virtual QString
networkInterfaceAddress() const = 0;
272 virtual void setNetworkInterfaceAddress(const QString
&address
) = 0;
273 virtual int encryption() const = 0;
274 virtual void setEncryption(int state
) = 0;
275 virtual int maxActiveCheckingTorrents() const = 0;
276 virtual void setMaxActiveCheckingTorrents(int val
) = 0;
277 virtual bool isI2PEnabled() const = 0;
278 virtual void setI2PEnabled(bool enabled
) = 0;
279 virtual QString
I2PAddress() const = 0;
280 virtual void setI2PAddress(const QString
&address
) = 0;
281 virtual int I2PPort() const = 0;
282 virtual void setI2PPort(int port
) = 0;
283 virtual bool I2PMixedMode() const = 0;
284 virtual void setI2PMixedMode(bool enabled
) = 0;
285 virtual int I2PInboundQuantity() const = 0;
286 virtual void setI2PInboundQuantity(int value
) = 0;
287 virtual int I2POutboundQuantity() const = 0;
288 virtual void setI2POutboundQuantity(int value
) = 0;
289 virtual int I2PInboundLength() const = 0;
290 virtual void setI2PInboundLength(int value
) = 0;
291 virtual int I2POutboundLength() const = 0;
292 virtual void setI2POutboundLength(int value
) = 0;
293 virtual bool isProxyPeerConnectionsEnabled() const = 0;
294 virtual void setProxyPeerConnectionsEnabled(bool enabled
) = 0;
295 virtual ChokingAlgorithm
chokingAlgorithm() const = 0;
296 virtual void setChokingAlgorithm(ChokingAlgorithm mode
) = 0;
297 virtual SeedChokingAlgorithm
seedChokingAlgorithm() const = 0;
298 virtual void setSeedChokingAlgorithm(SeedChokingAlgorithm mode
) = 0;
299 virtual bool isAddTrackersEnabled() const = 0;
300 virtual void setAddTrackersEnabled(bool enabled
) = 0;
301 virtual QString
additionalTrackers() const = 0;
302 virtual void setAdditionalTrackers(const QString
&trackers
) = 0;
303 virtual bool isIPFilteringEnabled() const = 0;
304 virtual void setIPFilteringEnabled(bool enabled
) = 0;
305 virtual Path
IPFilterFile() const = 0;
306 virtual void setIPFilterFile(const Path
&path
) = 0;
307 virtual bool announceToAllTrackers() const = 0;
308 virtual void setAnnounceToAllTrackers(bool val
) = 0;
309 virtual bool announceToAllTiers() const = 0;
310 virtual void setAnnounceToAllTiers(bool val
) = 0;
311 virtual int peerTurnover() const = 0;
312 virtual void setPeerTurnover(int val
) = 0;
313 virtual int peerTurnoverCutoff() const = 0;
314 virtual void setPeerTurnoverCutoff(int val
) = 0;
315 virtual int peerTurnoverInterval() const = 0;
316 virtual void setPeerTurnoverInterval(int val
) = 0;
317 virtual int requestQueueSize() const = 0;
318 virtual void setRequestQueueSize(int val
) = 0;
319 virtual int asyncIOThreads() const = 0;
320 virtual void setAsyncIOThreads(int num
) = 0;
321 virtual int hashingThreads() const = 0;
322 virtual void setHashingThreads(int num
) = 0;
323 virtual int filePoolSize() const = 0;
324 virtual void setFilePoolSize(int size
) = 0;
325 virtual int checkingMemUsage() const = 0;
326 virtual void setCheckingMemUsage(int size
) = 0;
327 virtual int diskCacheSize() const = 0;
328 virtual void setDiskCacheSize(int size
) = 0;
329 virtual int diskCacheTTL() const = 0;
330 virtual void setDiskCacheTTL(int ttl
) = 0;
331 virtual qint64
diskQueueSize() const = 0;
332 virtual void setDiskQueueSize(qint64 size
) = 0;
333 virtual DiskIOType
diskIOType() const = 0;
334 virtual void setDiskIOType(DiskIOType type
) = 0;
335 virtual DiskIOReadMode
diskIOReadMode() const = 0;
336 virtual void setDiskIOReadMode(DiskIOReadMode mode
) = 0;
337 virtual DiskIOWriteMode
diskIOWriteMode() const = 0;
338 virtual void setDiskIOWriteMode(DiskIOWriteMode mode
) = 0;
339 virtual bool isCoalesceReadWriteEnabled() const = 0;
340 virtual void setCoalesceReadWriteEnabled(bool enabled
) = 0;
341 virtual bool usePieceExtentAffinity() const = 0;
342 virtual void setPieceExtentAffinity(bool enabled
) = 0;
343 virtual bool isSuggestModeEnabled() const = 0;
344 virtual void setSuggestMode(bool mode
) = 0;
345 virtual int sendBufferWatermark() const = 0;
346 virtual void setSendBufferWatermark(int value
) = 0;
347 virtual int sendBufferLowWatermark() const = 0;
348 virtual void setSendBufferLowWatermark(int value
) = 0;
349 virtual int sendBufferWatermarkFactor() const = 0;
350 virtual void setSendBufferWatermarkFactor(int value
) = 0;
351 virtual int connectionSpeed() const = 0;
352 virtual void setConnectionSpeed(int value
) = 0;
353 virtual int socketSendBufferSize() const = 0;
354 virtual void setSocketSendBufferSize(int value
) = 0;
355 virtual int socketReceiveBufferSize() const = 0;
356 virtual void setSocketReceiveBufferSize(int value
) = 0;
357 virtual int socketBacklogSize() const = 0;
358 virtual void setSocketBacklogSize(int value
) = 0;
359 virtual bool isAnonymousModeEnabled() const = 0;
360 virtual void setAnonymousModeEnabled(bool enabled
) = 0;
361 virtual bool isQueueingSystemEnabled() const = 0;
362 virtual void setQueueingSystemEnabled(bool enabled
) = 0;
363 virtual bool ignoreSlowTorrentsForQueueing() const = 0;
364 virtual void setIgnoreSlowTorrentsForQueueing(bool ignore
) = 0;
365 virtual int downloadRateForSlowTorrents() const = 0;
366 virtual void setDownloadRateForSlowTorrents(int rateInKibiBytes
) = 0;
367 virtual int uploadRateForSlowTorrents() const = 0;
368 virtual void setUploadRateForSlowTorrents(int rateInKibiBytes
) = 0;
369 virtual int slowTorrentsInactivityTimer() const = 0;
370 virtual void setSlowTorrentsInactivityTimer(int timeInSeconds
) = 0;
371 virtual int outgoingPortsMin() const = 0;
372 virtual void setOutgoingPortsMin(int min
) = 0;
373 virtual int outgoingPortsMax() const = 0;
374 virtual void setOutgoingPortsMax(int max
) = 0;
375 virtual int UPnPLeaseDuration() const = 0;
376 virtual void setUPnPLeaseDuration(int duration
) = 0;
377 virtual int peerToS() const = 0;
378 virtual void setPeerToS(int value
) = 0;
379 virtual bool ignoreLimitsOnLAN() const = 0;
380 virtual void setIgnoreLimitsOnLAN(bool ignore
) = 0;
381 virtual bool includeOverheadInLimits() const = 0;
382 virtual void setIncludeOverheadInLimits(bool include
) = 0;
383 virtual QString
announceIP() const = 0;
384 virtual void setAnnounceIP(const QString
&ip
) = 0;
385 virtual int maxConcurrentHTTPAnnounces() const = 0;
386 virtual void setMaxConcurrentHTTPAnnounces(int value
) = 0;
387 virtual bool isReannounceWhenAddressChangedEnabled() const = 0;
388 virtual void setReannounceWhenAddressChangedEnabled(bool enabled
) = 0;
389 virtual void reannounceToAllTrackers() const = 0;
390 virtual int stopTrackerTimeout() const = 0;
391 virtual void setStopTrackerTimeout(int value
) = 0;
392 virtual int maxConnections() const = 0;
393 virtual void setMaxConnections(int max
) = 0;
394 virtual int maxConnectionsPerTorrent() const = 0;
395 virtual void setMaxConnectionsPerTorrent(int max
) = 0;
396 virtual int maxUploads() const = 0;
397 virtual void setMaxUploads(int max
) = 0;
398 virtual int maxUploadsPerTorrent() const = 0;
399 virtual void setMaxUploadsPerTorrent(int max
) = 0;
400 virtual int maxActiveDownloads() const = 0;
401 virtual void setMaxActiveDownloads(int max
) = 0;
402 virtual int maxActiveUploads() const = 0;
403 virtual void setMaxActiveUploads(int max
) = 0;
404 virtual int maxActiveTorrents() const = 0;
405 virtual void setMaxActiveTorrents(int max
) = 0;
406 virtual BTProtocol
btProtocol() const = 0;
407 virtual void setBTProtocol(BTProtocol protocol
) = 0;
408 virtual bool isUTPRateLimited() const = 0;
409 virtual void setUTPRateLimited(bool limited
) = 0;
410 virtual MixedModeAlgorithm
utpMixedMode() const = 0;
411 virtual void setUtpMixedMode(MixedModeAlgorithm mode
) = 0;
412 virtual bool isIDNSupportEnabled() const = 0;
413 virtual void setIDNSupportEnabled(bool enabled
) = 0;
414 virtual bool multiConnectionsPerIpEnabled() const = 0;
415 virtual void setMultiConnectionsPerIpEnabled(bool enabled
) = 0;
416 virtual bool validateHTTPSTrackerCertificate() const = 0;
417 virtual void setValidateHTTPSTrackerCertificate(bool enabled
) = 0;
418 virtual bool isSSRFMitigationEnabled() const = 0;
419 virtual void setSSRFMitigationEnabled(bool enabled
) = 0;
420 virtual bool blockPeersOnPrivilegedPorts() const = 0;
421 virtual void setBlockPeersOnPrivilegedPorts(bool enabled
) = 0;
422 virtual bool isTrackerFilteringEnabled() const = 0;
423 virtual void setTrackerFilteringEnabled(bool enabled
) = 0;
424 virtual bool isExcludedFileNamesEnabled() const = 0;
425 virtual void setExcludedFileNamesEnabled(bool enabled
) = 0;
426 virtual QStringList
excludedFileNames() const = 0;
427 virtual void setExcludedFileNames(const QStringList
&newList
) = 0;
428 virtual void applyFilenameFilter(const PathList
&files
, QList
<BitTorrent::DownloadPriority
> &priorities
) = 0;
429 virtual QStringList
bannedIPs() const = 0;
430 virtual void setBannedIPs(const QStringList
&newList
) = 0;
431 virtual ResumeDataStorageType
resumeDataStorageType() const = 0;
432 virtual void setResumeDataStorageType(ResumeDataStorageType type
) = 0;
433 virtual bool isMergeTrackersEnabled() const = 0;
434 virtual void setMergeTrackersEnabled(bool enabled
) = 0;
435 virtual bool isStartPaused() const = 0;
436 virtual void setStartPaused(bool value
) = 0;
438 virtual bool isRestored() const = 0;
440 virtual bool isPaused() const = 0;
441 virtual void pause() = 0;
442 virtual void resume() = 0;
444 virtual Torrent
*getTorrent(const TorrentID
&id
) const = 0;
445 virtual Torrent
*findTorrent(const InfoHash
&infoHash
) const = 0;
446 virtual QVector
<Torrent
*> torrents() const = 0;
447 virtual qsizetype
torrentsCount() const = 0;
448 virtual const SessionStatus
&status() const = 0;
449 virtual const CacheStatus
&cacheStatus() const = 0;
450 virtual bool isListening() const = 0;
452 virtual void banIP(const QString
&ip
) = 0;
454 virtual bool isKnownTorrent(const InfoHash
&infoHash
) const = 0;
455 virtual bool addTorrent(const TorrentDescriptor
&torrentDescr
, const AddTorrentParams
¶ms
= {}) = 0;
456 virtual bool deleteTorrent(const TorrentID
&id
, DeleteOption deleteOption
= DeleteOption::DeleteTorrent
) = 0;
457 virtual bool downloadMetadata(const TorrentDescriptor
&torrentDescr
) = 0;
458 virtual bool cancelDownloadMetadata(const TorrentID
&id
) = 0;
460 virtual void increaseTorrentsQueuePos(const QVector
<TorrentID
> &ids
) = 0;
461 virtual void decreaseTorrentsQueuePos(const QVector
<TorrentID
> &ids
) = 0;
462 virtual void topTorrentsQueuePos(const QVector
<TorrentID
> &ids
) = 0;
463 virtual void bottomTorrentsQueuePos(const QVector
<TorrentID
> &ids
) = 0;
466 void startupProgressUpdated(int progress
);
467 void addTorrentFailed(const InfoHash
&infoHash
, const QString
&reason
);
468 void allTorrentsFinished();
469 void categoryAdded(const QString
&categoryName
);
470 void categoryRemoved(const QString
&categoryName
);
471 void categoryOptionsChanged(const QString
&categoryName
);
472 void fullDiskError(Torrent
*torrent
, const QString
&msg
);
473 void IPFilterParsed(bool error
, int ruleCount
);
474 void loadTorrentFailed(const QString
&error
);
475 void metadataDownloaded(const TorrentInfo
&info
);
479 void speedLimitModeChanged(bool alternative
);
481 void subcategoriesSupportChanged();
482 void tagAdded(const Tag
&tag
);
483 void tagRemoved(const Tag
&tag
);
484 void torrentAboutToBeRemoved(Torrent
*torrent
);
485 void torrentAdded(Torrent
*torrent
);
486 void torrentCategoryChanged(Torrent
*torrent
, const QString
&oldCategory
);
487 void torrentFinished(Torrent
*torrent
);
488 void torrentFinishedChecking(Torrent
*torrent
);
489 void torrentMetadataReceived(Torrent
*torrent
);
490 void torrentStopped(Torrent
*torrent
);
491 void torrentStarted(Torrent
*torrent
);
492 void torrentSavePathChanged(Torrent
*torrent
);
493 void torrentSavingModeChanged(Torrent
*torrent
);
494 void torrentsLoaded(const QVector
<Torrent
*> &torrents
);
495 void torrentsUpdated(const QVector
<Torrent
*> &torrents
);
496 void torrentTagAdded(Torrent
*torrent
, const Tag
&tag
);
497 void torrentTagRemoved(Torrent
*torrent
, const Tag
&tag
);
498 void trackerError(Torrent
*torrent
, const QString
&tracker
);
499 void trackersAdded(Torrent
*torrent
, const QVector
<TrackerEntry
> &trackers
);
500 void trackersChanged(Torrent
*torrent
);
501 void trackersRemoved(Torrent
*torrent
, const QStringList
&trackers
);
502 void trackerSuccess(Torrent
*torrent
, const QString
&tracker
);
503 void trackerWarning(Torrent
*torrent
, const QString
&tracker
);
504 void trackerEntryStatusesUpdated(Torrent
*torrent
, const QHash
<QString
, TrackerEntryStatus
> &updatedTrackers
);