Add td_api::updateFileRemovedFromDownloads.
This commit is contained in:
parent
f993bebc2f
commit
9ead1f0b34
@ -106,6 +106,7 @@ class DownloadManagerImpl final : public DownloadManager {
|
||||
|
||||
remove_from_db(file_info);
|
||||
files_.erase(file_info.download_id);
|
||||
callback_->update_file_removed(file_id);
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,7 @@ class DownloadManager : public Actor {
|
||||
public:
|
||||
virtual ~Callback() = default;
|
||||
virtual void update_counters(Counters counters) = 0;
|
||||
virtual void update_file_removed(FileId file_id) = 0;
|
||||
virtual void start_file(FileId file_id, int8 priority) = 0;
|
||||
virtual void pause_file(FileId file_id) = 0;
|
||||
virtual void delete_file(FileId file_id) = 0;
|
||||
|
@ -3980,6 +3980,10 @@ void Td::init_managers() {
|
||||
void update_counters(DownloadManager::Counters counters) final {
|
||||
send_closure(G()->td(), &Td::send_update, counters.get_update_file_downloads_object());
|
||||
}
|
||||
void update_file_removed(FileId file_id) final {
|
||||
send_closure(G()->td(), &Td::send_update,
|
||||
td_api::make_object<td_api::updateFileRemovedFromDownloads>(file_id.get()));
|
||||
}
|
||||
void start_file(FileId file_id, int8 priority) final {
|
||||
send_closure(G()->file_manager(), &FileManager::download, file_id, make_download_file_callback(), priority,
|
||||
FileManager::KEEP_DOWNLOAD_OFFSET, FileManager::IGNORE_DOWNLOAD_LIMIT);
|
||||
|
Loading…
Reference in New Issue
Block a user