winhttp: Add a skeleton winhttp.h and use it.

Francois Gouget fgouget at free.fr
Thu Aug 30 09:17:31 CDT 2007


---

A lot of types look pretty similar to wininet.h ones...

 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 3386463..163f57e 100644
--- a/dlls/winhttp/main.c
+++ b/dlls/winhttp/main.c
@@ -20,10 +20,9 @@
 
 #include <stdarg.h>
 
-#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 3df3172..bc48cfe 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 0000000..d0e1cf9
--- /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 */
-- 
1.5.2.4




More information about the wine-patches mailing list