Remove FileLoader::get_callback().

This commit is contained in:
levlam 2024-07-12 15:35:49 +03:00
parent d5d9dabe7d
commit c1629cf597
5 changed files with 0 additions and 11 deletions

View File

@ -405,10 +405,6 @@ void FileDownloader::on_progress(Progress progress) {
} }
} }
FileLoader::Callback *FileDownloader::get_callback() {
return static_cast<FileLoader::Callback *>(callback_.get());
}
Status FileDownloader::process_check_query(NetQueryPtr net_query) { Status FileDownloader::process_check_query(NetQueryPtr net_query) {
has_hash_query_ = false; has_hash_query_ = false;
TRY_STATUS(check_net_query(net_query)); TRY_STATUS(check_net_query(net_query));

View File

@ -88,7 +88,6 @@ class FileDownloader final : public FileLoader {
int64 streaming_offset) final TD_WARN_UNUSED_RESULT; int64 streaming_offset) final TD_WARN_UNUSED_RESULT;
Result<size_t> process_part(Part part, NetQueryPtr net_query) final TD_WARN_UNUSED_RESULT; Result<size_t> process_part(Part part, NetQueryPtr net_query) final TD_WARN_UNUSED_RESULT;
void on_progress(Progress progress) final; void on_progress(Progress progress) final;
FileLoader::Callback *get_callback() final;
Status process_check_query(NetQueryPtr net_query) final; Status process_check_query(NetQueryPtr net_query) final;
Result<CheckInfo> check_loop(int64 checked_prefix_size, int64 ready_prefix_size, bool is_ready) final; Result<CheckInfo> check_loop(int64 checked_prefix_size, int64 ready_prefix_size, bool is_ready) final;
void add_hash_info(const std::vector<telegram_api::object_ptr<telegram_api::fileHash>> &hashes); void add_hash_info(const std::vector<telegram_api::object_ptr<telegram_api::fileHash>> &hashes);

View File

@ -83,7 +83,6 @@ class FileLoader : public FileLoaderActor {
int64 size{0}; int64 size{0};
}; };
virtual void on_progress(Progress progress) = 0; virtual void on_progress(Progress progress) = 0;
virtual Callback *get_callback() = 0;
virtual Result<PrefixInfo> on_update_local_location(const LocalFileLocation &location, virtual Result<PrefixInfo> on_update_local_location(const LocalFileLocation &location,
int64 file_size) TD_WARN_UNUSED_RESULT { int64 file_size) TD_WARN_UNUSED_RESULT {
return Status::Error("Unsupported"); return Status::Error("Unsupported");

View File

@ -324,10 +324,6 @@ void FileUploader::on_progress(Progress progress) {
} }
} }
FileLoader::Callback *FileUploader::get_callback() {
return static_cast<FileLoader::Callback *>(callback_.get());
}
void FileUploader::keep_fd_flag(bool keep_fd) { void FileUploader::keep_fd_flag(bool keep_fd) {
keep_fd_ = keep_fd; keep_fd_ = keep_fd;
try_release_fd(); try_release_fd();

View File

@ -68,7 +68,6 @@ class FileUploader final : public FileLoader {
int64 streaming_offset) final TD_WARN_UNUSED_RESULT; int64 streaming_offset) final TD_WARN_UNUSED_RESULT;
Result<size_t> process_part(Part part, NetQueryPtr net_query) final TD_WARN_UNUSED_RESULT; Result<size_t> process_part(Part part, NetQueryPtr net_query) final TD_WARN_UNUSED_RESULT;
void on_progress(Progress progress) final; void on_progress(Progress progress) final;
FileLoader::Callback *get_callback() final;
Result<PrefixInfo> on_update_local_location(const LocalFileLocation &location, Result<PrefixInfo> on_update_local_location(const LocalFileLocation &location,
int64 file_size) final TD_WARN_UNUSED_RESULT; int64 file_size) final TD_WARN_UNUSED_RESULT;