comparison ui/downloader.h @ 910:eaed02defe6a

More SSLConnection refactoring. Fixes curl downloader.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 18 Aug 2014 18:51:33 +0200
parents d1c951b3012d
children 2949f1842955
comparison
equal deleted inserted replaced
909:18e3ad073b38 910:eaed02defe6a
83 83
84 bool mDownloadSW; 84 bool mDownloadSW;
85 85
86 SSLConnection *mSSLConnection; 86 SSLConnection *mSSLConnection;
87 87
88 /** @brief get the last modified header of a resource.
89 *
90 * Connection should be established beforehand.
91 * Modifies the error state.
92 *
93 * @param[in] resource The resource to check
94 *
95 * @returns the last modified date or a null datetime in case of errors
96 */
97 QDateTime getLastModifiedHeader(const QString &resource);
98
99 /** @brief Download resource
100 *
101 * Download a resource with the established connection.
102 * Modifies the error state.
103 *
104 * @param[in] resource the resource to download
105 * @param[in] filename where the file should be saved.
106 * @param[in] maxSize maximum amount of bytes to download
107 *
108 * @returns True if the download was successful.
109 */
110 bool downloadFile(const QString &resource, const QString &filename,
111 size_t maxSize);
112 /**
113 * @brief parses the Headers of a repsonse.
114 *
115 * This removes the headers from the byte array passed as
116 * parameter.
117 *
118 * @param[inout] data: The response to parse.
119 *
120 * @returns: A map of the header fields. Or an empty map on error.
121 */
122 QMap<QString, QString> parseHeaders(QByteArray *data);
123
124 Q_SIGNALS: 88 Q_SIGNALS:
125 /** 89 /**
126 * @brief software update is available 90 * @brief software update is available
127 */ 91 */
128 void newSoftwareAvailable(const QString &fileName, 92 void newSoftwareAvailable(const QString &fileName,

http://wald.intevation.org/projects/trustbridge/