| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/network-web/downloadmanager.h`/ |
| 2 | |
| 3 | #ifndef DOWNLOADMANAGER_H |
| 4 | #define DOWNLOADMANAGER_Hcxx . . $ `src/librssguard/network-web/downloadmanager.h:4:9`! |
| 5 | |
| 6 | #include "gui/tabcontent.h"cxx . . $ `<file>/src/librssguard/gui/tabcontent.h`/ |
| 7 | |
| 8 | #include <QAbstractListModel> |
| 9 | #include <QDateTime> |
| 10 | #include <QElapsedTimer> |
| 11 | #include <QFile> |
| 12 | #include <QNetworkReply> |
| 13 | |
| 14 | class AutoSavercxx . . $ AutoSaver#; |
| 15 | class DownloadModelcxx . . $ DownloadModel#; |
| 16 | class QFileIconProvidercxx . . $ QFileIconProvider#; |
| 17 | class QMimeDatacxx . . $ QMimeData#; |
| 18 | |
| 19 | namespace Uicxx . . $ Ui/ { |
| 20 | class DownloadItemcxx . . $ Ui/DownloadItem#; |
| 21 | } |
| 22 | |
| 23 | namespace Uicxx . . $ Ui/ { |
| 24 | class DownloadManagercxx . . $ Ui/DownloadManager#; |
| 25 | } |
| 26 | |
| 27 | class RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! DownloadItemcxx . . $ DownloadItem# : public QWidgetcxx . . $ QWidget# { |
| 28 | Q_OBJECTcxx . . $ QMetaObject#Call# |
| 29 | |
| 30 | friend class DownloadManagercxx . . $ DownloadManager#; |
| 31 | friend class DownloadModelcxx . . $ DownloadModel#; |
| 32 | |
| 33 | public: |
| 34 | explicit DownloadItemcxx . . $ DownloadItem#DownloadItem(576202a375d04f7d).(QNetworkReplycxx . . $ QNetworkReply#* reply = nullptr, |
| 35 | const QStringcxx . . $ QString#& preferred_file_name =cxx . . $ QString#QString(ced63f7c635d850d). {}, |
| 36 | const stdcxx . . $ std/::functioncxx . . $ std/function#<void(DownloadItemcxx . . $ DownloadItem#*)>& run_on_finish =cxx . . $ std/function#function(ced63f7c635d850d). {}, |
| 37 | QWidgetcxx . . $ QWidget#* parent = nullptr); |
| 38 | virtual ~cxx . . $ DownloadItem#`~DownloadItem`(ced63f7c635d850d).DownloadItemcxx . . $ DownloadItem#(); |
| 39 | |
| 40 | bool downloadingcxx . . $ DownloadItem#downloading(50ce9a9e25b4a850).() const; |
| 41 | bool downloadedSuccessfullycxx . . $ DownloadItem#downloadedSuccessfully(50ce9a9e25b4a850).() const; |
| 42 | |
| 43 | qint64cxx . . $ qint64# bytesTotalcxx . . $ DownloadItem#bytesTotal(98833e9ab7de59a4).() const; |
| 44 | qint64cxx . . $ qint64# bytesReceivedcxx . . $ DownloadItem#bytesReceived(98833e9ab7de59a4).() const; |
| 45 | double remainingTimecxx . . $ DownloadItem#remainingTime(21b6c25e127938e2).() const; |
| 46 | double currentSpeedcxx . . $ DownloadItem#currentSpeed(21b6c25e127938e2).() const; |
| 47 | const QFilecxx . . $ QFile#& outputcxx . . $ DownloadItem#output(32503c22158a31ab).() const; |
| 48 | |
| 49 | private slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 50 | void stopcxx . . $ DownloadItem#stop(49f6e7a06ebc5aa8).(); |
| 51 | void tryAgaincxx . . $ DownloadItem#tryAgain(49f6e7a06ebc5aa8).(); |
| 52 | void openFilecxx . . $ DownloadItem#openFile(49f6e7a06ebc5aa8).(); |
| 53 | void openFoldercxx . . $ DownloadItem#openFolder(49f6e7a06ebc5aa8).(); |
| 54 | |
| 55 | void downloadReadyReadcxx . . $ DownloadItem#downloadReadyRead(49f6e7a06ebc5aa8).(); |
| 56 | void errorcxx . . $ DownloadItem#error(5272ddc769b2e651).(QNetworkReplycxx . . $ QNetworkReply#::NetworkErrorcxx . . $ QNetworkReply#NetworkError# code); |
| 57 | void downloadProgresscxx . . $ DownloadItem#downloadProgress(8be204668a5c1685).(qint64cxx . . $ qint64# bytes_received, qint64cxx . . $ qint64# bytes_total); |
| 58 | void metaDataChangedcxx . . $ DownloadItem#metaDataChanged(49f6e7a06ebc5aa8).(); |
| 59 | void finishedcxx . . $ DownloadItem#finished(49f6e7a06ebc5aa8).(); |
| 60 | |
| 61 | signalscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:43:14`!: |
| 62 | void statusChangedcxx . . $ DownloadItem#statusChanged(49f6e7a06ebc5aa8).(); |
| 63 | void progresscxx . . $ DownloadItem#progress(8be204668a5c1685).(qint64cxx . . $ qint64# bytes_received, qint64cxx . . $ qint64# bytes_total); |
| 64 | void downloadFinishedcxx . . $ DownloadItem#downloadFinished(49f6e7a06ebc5aa8).(); |
| 65 | |
| 66 | private: |
| 67 | void updateInfoAndUrlLabelcxx . . $ DownloadItem#updateInfoAndUrlLabel(49f6e7a06ebc5aa8).(); |
| 68 | void getFileNamecxx . . $ DownloadItem#getFileName(49f6e7a06ebc5aa8).(); |
| 69 | void initcxx . . $ DownloadItem#init(49f6e7a06ebc5aa8).(); |
| 70 | void updateDownloadInfoLabelcxx . . $ DownloadItem#updateDownloadInfoLabel(49f6e7a06ebc5aa8).(); |
| 71 | QStringcxx . . $ QString# saveFileNamecxx . . $ DownloadItem#saveFileName(5555d9024dcf93fb).(const QStringcxx . . $ QString#& directory) const; |
| 72 | |
| 73 | Uicxx . . $ Ui/::DownloadItemcxx . . $ Ui/DownloadItem#* m_uicxx . . $ DownloadItem#m_ui.; |
| 74 | QUrlcxx . . $ QUrl# m_urlcxx . . $ DownloadItem#m_url.; |
| 75 | QFilecxx . . $ QFile# m_outputcxx . . $ DownloadItem#m_output.; |
| 76 | QNetworkReplycxx . . $ QNetworkReply#* m_replycxx . . $ DownloadItem#m_reply.; |
| 77 | QStringcxx . . $ QString# m_preferredFileNamecxx . . $ DownloadItem#m_preferredFileName.; |
| 78 | stdcxx . . $ std/::functioncxx . . $ std/function#<void(DownloadItemcxx . . $ DownloadItem#*)> m_runOnFinishcxx . . $ DownloadItem#m_runOnFinish.; |
| 79 | qint64cxx . . $ qint64# m_bytesReceivedcxx . . $ DownloadItem#m_bytesReceived.; |
| 80 | QElapsedTimercxx . . $ QElapsedTimer# m_downloadTimecxx . . $ DownloadItem#m_downloadTime.; |
| 81 | QTimecxx . . $ QTime# m_lastProgressTimecxx . . $ DownloadItem#m_lastProgressTime.; |
| 82 | bool m_requestFileNamecxx . . $ DownloadItem#m_requestFileName.; |
| 83 | bool m_startedSavingcxx . . $ DownloadItem#m_startedSaving.; |
| 84 | bool m_finishedDownloadingcxx . . $ DownloadItem#m_finishedDownloading.; |
| 85 | bool m_gettingFileNamecxx . . $ DownloadItem#m_gettingFileName.; |
| 86 | bool m_canceledFileSelectcxx . . $ DownloadItem#m_canceledFileSelect.; |
| 87 | }; |
| 88 | |
| 89 | class WebBrowsercxx . . $ WebBrowser#; |
| 90 | class SilentNetworkAccessManagercxx . . $ SilentNetworkAccessManager#; |
| 91 | |
| 92 | class RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! DownloadManagercxx . . $ DownloadManager# : public TabContentcxx . . $ TabContent# { |
| 93 | Q_OBJECTcxx . . $ DownloadManager#qt_staticMetaObjectRelocatingContent. |
| 94 | Q_PROPERTYcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:58:9`!(RemovePolicy removePolicy READ removePolicy WRITE setRemovePolicy NOTIFY removePolicyChanged) |
| 95 | |
| 96 | friend class DownloadModelcxx . . $ DownloadModel#; |
| 97 | |
| 98 | public: |
| 99 | enum class RemovePolicycxx . . $ DownloadManager#RemovePolicy# { |
| 100 | Nevercxx . . $ DownloadManager#RemovePolicy#Never., |
| 101 | OnExitcxx . . $ DownloadManager#RemovePolicy#OnExit., |
| 102 | OnSuccessfullDownloadcxx . . $ DownloadManager#RemovePolicy#OnSuccessfullDownload. |
| 103 | }; |
| 104 | |
| 105 | Q_ENUMcxx . . $ qt_getEnumName(9904b3f3a4323242).(RemovePolicy) |
| 106 | |
| 107 | explicit DownloadManagercxx . . $ DownloadManager#DownloadManager(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent = nullptr); |
| 108 | virtual ~cxx . . $ DownloadManager#`~DownloadManager`(ced63f7c635d850d).DownloadManagercxx . . $ DownloadManager#(); |
| 109 | |
| 110 | virtual WebBrowsercxx . . $ WebBrowser#* webBrowsercxx . . $ DownloadManager#webBrowser(eb265423c44e6400).() const; |
| 111 | |
| 112 | SilentNetworkAccessManagercxx . . $ SilentNetworkAccessManager#* networkManagercxx . . $ DownloadManager#networkManager(7f01183d3c0901fa).() const; |
| 113 | |
| 114 | int totalDownloadscxx . . $ DownloadManager#totalDownloads(455f465bc33b4cdf).() const; |
| 115 | int activeDownloadscxx . . $ DownloadManager#activeDownloads(455f465bc33b4cdf).() const; |
| 116 | int downloadProgresscxx . . $ DownloadManager#downloadProgress(455f465bc33b4cdf).() const; |
| 117 | |
| 118 | RemovePolicycxx . . $ DownloadManager#RemovePolicy# removePolicycxx . . $ DownloadManager#removePolicy(e63b99a0d9fabe98).() const; |
| 119 | void setRemovePolicycxx . . $ DownloadManager#setRemovePolicy(e285bcd5cafef979).(RemovePolicycxx . . $ DownloadManager#RemovePolicy# policy); |
| 120 | |
| 121 | void setDownloadDirectorycxx . . $ DownloadManager#setDownloadDirectory(3520e46b33348bf6).(const QStringcxx . . $ QString#& directory); |
| 122 | QStringcxx . . $ QString# downloadDirectorycxx . . $ DownloadManager#downloadDirectory(4365c3963150523e).(); |
| 123 | |
| 124 | static QStringcxx . . $ QString# timeStringcxx . . $ DownloadManager#timeString(d25daef7ecfdbcd3).(double time_remaining); |
| 125 | static QStringcxx . . $ QString# dataStringcxx . . $ DownloadManager#dataString(20e0a2766677f583).(qint64cxx . . $ qint64# size); |
| 126 | |
| 127 | public slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 128 | void downloadcxx . . $ DownloadManager#download(fd95f041e4857ee1).(const QNetworkRequestcxx . . $ QNetworkRequest#& request, |
| 129 | const QStringcxx . . $ QString#& preferred_file_name =cxx . . $ QString#QString(ced63f7c635d850d). {}, |
| 130 | const stdcxx . . $ std/::functioncxx . . $ std/function#<void(DownloadItemcxx . . $ DownloadItem#*)>& run_on_finish =cxx . . $ std/function#function(ced63f7c635d850d). {}); |
| 131 | void downloadcxx . . $ DownloadManager#download(37355d2f77053a23).(const QUrlcxx . . $ QUrl#& url); |
| 132 | void cleanupcxx . . $ DownloadManager#cleanup(49f6e7a06ebc5aa8).(); |
| 133 | |
| 134 | private slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 135 | void savecxx . . $ DownloadManager#save(83f5f38750778ac8).() const; |
| 136 | void loadcxx . . $ DownloadManager#load(49f6e7a06ebc5aa8).(); |
| 137 | |
| 138 | void updateRowcxx . . $ DownloadManager#updateRow(7e19e328a15a9e4f).(DownloadItemcxx . . $ DownloadItem#* item); |
| 139 | void updateRowcxx . . $ DownloadManager#updateRow(49f6e7a06ebc5aa8).(); |
| 140 | void itemProgresscxx . . $ DownloadManager#itemProgress(49f6e7a06ebc5aa8).(); |
| 141 | void itemFinishedcxx . . $ DownloadManager#itemFinished(49f6e7a06ebc5aa8).(); |
| 142 | |
| 143 | signalscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:43:14`!: |
| 144 | void removePolicyChangedcxx . . $ DownloadManager#removePolicyChanged(49f6e7a06ebc5aa8).(); |
| 145 | void downloadProgressedcxx . . $ DownloadManager#downloadProgressed(4b11a7293b4ed91c).(int progress, const QStringcxx . . $ QString#& description); |
| 146 | void downloadFinishedcxx . . $ DownloadManager#downloadFinished(49f6e7a06ebc5aa8).(); |
| 147 | |
| 148 | private: |
| 149 | void handleUnsupportedContentcxx . . $ DownloadManager#handleUnsupportedContent(c12be52dfbc5265e).(QNetworkReplycxx . . $ QNetworkReply#* reply, |
| 150 | const QStringcxx . . $ QString#& preferred_file_name, |
| 151 | const stdcxx . . $ std/::functioncxx . . $ std/function#<void(DownloadItemcxx . . $ DownloadItem#*)>& run_on_finish); |
| 152 | void addItemcxx . . $ DownloadManager#addItem(7e19e328a15a9e4f).(DownloadItemcxx . . $ DownloadItem#* item); |
| 153 | |
| 154 | QScopedPointercxx . . $ QScopedPointer#<Uicxx . . $ Ui/::DownloadManagercxx . . $ Ui/DownloadManager#> m_uicxx . . $ DownloadManager#m_ui.; |
| 155 | AutoSavercxx . . $ AutoSaver#* m_autoSavercxx . . $ DownloadManager#m_autoSaver.; |
| 156 | DownloadModelcxx . . $ DownloadModel#* m_modelcxx . . $ DownloadManager#m_model.; |
| 157 | SilentNetworkAccessManagercxx . . $ SilentNetworkAccessManager#* m_networkManagercxx . . $ DownloadManager#m_networkManager.; |
| 158 | QScopedPointercxx . . $ QScopedPointer#<QFileIconProvidercxx . . $ QFileIconProvider#> m_iconProvidercxx . . $ DownloadManager#m_iconProvider.; |
| 159 | QListcxx . . $ QList#<DownloadItemcxx . . $ DownloadItem#*> m_downloadscxx . . $ DownloadManager#m_downloads.; |
| 160 | RemovePolicycxx . . $ DownloadManager#RemovePolicy# m_removePolicycxx . . $ DownloadManager#m_removePolicy.; |
| 161 | QStringcxx . . $ QString# m_downloadDirectorycxx . . $ DownloadManager#m_downloadDirectory.; |
| 162 | }; |
| 163 | |
| 164 | inline WebBrowsercxx . . $ WebBrowser#* DownloadManagercxx . . $ DownloadManager#::webBrowsercxx . . $ DownloadManager#webBrowser(eb265423c44e6400).() const { |
| 165 | return nullptr; |
| 166 | } |
| 167 | |
| 168 | class DownloadModelcxx . . $ DownloadModel# : public QAbstractListModelcxx . . $ QAbstractListModel# { |
| 169 | Q_OBJECTcxx . . $ DownloadModel#qt_staticMetaObjectRelocatingContent. |
| 170 | |
| 171 | friend class DownloadManagercxx . . $ DownloadManager#; |
| 172 | |
| 173 | public: |
| 174 | explicit DownloadModelcxx . . $ DownloadModel#DownloadModel(30676a2113473e37).(DownloadManagercxx . . $ DownloadManager#* download_manager, QObjectcxx . . $ QObject#* parent = nullptr); |
| 175 | |
| 176 | virtual QVariantcxx . . $ QVariant# datacxx . . $ DownloadModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex#& index, int role = Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.) const; |
| 177 | virtual int rowCountcxx . . $ DownloadModel#rowCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex#& parent = QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()) const; |
| 178 | virtual bool removeRowscxx . . $ DownloadModel#removeRows(c4e00837c4ba3150).(int row, int count, const QModelIndexcxx . . $ QModelIndex#& parent = QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()); |
| 179 | virtual Qtcxx . . $ Qt/::ItemFlagscxx . . $ Qt/ItemFlags# flagscxx . . $ DownloadModel#flags(36b38c1b3d3f7b45).(const QModelIndexcxx . . $ QModelIndex#& index) const; |
| 180 | virtual QMimeDatacxx . . $ QMimeData#* mimeDatacxx . . $ DownloadModel#mimeData(8814472558f0ef9a).(const QModelIndexListcxx . . $ QModelIndexList#& indexes) const; |
| 181 | |
| 182 | private: |
| 183 | DownloadManagercxx . . $ DownloadManager#* m_downloadManagercxx . . $ DownloadModel#m_downloadManager.; |
| 184 | }; |
| 185 | |
| 186 | #endif // DOWNLOADMANAGER_H |