comparison ui/downloader_win.cpp @ 27:62cd56cea09b

Start on polarssl Downloader. This breaks the windows build for now
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 12 Mar 2014 16:15:52 +0100
parents 7d07d261b003
children 17e1c8f37d72
comparison
equal deleted inserted replaced
26:cbd57d767dfa 27:62cd56cea09b
25 25
26 #define DEBUG if (1) qDebug() << __PRETTY_FUNCTION__ 26 #define DEBUG if (1) qDebug() << __PRETTY_FUNCTION__
27 27
28 #define MAX_SW_SIZE 10485760 28 #define MAX_SW_SIZE 10485760
29 #define MAX_LIST_SIZE 1048576 29 #define MAX_LIST_SIZE 1048576
30 /** @brief Download a file from the Internet
31 *
32 * @param[in] HSession the session to work in.
33 * @param[in] HConnect the connection to use.
34 * @param[in] resource the resource to download.
35 * @param[in] filename where the file should be saved.
36 * @param[in] maxSize maximum amount of bytes to download
37 *
38 * @returns True if the download was successful.
39 */
40 bool downloadFile(HINTERNET hSession, HINTERNET hConnect,
41 LPCWSTR resource, const QString &filename, DWORD maxSize);
42
43 /** @brief get the last modified header of a resource.
44 *
45 * On error call getLastError to get extended error information.
46 * This function still does not do any networking but only initializes
47 * it.
48 *
49 * @param[in] HSession the session to work in.
50 * @param[in] HConnect the connection to use.
51 * @param[in] resource the resource to check the last-modified date on
52 *
53 * @returns the last modified date or a null datetime in case of errors
54 */
55 QDateTime getLastModifiedHeader(HINTERNET hSession,
56 HINTERNET hConnect, LPCWSTR resource);
57
58 /** @brief verify that the certificate of the request matches
59 *
60 * Validates the certificate against the member variable certificate
61 *
62 * @param[in] hRequest: The request from which to get the certificate
63 *
64 * @returns True if the certificate exactly matches the one in hRequest
65 */
66
67 bool verifyCertificate(HINTERNET hRequest);
30 68
31 69
32 #define LIST_RESOURCE "/incoming/aheinecke/test" 70 #define LIST_RESOURCE "/incoming/aheinecke/test"
33 #define SW_RESOURCE "/incoming/aheinecke/test" 71 #define SW_RESOURCE "/incoming/aheinecke/test"
34 72

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