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 "torrentcontentremoveoption.h"
41 #include "trackerentry.h"
42 #include "trackerentrystatus.h"
50 class TorrentDescriptor
;
56 enum class TorrentRemoveOption
62 // Using `Q_ENUM_NS()` without a wrapper namespace in our case is not advised
63 // since `Q_NAMESPACE` cannot be used when the same namespace resides at different files.
64 // https://www.kdab.com/new-qt-5-8-meta-object-support-namespaces/#comment-143779
65 inline namespace SessionSettingsEnums
69 enum class BTProtocol
: int
77 enum class ChokingAlgorithm
: int
82 Q_ENUM_NS(ChokingAlgorithm
)
84 enum class DiskIOReadMode
: int
89 Q_ENUM_NS(DiskIOReadMode
)
91 enum class DiskIOType
: int
100 enum class DiskIOWriteMode
: int
104 #ifdef QBT_USES_LIBTORRENT2
108 Q_ENUM_NS(DiskIOWriteMode
)
110 enum class MixedModeAlgorithm
: int
115 Q_ENUM_NS(MixedModeAlgorithm
)
117 enum class SeedChokingAlgorithm
: int
123 Q_ENUM_NS(SeedChokingAlgorithm
)
125 enum class ResumeDataStorageType
130 Q_ENUM_NS(ResumeDataStorageType
)
133 class Session
: public QObject
136 Q_DISABLE_COPY_MOVE(Session
)
139 static void initInstance();
140 static void freeInstance();
141 static Session
*instance();
143 using QObject::QObject
;
145 virtual Path
savePath() const = 0;
146 virtual void setSavePath(const Path
&path
) = 0;
147 virtual Path
downloadPath() const = 0;
148 virtual void setDownloadPath(const Path
&path
) = 0;
149 virtual bool isDownloadPathEnabled() const = 0;
150 virtual void setDownloadPathEnabled(bool enabled
) = 0;
152 static bool isValidCategoryName(const QString
&name
);
153 static QString
subcategoryName(const QString
&category
);
154 static QString
parentCategoryName(const QString
&category
);
155 // returns category itself and all top level categories
156 static QStringList
expandCategory(const QString
&category
);
158 virtual QStringList
categories() const = 0;
159 virtual CategoryOptions
categoryOptions(const QString
&categoryName
) const = 0;
160 virtual Path
categorySavePath(const QString
&categoryName
) const = 0;
161 virtual Path
categorySavePath(const QString
&categoryName
, const CategoryOptions
&options
) const = 0;
162 virtual Path
categoryDownloadPath(const QString
&categoryName
) const = 0;
163 virtual Path
categoryDownloadPath(const QString
&categoryName
, const CategoryOptions
&options
) const = 0;
164 virtual bool addCategory(const QString
&name
, const CategoryOptions
&options
= {}) = 0;
165 virtual bool editCategory(const QString
&name
, const CategoryOptions
&options
) = 0;
166 virtual bool removeCategory(const QString
&name
) = 0;
167 virtual bool isSubcategoriesEnabled() const = 0;
168 virtual void setSubcategoriesEnabled(bool value
) = 0;
169 virtual bool useCategoryPathsInManualMode() const = 0;
170 virtual void setUseCategoryPathsInManualMode(bool value
) = 0;
172 virtual Path
suggestedSavePath(const QString
&categoryName
, std::optional
<bool> useAutoTMM
) const = 0;
173 virtual Path
suggestedDownloadPath(const QString
&categoryName
, std::optional
<bool> useAutoTMM
) const = 0;
175 virtual TagSet
tags() const = 0;
176 virtual bool hasTag(const Tag
&tag
) const = 0;
177 virtual bool addTag(const Tag
&tag
) = 0;
178 virtual bool removeTag(const Tag
&tag
) = 0;
180 // Torrent Management Mode subsystem (TMM)
182 // Each torrent can be either in Manual mode or in Automatic mode
183 // In Manual Mode various torrent properties are set explicitly(eg save path)
184 // In Automatic Mode various torrent properties are set implicitly(eg save path)
185 // based on the associated category.
186 // In Automatic Mode torrent save path can be changed in following cases:
187 // 1. Default save path changed
188 // 2. Torrent category save path changed
189 // 3. Torrent category changed
190 // (unless otherwise is specified)
191 virtual bool isAutoTMMDisabledByDefault() const = 0;
192 virtual void setAutoTMMDisabledByDefault(bool value
) = 0;
193 virtual bool isDisableAutoTMMWhenCategoryChanged() const = 0;
194 virtual void setDisableAutoTMMWhenCategoryChanged(bool value
) = 0;
195 virtual bool isDisableAutoTMMWhenDefaultSavePathChanged() const = 0;
196 virtual void setDisableAutoTMMWhenDefaultSavePathChanged(bool value
) = 0;
197 virtual bool isDisableAutoTMMWhenCategorySavePathChanged() const = 0;
198 virtual void setDisableAutoTMMWhenCategorySavePathChanged(bool value
) = 0;
200 virtual qreal
globalMaxRatio() const = 0;
201 virtual void setGlobalMaxRatio(qreal ratio
) = 0;
202 virtual int globalMaxSeedingMinutes() const = 0;
203 virtual void setGlobalMaxSeedingMinutes(int minutes
) = 0;
204 virtual int globalMaxInactiveSeedingMinutes() const = 0;
205 virtual void setGlobalMaxInactiveSeedingMinutes(int minutes
) = 0;
206 virtual ShareLimitAction
shareLimitAction() const = 0;
207 virtual void setShareLimitAction(ShareLimitAction act
) = 0;
209 virtual QString
getDHTBootstrapNodes() const = 0;
210 virtual void setDHTBootstrapNodes(const QString
&nodes
) = 0;
211 virtual bool isDHTEnabled() const = 0;
212 virtual void setDHTEnabled(bool enabled
) = 0;
213 virtual bool isLSDEnabled() const = 0;
214 virtual void setLSDEnabled(bool enabled
) = 0;
215 virtual bool isPeXEnabled() const = 0;
216 virtual void setPeXEnabled(bool enabled
) = 0;
217 virtual bool isAddTorrentToQueueTop() const = 0;
218 virtual void setAddTorrentToQueueTop(bool value
) = 0;
219 virtual bool isAddTorrentStopped() const = 0;
220 virtual void setAddTorrentStopped(bool value
) = 0;
221 virtual Torrent::StopCondition
torrentStopCondition() const = 0;
222 virtual void setTorrentStopCondition(Torrent::StopCondition stopCondition
) = 0;
223 virtual TorrentContentLayout
torrentContentLayout() const = 0;
224 virtual void setTorrentContentLayout(TorrentContentLayout value
) = 0;
225 virtual bool isTrackerEnabled() const = 0;
226 virtual void setTrackerEnabled(bool enabled
) = 0;
227 virtual bool isAppendExtensionEnabled() const = 0;
228 virtual void setAppendExtensionEnabled(bool enabled
) = 0;
229 virtual bool isUnwantedFolderEnabled() const = 0;
230 virtual void setUnwantedFolderEnabled(bool enabled
) = 0;
231 virtual int refreshInterval() const = 0;
232 virtual void setRefreshInterval(int value
) = 0;
233 virtual bool isPreallocationEnabled() const = 0;
234 virtual void setPreallocationEnabled(bool enabled
) = 0;
235 virtual Path
torrentExportDirectory() const = 0;
236 virtual void setTorrentExportDirectory(const Path
&path
) = 0;
237 virtual Path
finishedTorrentExportDirectory() const = 0;
238 virtual void setFinishedTorrentExportDirectory(const Path
&path
) = 0;
240 virtual int globalDownloadSpeedLimit() const = 0;
241 virtual void setGlobalDownloadSpeedLimit(int limit
) = 0;
242 virtual int globalUploadSpeedLimit() const = 0;
243 virtual void setGlobalUploadSpeedLimit(int limit
) = 0;
244 virtual int altGlobalDownloadSpeedLimit() const = 0;
245 virtual void setAltGlobalDownloadSpeedLimit(int limit
) = 0;
246 virtual int altGlobalUploadSpeedLimit() const = 0;
247 virtual void setAltGlobalUploadSpeedLimit(int limit
) = 0;
248 virtual int downloadSpeedLimit() const = 0;
249 virtual void setDownloadSpeedLimit(int limit
) = 0;
250 virtual int uploadSpeedLimit() const = 0;
251 virtual void setUploadSpeedLimit(int limit
) = 0;
252 virtual bool isAltGlobalSpeedLimitEnabled() const = 0;
253 virtual void setAltGlobalSpeedLimitEnabled(bool enabled
) = 0;
254 virtual bool isBandwidthSchedulerEnabled() const = 0;
255 virtual void setBandwidthSchedulerEnabled(bool enabled
) = 0;
257 virtual bool isPerformanceWarningEnabled() const = 0;
258 virtual void setPerformanceWarningEnabled(bool enable
) = 0;
259 virtual int saveResumeDataInterval() const = 0;
260 virtual void setSaveResumeDataInterval(int value
) = 0;
261 virtual std::chrono::minutes
saveStatisticsInterval() const = 0;
262 virtual void setSaveStatisticsInterval(std::chrono::minutes value
) = 0;
263 virtual int shutdownTimeout() const = 0;
264 virtual void setShutdownTimeout(int value
) = 0;
265 virtual int port() const = 0;
266 virtual void setPort(int port
) = 0;
267 virtual bool isSSLEnabled() const = 0;
268 virtual void setSSLEnabled(bool enabled
) = 0;
269 virtual int sslPort() const = 0;
270 virtual void setSSLPort(int port
) = 0;
271 virtual QString
networkInterface() const = 0;
272 virtual void setNetworkInterface(const QString
&iface
) = 0;
273 virtual QString
networkInterfaceName() const = 0;
274 virtual void setNetworkInterfaceName(const QString
&name
) = 0;
275 virtual QString
networkInterfaceAddress() const = 0;
276 virtual void setNetworkInterfaceAddress(const QString
&address
) = 0;
277 virtual int encryption() const = 0;
278 virtual void setEncryption(int state
) = 0;
279 virtual int maxActiveCheckingTorrents() const = 0;
280 virtual void setMaxActiveCheckingTorrents(int val
) = 0;
281 virtual bool isI2PEnabled() const = 0;
282 virtual void setI2PEnabled(bool enabled
) = 0;
283 virtual QString
I2PAddress() const = 0;
284 virtual void setI2PAddress(const QString
&address
) = 0;
285 virtual int I2PPort() const = 0;
286 virtual void setI2PPort(int port
) = 0;
287 virtual bool I2PMixedMode() const = 0;
288 virtual void setI2PMixedMode(bool enabled
) = 0;
289 virtual int I2PInboundQuantity() const = 0;
290 virtual void setI2PInboundQuantity(int value
) = 0;
291 virtual int I2POutboundQuantity() const = 0;
292 virtual void setI2POutboundQuantity(int value
) = 0;
293 virtual int I2PInboundLength() const = 0;
294 virtual void setI2PInboundLength(int value
) = 0;
295 virtual int I2POutboundLength() const = 0;
296 virtual void setI2POutboundLength(int value
) = 0;
297 virtual bool isProxyPeerConnectionsEnabled() const = 0;
298 virtual void setProxyPeerConnectionsEnabled(bool enabled
) = 0;
299 virtual ChokingAlgorithm
chokingAlgorithm() const = 0;
300 virtual void setChokingAlgorithm(ChokingAlgorithm mode
) = 0;
301 virtual SeedChokingAlgorithm
seedChokingAlgorithm() const = 0;
302 virtual void setSeedChokingAlgorithm(SeedChokingAlgorithm mode
) = 0;
303 virtual bool isAddTrackersEnabled() const = 0;
304 virtual void setAddTrackersEnabled(bool enabled
) = 0;
305 virtual QString
additionalTrackers() const = 0;
306 virtual void setAdditionalTrackers(const QString
&trackers
) = 0;
307 virtual bool isIPFilteringEnabled() const = 0;
308 virtual void setIPFilteringEnabled(bool enabled
) = 0;
309 virtual Path
IPFilterFile() const = 0;
310 virtual void setIPFilterFile(const Path
&path
) = 0;
311 virtual bool announceToAllTrackers() const = 0;
312 virtual void setAnnounceToAllTrackers(bool val
) = 0;
313 virtual bool announceToAllTiers() const = 0;
314 virtual void setAnnounceToAllTiers(bool val
) = 0;
315 virtual int peerTurnover() const = 0;
316 virtual void setPeerTurnover(int val
) = 0;
317 virtual int peerTurnoverCutoff() const = 0;
318 virtual void setPeerTurnoverCutoff(int val
) = 0;
319 virtual int peerTurnoverInterval() const = 0;
320 virtual void setPeerTurnoverInterval(int val
) = 0;
321 virtual int requestQueueSize() const = 0;
322 virtual void setRequestQueueSize(int val
) = 0;
323 virtual int asyncIOThreads() const = 0;
324 virtual void setAsyncIOThreads(int num
) = 0;
325 virtual int hashingThreads() const = 0;
326 virtual void setHashingThreads(int num
) = 0;
327 virtual int filePoolSize() const = 0;
328 virtual void setFilePoolSize(int size
) = 0;
329 virtual int checkingMemUsage() const = 0;
330 virtual void setCheckingMemUsage(int size
) = 0;
331 virtual int diskCacheSize() const = 0;
332 virtual void setDiskCacheSize(int size
) = 0;
333 virtual int diskCacheTTL() const = 0;
334 virtual void setDiskCacheTTL(int ttl
) = 0;
335 virtual qint64
diskQueueSize() const = 0;
336 virtual void setDiskQueueSize(qint64 size
) = 0;
337 virtual DiskIOType
diskIOType() const = 0;
338 virtual void setDiskIOType(DiskIOType type
) = 0;
339 virtual DiskIOReadMode
diskIOReadMode() const = 0;
340 virtual void setDiskIOReadMode(DiskIOReadMode mode
) = 0;
341 virtual DiskIOWriteMode
diskIOWriteMode() const = 0;
342 virtual void setDiskIOWriteMode(DiskIOWriteMode mode
) = 0;
343 virtual bool isCoalesceReadWriteEnabled() const = 0;
344 virtual void setCoalesceReadWriteEnabled(bool enabled
) = 0;
345 virtual bool usePieceExtentAffinity() const = 0;
346 virtual void setPieceExtentAffinity(bool enabled
) = 0;
347 virtual bool isSuggestModeEnabled() const = 0;
348 virtual void setSuggestMode(bool mode
) = 0;
349 virtual int sendBufferWatermark() const = 0;
350 virtual void setSendBufferWatermark(int value
) = 0;
351 virtual int sendBufferLowWatermark() const = 0;
352 virtual void setSendBufferLowWatermark(int value
) = 0;
353 virtual int sendBufferWatermarkFactor() const = 0;
354 virtual void setSendBufferWatermarkFactor(int value
) = 0;
355 virtual int connectionSpeed() const = 0;
356 virtual void setConnectionSpeed(int value
) = 0;
357 virtual int socketSendBufferSize() const = 0;
358 virtual void setSocketSendBufferSize(int value
) = 0;
359 virtual int socketReceiveBufferSize() const = 0;
360 virtual void setSocketReceiveBufferSize(int value
) = 0;
361 virtual int socketBacklogSize() const = 0;
362 virtual void setSocketBacklogSize(int value
) = 0;
363 virtual bool isAnonymousModeEnabled() const = 0;
364 virtual void setAnonymousModeEnabled(bool enabled
) = 0;
365 virtual bool isQueueingSystemEnabled() const = 0;
366 virtual void setQueueingSystemEnabled(bool enabled
) = 0;
367 virtual bool ignoreSlowTorrentsForQueueing() const = 0;
368 virtual void setIgnoreSlowTorrentsForQueueing(bool ignore
) = 0;
369 virtual int downloadRateForSlowTorrents() const = 0;
370 virtual void setDownloadRateForSlowTorrents(int rateInKibiBytes
) = 0;
371 virtual int uploadRateForSlowTorrents() const = 0;
372 virtual void setUploadRateForSlowTorrents(int rateInKibiBytes
) = 0;
373 virtual int slowTorrentsInactivityTimer() const = 0;
374 virtual void setSlowTorrentsInactivityTimer(int timeInSeconds
) = 0;
375 virtual int outgoingPortsMin() const = 0;
376 virtual void setOutgoingPortsMin(int min
) = 0;
377 virtual int outgoingPortsMax() const = 0;
378 virtual void setOutgoingPortsMax(int max
) = 0;
379 virtual int UPnPLeaseDuration() const = 0;
380 virtual void setUPnPLeaseDuration(int duration
) = 0;
381 virtual int peerToS() const = 0;
382 virtual void setPeerToS(int value
) = 0;
383 virtual bool ignoreLimitsOnLAN() const = 0;
384 virtual void setIgnoreLimitsOnLAN(bool ignore
) = 0;
385 virtual bool includeOverheadInLimits() const = 0;
386 virtual void setIncludeOverheadInLimits(bool include
) = 0;
387 virtual QString
announceIP() const = 0;
388 virtual void setAnnounceIP(const QString
&ip
) = 0;
389 virtual int maxConcurrentHTTPAnnounces() const = 0;
390 virtual void setMaxConcurrentHTTPAnnounces(int value
) = 0;
391 virtual bool isReannounceWhenAddressChangedEnabled() const = 0;
392 virtual void setReannounceWhenAddressChangedEnabled(bool enabled
) = 0;
393 virtual void reannounceToAllTrackers() const = 0;
394 virtual int stopTrackerTimeout() const = 0;
395 virtual void setStopTrackerTimeout(int value
) = 0;
396 virtual int maxConnections() const = 0;
397 virtual void setMaxConnections(int max
) = 0;
398 virtual int maxConnectionsPerTorrent() const = 0;
399 virtual void setMaxConnectionsPerTorrent(int max
) = 0;
400 virtual int maxUploads() const = 0;
401 virtual void setMaxUploads(int max
) = 0;
402 virtual int maxUploadsPerTorrent() const = 0;
403 virtual void setMaxUploadsPerTorrent(int max
) = 0;
404 virtual int maxActiveDownloads() const = 0;
405 virtual void setMaxActiveDownloads(int max
) = 0;
406 virtual int maxActiveUploads() const = 0;
407 virtual void setMaxActiveUploads(int max
) = 0;
408 virtual int maxActiveTorrents() const = 0;
409 virtual void setMaxActiveTorrents(int max
) = 0;
410 virtual BTProtocol
btProtocol() const = 0;
411 virtual void setBTProtocol(BTProtocol protocol
) = 0;
412 virtual bool isUTPRateLimited() const = 0;
413 virtual void setUTPRateLimited(bool limited
) = 0;
414 virtual MixedModeAlgorithm
utpMixedMode() const = 0;
415 virtual void setUtpMixedMode(MixedModeAlgorithm mode
) = 0;
416 virtual bool isIDNSupportEnabled() const = 0;
417 virtual void setIDNSupportEnabled(bool enabled
) = 0;
418 virtual bool multiConnectionsPerIpEnabled() const = 0;
419 virtual void setMultiConnectionsPerIpEnabled(bool enabled
) = 0;
420 virtual bool validateHTTPSTrackerCertificate() const = 0;
421 virtual void setValidateHTTPSTrackerCertificate(bool enabled
) = 0;
422 virtual bool isSSRFMitigationEnabled() const = 0;
423 virtual void setSSRFMitigationEnabled(bool enabled
) = 0;
424 virtual bool blockPeersOnPrivilegedPorts() const = 0;
425 virtual void setBlockPeersOnPrivilegedPorts(bool enabled
) = 0;
426 virtual bool isTrackerFilteringEnabled() const = 0;
427 virtual void setTrackerFilteringEnabled(bool enabled
) = 0;
428 virtual bool isExcludedFileNamesEnabled() const = 0;
429 virtual void setExcludedFileNamesEnabled(bool enabled
) = 0;
430 virtual QStringList
excludedFileNames() const = 0;
431 virtual void setExcludedFileNames(const QStringList
&newList
) = 0;
432 virtual void applyFilenameFilter(const PathList
&files
, QList
<BitTorrent::DownloadPriority
> &priorities
) = 0;
433 virtual QStringList
bannedIPs() const = 0;
434 virtual void setBannedIPs(const QStringList
&newList
) = 0;
435 virtual ResumeDataStorageType
resumeDataStorageType() const = 0;
436 virtual void setResumeDataStorageType(ResumeDataStorageType type
) = 0;
437 virtual bool isMergeTrackersEnabled() const = 0;
438 virtual void setMergeTrackersEnabled(bool enabled
) = 0;
439 virtual bool isStartPaused() const = 0;
440 virtual void setStartPaused(bool value
) = 0;
441 virtual TorrentContentRemoveOption
torrentContentRemoveOption() const = 0;
442 virtual void setTorrentContentRemoveOption(TorrentContentRemoveOption option
) = 0;
444 virtual bool isRestored() const = 0;
446 virtual bool isPaused() const = 0;
447 virtual void pause() = 0;
448 virtual void resume() = 0;
450 virtual Torrent
*getTorrent(const TorrentID
&id
) const = 0;
451 virtual Torrent
*findTorrent(const InfoHash
&infoHash
) const = 0;
452 virtual QList
<Torrent
*> torrents() const = 0;
453 virtual qsizetype
torrentsCount() const = 0;
454 virtual const SessionStatus
&status() const = 0;
455 virtual const CacheStatus
&cacheStatus() const = 0;
456 virtual bool isListening() const = 0;
458 virtual void banIP(const QString
&ip
) = 0;
460 virtual bool isKnownTorrent(const InfoHash
&infoHash
) const = 0;
461 virtual bool addTorrent(const TorrentDescriptor
&torrentDescr
, const AddTorrentParams
¶ms
= {}) = 0;
462 virtual bool removeTorrent(const TorrentID
&id
, TorrentRemoveOption deleteOption
= TorrentRemoveOption::KeepContent
) = 0;
463 virtual bool downloadMetadata(const TorrentDescriptor
&torrentDescr
) = 0;
464 virtual bool cancelDownloadMetadata(const TorrentID
&id
) = 0;
466 virtual void increaseTorrentsQueuePos(const QList
<TorrentID
> &ids
) = 0;
467 virtual void decreaseTorrentsQueuePos(const QList
<TorrentID
> &ids
) = 0;
468 virtual void topTorrentsQueuePos(const QList
<TorrentID
> &ids
) = 0;
469 virtual void bottomTorrentsQueuePos(const QList
<TorrentID
> &ids
) = 0;
471 virtual QString
lastExternalIPv4Address() const = 0;
472 virtual QString
lastExternalIPv6Address() const = 0;
475 void startupProgressUpdated(int progress
);
476 void addTorrentFailed(const InfoHash
&infoHash
, const QString
&reason
);
477 void allTorrentsFinished();
478 void categoryAdded(const QString
&categoryName
);
479 void categoryRemoved(const QString
&categoryName
);
480 void categoryOptionsChanged(const QString
&categoryName
);
481 void fullDiskError(Torrent
*torrent
, const QString
&msg
);
482 void IPFilterParsed(bool error
, int ruleCount
);
483 void loadTorrentFailed(const QString
&error
);
484 void metadataDownloaded(const TorrentInfo
&info
);
488 void speedLimitModeChanged(bool alternative
);
490 void subcategoriesSupportChanged();
491 void tagAdded(const Tag
&tag
);
492 void tagRemoved(const Tag
&tag
);
493 void torrentAboutToBeRemoved(Torrent
*torrent
);
494 void torrentAdded(Torrent
*torrent
);
495 void torrentCategoryChanged(Torrent
*torrent
, const QString
&oldCategory
);
496 void torrentFinished(Torrent
*torrent
);
497 void torrentFinishedChecking(Torrent
*torrent
);
498 void torrentMetadataReceived(Torrent
*torrent
);
499 void torrentStopped(Torrent
*torrent
);
500 void torrentStarted(Torrent
*torrent
);
501 void torrentSavePathChanged(Torrent
*torrent
);
502 void torrentSavingModeChanged(Torrent
*torrent
);
503 void torrentsLoaded(const QList
<Torrent
*> &torrents
);
504 void torrentsUpdated(const QList
<Torrent
*> &torrents
);
505 void torrentTagAdded(Torrent
*torrent
, const Tag
&tag
);
506 void torrentTagRemoved(Torrent
*torrent
, const Tag
&tag
);
507 void trackerError(Torrent
*torrent
, const QString
&tracker
);
508 void trackersAdded(Torrent
*torrent
, const QList
<TrackerEntry
> &trackers
);
509 void trackersChanged(Torrent
*torrent
);
510 void trackersRemoved(Torrent
*torrent
, const QStringList
&trackers
);
511 void trackerSuccess(Torrent
*torrent
, const QString
&tracker
);
512 void trackerWarning(Torrent
*torrent
, const QString
&tracker
);
513 void trackerEntryStatusesUpdated(Torrent
*torrent
, const QHash
<QString
, TrackerEntryStatus
> &updatedTrackers
);