Molybden API
Loading...
Searching...
No Matches
download.hpp
1// Copyright (c) 2000-2024 TeamDev. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_DOWNLOAD_HPP
6#define MOLYBDEN_DOWNLOAD_HPP
7
8#include "molybden/download/download_events.hpp"
9
10namespace molybden {
11
19 std::string url;
20
24 std::string mime_type;
25
30};
31
35class Download : public DownloadEvents {
36 public:
40 virtual DownloadTarget target() = 0;
41
45 virtual bool isInProgress() = 0;
46
50 virtual bool isFinished() = 0;
51
55 virtual bool isCanceled() = 0;
56
60 virtual bool isInterrupted() = 0;
61
65 virtual bool isPaused() = 0;
66
71 virtual void pause() = 0;
72
76 virtual void resume() = 0;
77
82 virtual void cancel() = 0;
83};
84
85} // namespace molybden
86
87#endif // MOLYBDEN_DOWNLOAD_HPP
A class that contains all download events.
Definition download_events.hpp:261
A download activity.
Definition download.hpp:35
virtual void pause()=0
Pauses this download.
virtual bool isCanceled()=0
Indicates whether this download is cancelled.
virtual bool isInProgress()=0
Indicates whether this download is actively progressing.
virtual void resume()=0
Resumes this download.
virtual void cancel()=0
Cancels this download.
virtual bool isFinished()=0
Indicates whether this download is completely finished.
virtual DownloadTarget target()=0
Returns the download target.
virtual bool isInterrupted()=0
Indicates whether this download is interrupted.
virtual bool isPaused()=0
Indicates whether this download is paused.
The details of the download target.
Definition download.hpp:15
std::string suggested_file_name
The suggested download file name.
Definition download.hpp:29
std::string mime_type
The MIME type of the download.
Definition download.hpp:24
std::string url
The URL of the download.
Definition download.hpp:19