From 5b3d0b88788b5f9befb5c08472b9bdf00303377d Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 30 Aug 2007 16:17:31 +0200 Subject: [PATCH] winhttp: Add a skeleton winhttp.h and use it. --- dlls/winhttp/main.c | 3 +- include/Makefile.in | 1 + include/winhttp.h | 98 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 include/winhttp.h diff --git a/dlls/winhttp/main.c b/dlls/winhttp/main.c index 33864630ee3..163f57ebe26 100644 --- a/dlls/winhttp/main.c +++ b/dlls/winhttp/main.c @@ -20,10 +20,9 @@ #include -#define COBJMACROS - #include "windef.h" #include "winbase.h" +#include "winhttp.h" #include "wine/debug.h" diff --git a/include/Makefile.in b/include/Makefile.in index 3df3172ffa8..bc48cfe5707 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -370,6 +370,7 @@ SRCDIR_INCLUDES = \ wine/unicode.h \ winerror.h \ wingdi.h \ + winhttp.h \ wininet.h \ winineti.h \ winioctl.h \ diff --git a/include/winhttp.h b/include/winhttp.h new file mode 100644 index 00000000000..d0e1cf9f943 --- /dev/null +++ b/include/winhttp.h @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2007 Francois Gouget + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINHTTP_H +#define __WINE_WINHTTP_H + +#define WINHTTPAPI +#define BOOLAPI WINHTTPAPI BOOL WINAPI + + +typedef LPVOID HINTERNET; +typedef HINTERNET *LPHINTERNET; + +#define INTERNET_DEFAULT_PORT 0 +#define INTERNET_DEFAULT_HTTP_PORT 80 +#define INTERNET_DEFAULT_HTTPS_PORT 443 +typedef WORD INTERNET_PORT; +typedef INTERNET_PORT *LPINTERNET_PORT; + +#define INTERNET_SCHEME_HTTP 1 +#define INTERNET_SCHEME_HTTPS 2 +typedef int INTERNET_SCHEME, *LPINTERNET_SCHEME; + +typedef struct +{ + DWORD dwStructSize; + LPWSTR lpszScheme; + DWORD dwSchemeLength; + INTERNET_SCHEME nScheme; + LPWSTR lpszHostName; + DWORD dwHostNameLength; + INTERNET_PORT nPort; + LPWSTR lpszUserName; + DWORD dwUserNameLength; + LPWSTR lpszPassword; + DWORD dwPasswordLength; + LPWSTR lpszUrlPath; + DWORD dwUrlPathLength; + LPWSTR lpszExtraInfo; + DWORD dwExtraInfoLength; +} URL_COMPONENTS, *LPURL_COMPONENTS; +typedef URL_COMPONENTS URL_COMPONENTSW; +typedef LPURL_COMPONENTS LPURL_COMPONENTSW; + +typedef struct +{ + DWORD_PTR dwResult; + DWORD dwError; +} WINHTTP_ASYNC_RESULT, *LPWINHTTP_ASYNC_RESULT; + +typedef struct +{ + FILETIME ftExpiry; + FILETIME ftStart; + LPWSTR lpszSubjectInfo; + LPWSTR lpszIssuerInfo; + LPWSTR lpszProtocolName; + LPWSTR lpszSignatureAlgName; + LPWSTR lpszEncryptionAlgName; + DWORD dwKeySize; +} WINHTTP_CERTIFICATE_INFO; + +typedef struct +{ + DWORD dwAccessType; + LPCWSTR lpszProxy; + LPCWSTR lpszProxyBypass; +} WINHTTP_PROXY_INFO, *LPWINHTTP_PROXY_INFO; +typedef WINHTTP_PROXY_INFO WINHTTP_PROXY_INFOW; +typedef LPWINHTTP_PROXY_INFO LPWINHTTP_PROXY_INFOW; + + +#ifdef __cplusplus +extern "C" { +#endif + +BOOL WINAPI WinHttpCheckPlatform(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __WINE_WINHTTP_H */