Handle libtorrent alerts in SessionImpl only

PR #22798.
This commit is contained in:
Vladimir Golovnev
2025-06-03 08:18:12 +03:00
committed by GitHub
parent 7982f66fa6
commit 0729c9a2f8
4 changed files with 186 additions and 181 deletions

View File

@@ -264,8 +264,18 @@ namespace BitTorrent
// Session interface
lt::torrent_handle nativeHandle() const;
void handleAlert(const lt::alert *a);
int fileIndexFromNative(lt::file_index_t nativeFileIndex) const;
void handleStateUpdate(const lt::torrent_status &nativeStatus);
void handleFastResumeRejected();
void handleFileCompleted(lt::file_index_t nativeFileIndex);
void handleFileError(FileErrorInfo fileError);
void handleFileRenamed(lt::file_index_t nativeFileIndex, const Path &newActualFilePath, const Path &oldActualFilePath);
void handleFileRenameFailed(lt::file_index_t nativeFileIndex);
void handleMetadataReceived();
void handleSaveResumeData(lt::add_torrent_params params);
void handleTorrentChecked();
void handleTorrentFinished();
void handleQueueingModeChanged();
void handleCategoryOptionsChanged();
void handleAppendExtensionToggled();
@@ -285,23 +295,6 @@ namespace BitTorrent
void updateProgress();
void updateState();
void handleFastResumeRejectedAlert(const lt::fastresume_rejected_alert *p);
void handleFileCompletedAlert(const lt::file_completed_alert *p);
void handleFileErrorAlert(const lt::file_error_alert *p);
#ifdef QBT_USES_LIBTORRENT2
void handleFilePrioAlert(const lt::file_prio_alert *p);
#endif
void handleFileRenamedAlert(const lt::file_renamed_alert *p);
void handleFileRenameFailedAlert(const lt::file_rename_failed_alert *p);
void handleMetadataReceivedAlert(const lt::metadata_received_alert *p);
void handlePerformanceAlert(const lt::performance_alert *p) const;
void handleSaveResumeDataAlert(const lt::save_resume_data_alert *p);
void handleSaveResumeDataFailedAlert(const lt::save_resume_data_failed_alert *p);
void handleTorrentCheckedAlert(const lt::torrent_checked_alert *p);
void handleTorrentFinishedAlert(const lt::torrent_finished_alert *p);
void handleTorrentPausedAlert(const lt::torrent_paused_alert *p);
void handleTorrentResumedAlert(const lt::torrent_resumed_alert *p);
bool isMoveInProgress() const;
void setAutoManaged(bool enable);
@@ -314,7 +307,7 @@ namespace BitTorrent
void manageActualFilePaths();
void applyFirstLastPiecePriority(bool enabled);
void prepareResumeData(const lt::add_torrent_params &params);
void prepareResumeData(lt::add_torrent_params resumeData);
void endReceivedMetadataHandling(const Path &savePath, const PathList &fileNames);
void reload();