diff ui/downloader.h @ 54:09cd242d8443

Split out Header parsing into it's own function
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 17 Mar 2014 14:48:05 +0000
parents c6125d73faf4
children 17e1c8f37d72
line wrap: on
line diff
--- a/ui/downloader.h	Mon Mar 17 14:47:18 2014 +0000
+++ b/ui/downloader.h	Mon Mar 17 14:48:05 2014 +0000
@@ -99,6 +99,17 @@
      */
     bool downloadFile(const QString &resource, const QString &filename,
                       size_t maxSize);
+    /**
+     * @brief parses the Headers of a repsonse.
+     *
+     * This removes the headers from the byte array passed as
+     * parameter.
+     *
+     * @param[inout] data: The response to parse.
+     *
+     * @returns: A map of the header fields. Or an empty map on error.
+     */
+    QMap<QString, QString> parseHeaders(QByteArray *data);
 
 Q_SIGNALS:
     /**

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