Mercurial > trustbridge
annotate ui/downloader.h @ 757:9bfaced5cf59
(issue56) Do not delete the certificate immediately
When the selection changed the remove cert is triggered by
a slection change event in the certificateitem. Deleting
it immediately would delete the trigger of the call.
Instead we deleteLater so that the widget get's cleaned up
in the next mainloop iteration when it is no longer needed.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 07 Jul 2014 12:54:02 +0200 |
parents | 5834b340c54c |
children | d1c951b3012d |
rev | line source |
---|---|
404 | 1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=2) | |
5 * and comes with ABSOLUTELY NO WARRANTY! | |
6 * See LICENSE.txt for details. | |
7 */ | |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 #ifndef DOWNLOADER_H |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 #define DOWNLOADER_H |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 /** |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 * @file downloader.h |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
12 * @brief High level API to download necessary data. |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
13 * |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 */ |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
15 |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
16 #include <QThread> |
45
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
17 #include <QDateTime> |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 #include <QString> |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
19 #include <QByteArray> |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
20 |
45
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
21 #include "sslconnection.h" |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
22 |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 class Downloader: public QThread |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 { |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
25 Q_OBJECT |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
27 public: |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 /** |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
29 * @brief Construct a downloader with a specific certificate |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 * |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
31 * The downloader will check the last-modified date of the |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
32 * certificate list / sw on the server at the specified url |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
33 * and download those accordingly. If newestSW or newestList is |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
34 * are valid datetimes only files modified after the respective date |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
35 * are downloaded. |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
36 * |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
37 * Downloaded files are placed in QStandardPaths::DataLocation |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
38 * |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
39 * @param[in] parent the parent object. |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
40 * @param[in] url the Url to download data from |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
41 * @param[in] certificate optional certificate to validate https connection |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
42 * @param[in] newestSW datetime after which software should be downloaded |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
43 * @param[in] newestList datetime after which the list should be downloaded |
45
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
44 * @param[in] resourceSW the path where the software is to be found |
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
45 * @param[in] resourceList the path where the list is to be found |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
46 */ |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
47 Downloader(QObject* parent, const QString& url, |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
48 const QByteArray& certificate = QByteArray(), |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
49 const QDateTime& newestSW = QDateTime(), |
45
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
50 const QDateTime& newestList = QDateTime(), |
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
51 const QString& resourceSW = QString(), |
460
f8bed9008362
Added switch to download new available software.
Raimund Renkert <rrenkert@intevation.de>
parents:
404
diff
changeset
|
52 const QString& resourceList = QString(), |
f8bed9008362
Added switch to download new available software.
Raimund Renkert <rrenkert@intevation.de>
parents:
404
diff
changeset
|
53 bool downloadSW = true); |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
54 |
27
62cd56cea09b
Start on polarssl Downloader.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
15
diff
changeset
|
55 ~Downloader(); |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
56 |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
57 /** |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
58 * @brief get the directory where the downloader saves data |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
59 * |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
60 * If the directory does not exist this function ensures that it |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
61 * is created. |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
62 * |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
63 * @returns The directory in which downloaded files are placed. |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
64 **/ |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
65 QString getDataDirectory(); |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
66 |
27
62cd56cea09b
Start on polarssl Downloader.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
15
diff
changeset
|
67 /** |
62cd56cea09b
Start on polarssl Downloader.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
15
diff
changeset
|
68 * @brief get the current error state |
62cd56cea09b
Start on polarssl Downloader.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
15
diff
changeset
|
69 * |
62cd56cea09b
Start on polarssl Downloader.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
15
diff
changeset
|
70 * @returns The current error state. |
62cd56cea09b
Start on polarssl Downloader.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
15
diff
changeset
|
71 **/ |
45
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
72 SSLConnection::ErrorCode getErrorState(); |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
73 |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
74 protected: |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
75 void run(); |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
76 |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
77 private: |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
78 QDateTime mLastModSW; |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
79 QDateTime mLastModList; |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
80 |
45
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
81 QString mResourceSW; |
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
82 QString mResourceList; |
27
62cd56cea09b
Start on polarssl Downloader.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
15
diff
changeset
|
83 |
460
f8bed9008362
Added switch to download new available software.
Raimund Renkert <rrenkert@intevation.de>
parents:
404
diff
changeset
|
84 bool mDownloadSW; |
f8bed9008362
Added switch to download new available software.
Raimund Renkert <rrenkert@intevation.de>
parents:
404
diff
changeset
|
85 |
45
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
86 SSLConnection mSSLConnection; |
32
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
87 |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
88 /** @brief get the last modified header of a resource. |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
89 * |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
90 * Connection should be established beforehand. |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
91 * Modifies the error state. |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
92 * |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
93 * @param[in] resource The resource to check |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
94 * |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
95 * @returns the last modified date or a null datetime in case of errors |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
96 */ |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
97 QDateTime getLastModifiedHeader(const QString &resource); |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
98 |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
99 /** @brief Download resource |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
100 * |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
101 * Download a resource with the established connection. |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
102 * Modifies the error state. |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
103 * |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
104 * @param[in] resource the resource to download |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
105 * @param[in] filename where the file should be saved. |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
106 * @param[in] maxSize maximum amount of bytes to download |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
107 * |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
108 * @returns True if the download was successful. |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
109 */ |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
110 bool downloadFile(const QString &resource, const QString &filename, |
d8e93fa1fc93
Downloader logic
Andre Heinecke <andre.heinecke@intevation.de>
parents:
27
diff
changeset
|
111 size_t maxSize); |
54
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
112 /** |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
113 * @brief parses the Headers of a repsonse. |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
114 * |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
115 * This removes the headers from the byte array passed as |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
116 * parameter. |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
117 * |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
118 * @param[inout] data: The response to parse. |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
119 * |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
120 * @returns: A map of the header fields. Or an empty map on error. |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
121 */ |
09cd242d8443
Split out Header parsing into it's own function
Andre Heinecke <aheinecke@intevation.de>
parents:
45
diff
changeset
|
122 QMap<QString, QString> parseHeaders(QByteArray *data); |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
123 |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
124 Q_SIGNALS: |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
125 /** |
15
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
126 * @brief software update is available |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
127 */ |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
128 void newSoftwareAvailable(const QString &fileName, |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
129 const QDateTime &lastMod); |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
130 |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
131 /** |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
132 * @brief new certificate list available |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
133 */ |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
134 void newListAvailable(const QString &fileName, const QDateTime &lastMod); |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
135 |
95e1b6edf2fc
Implement more downloader functionality for Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
10
diff
changeset
|
136 /** |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
137 * @brief Some progress has been made. |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
138 * |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
139 * @param[out] message: A message to show. Can be empty. |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
140 * @param[out] current: Value of current progress. |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
141 * @param[out] total: Total value of possible progress |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
142 */ |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
143 void progress(const QString &message, int current, int total); |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
144 |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
145 /** |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
146 * @brief An error happened |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
147 * |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
148 * @param[out] message: A message to show. Can be empty. |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
149 * @param[out] errorCode: ErrorCode of this error. |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
150 */ |
45
c6125d73faf4
Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents:
32
diff
changeset
|
151 void error(const QString &message, SSLConnection::ErrorCode error); |
485
5834b340c54c
Emit a signal for last modified date in downloader.
Raimund Renkert <rrenkert@intevation.de>
parents:
460
diff
changeset
|
152 |
5834b340c54c
Emit a signal for last modified date in downloader.
Raimund Renkert <rrenkert@intevation.de>
parents:
460
diff
changeset
|
153 /** |
5834b340c54c
Emit a signal for last modified date in downloader.
Raimund Renkert <rrenkert@intevation.de>
parents:
460
diff
changeset
|
154 * @brief Found the last modified date for software. |
5834b340c54c
Emit a signal for last modified date in downloader.
Raimund Renkert <rrenkert@intevation.de>
parents:
460
diff
changeset
|
155 * |
5834b340c54c
Emit a signal for last modified date in downloader.
Raimund Renkert <rrenkert@intevation.de>
parents:
460
diff
changeset
|
156 * @param[out] date The last modified date. |
5834b340c54c
Emit a signal for last modified date in downloader.
Raimund Renkert <rrenkert@intevation.de>
parents:
460
diff
changeset
|
157 */ |
5834b340c54c
Emit a signal for last modified date in downloader.
Raimund Renkert <rrenkert@intevation.de>
parents:
460
diff
changeset
|
158 void lastModifiedDate(const QDateTime &date); |
10
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
159 }; |
fe39d93f1261
Start on Downloader component
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
160 #endif |