5#ifndef MOLYBDEN_DOWNLOAD_EVENTS_HPP
6#define MOLYBDEN_DOWNLOAD_EVENTS_HPP
10#include "molybden/base/event.hpp"
39enum class DownloadInterruptReason {
93 kFileSecurityCheckFailed,
124 kNetworkDisconnected,
140 kNetworkInvalidRequest,
184 kServerContentLengthMismatch,
A class that contains all download events.
Definition download_events.hpp:261
Event< DownloadCanceled > onDownloadCanceled
Invoked when the download has been canceled.
Definition download_events.hpp:283
Event< DownloadPaused > onDownloadPaused
Invoked when the download has been paused.
Definition download_events.hpp:305
Event< DownloadUpdated > onDownloadUpdated
Invoked when the download has been updated.
Definition download_events.hpp:316
Event< DownloadInterrupted > onDownloadInterrupted
Invoked when the download has been interrupted.
Definition download_events.hpp:294
Event< DownloadFinished > onDownloadFinished
Invoked when the download has been finished.
Definition download_events.hpp:272
Events allow you to be notified when something happens in Molybden.
Definition event.hpp:25
The DownloadEvents::onDownloadCanceled event arguments.
Definition download_events.hpp:29
std::shared_ptr< Download > download
The download instance initiated this event.
Definition download_events.hpp:33
The DownloadEvents::onDownloadFinished event arguments.
Definition download_events.hpp:19
std::shared_ptr< Download > download
The download instance initiated this event.
Definition download_events.hpp:23
The DownloadEvents::onDownloadInterrupted event arguments.
Definition download_events.hpp:205
DownloadInterruptReason reason
The interrupt reason of this download.
Definition download_events.hpp:214
std::shared_ptr< Download > download
The download instance initiated this event.
Definition download_events.hpp:209
The DownloadEvents::onDownloadPaused event arguments.
Definition download_events.hpp:220
std::shared_ptr< Download > download
The download instance initiated this event.
Definition download_events.hpp:224
The DownloadEvents::onDownloadUpdated event arguments.
Definition download_events.hpp:230
int percent_complete
The rough percent complete.
Definition download_events.hpp:255
std::shared_ptr< Download > download
The download instance initiated this event.
Definition download_events.hpp:234
int64_t total_bytes
The total size of the downloaded file in bytes.
Definition download_events.hpp:244
int64_t received_bytes
The number or received (downloaded) bytes.
Definition download_events.hpp:249
int64_t current_speed
The current download speed estimate in bytes/second.
Definition download_events.hpp:239