win32/gwinhttpvfs.c win32/gwinhttpvfs.h win32/gwinhttpfile.c

2008-08-13  Tor Lillqvist  <tml@novell.com>

	* win32/gwinhttpvfs.c
	* win32/gwinhttpvfs.h
	* win32/gwinhttpfile.c
	* win32/gwinhttpfileinputstream.c
	* win32/gwinhttpfileoutputstream.c: Refactor some common code
	snippets into helper functions. Check HTTP response status
	codes. Implement g_winhttp_file_query_info(), looking at
	Content-Length, Content-Type and Last-Modified.

	* win32/winhttp.h: Add some symbolic constants that are not
	publicly documented. Just a handful, so it should be OK to use
	information from the Windows SDK's headers.


svn path=/trunk/; revision=7350
This commit is contained in:
Tor Lillqvist
2008-08-13 19:39:49 +00:00
committed by Tor Lillqvist
parent d303e31605
commit d5863830ad
7 changed files with 439 additions and 106 deletions

View File

@@ -229,6 +229,18 @@ BOOL WINAPI WinHttpWriteData(HINTERNET,LPCVOID,DWORD,LPDWORD);
#define ICU_ESCAPE 0x80000000
#define ICU_DECODE 0x10000000
/* A few constants I couldn't find publicly documented, so I looked up
* their value from the Windows SDK <winhttp.h>. Presumably this falls
* under fair use.
*/
#define WINHTTP_QUERY_CONTENT_LENGTH 5
#define WINHTTP_QUERY_CONTENT_TYPE 1
#define WINHTTP_QUERY_LAST_MODIFIED 11
#define WINHTTP_QUERY_STATUS_CODE 19
#define WINHTTP_QUERY_STATUS_TEXT 20
#define WINHTTP_QUERY_FLAG_SYSTEMTIME 0x40000000
#ifdef __cplusplus
}
#endif