[2/2] wininet: Add a skeleton winineti.h header with fixed prototypes for [GS]etUrlCacheConfigInfo*(), DeleteIE3Cache() and IsUrlCacheEntryExpired*().

Francois Gouget fgouget at free.fr
Thu Aug 9 03:38:07 CDT 2007


Remove SetUrlCacheConfigInfo*() from wininet.h, it's supposed to be declared in winineti.h.
Update win32.api to fix the winapi_check warnings.
---

And since the conflict with openssl/ssl.h has been fixed in the previous 
patch, this time winineti.h (and thus -> schannel.h -> wincrypt.h) can 
be included anywhere.


 dlls/wininet/internet.c |    5 +-
 dlls/wininet/urlcache.c |   31 +++++++-------
 include/Makefile.in     |    1 +
 include/wininet.h       |    4 --
 include/winineti.h      |  108 +++++++++++++++++++++++++++++++++++++++++++++++
 tools/winapi/win32.api  |    8 ++--
 6 files changed, 131 insertions(+), 26 deletions(-)
 create mode 100644 include/winineti.h

diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 6c14031..b343e77 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -53,6 +53,7 @@
 #include "winreg.h"
 #include "winuser.h"
 #include "wininet.h"
+#include "winineti.h"
 #include "winnls.h"
 #include "wine/debug.h"
 #include "winerror.h"
@@ -3916,8 +3917,8 @@ BOOL WINAPI ResumeSuspendedDownload( HINTERNET hInternet, DWORD dwError )
     return FALSE;
 }
 
-DWORD WINAPI InternetQueryFortezzaStatus(void *a, DWORD b)
+BOOL WINAPI InternetQueryFortezzaStatus(DWORD *a, DWORD_PTR b)
 {
-    FIXME("(%p, %08x) stub\n", a, b);
+    FIXME("(%p, %08lx) stub\n", a, b);
     return 0;
 }
diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c
index 5f6ac8d..2692dfe 100644
--- a/dlls/wininet/urlcache.c
+++ b/dlls/wininet/urlcache.c
@@ -38,6 +38,7 @@
 #include "winbase.h"
 #include "winuser.h"
 #include "wininet.h"
+#include "winineti.h"
 #include "winerror.h"
 #include "internet.h"
 #include "winreg.h"
@@ -2800,7 +2801,7 @@ BOOL WINAPI SetUrlCacheEntryGroupW(LPCWSTR lpszUrlName, DWORD dwFlags,
 /***********************************************************************
  *           GetUrlCacheConfigInfoW (WININET.@)
  */
-BOOL WINAPI GetUrlCacheConfigInfoW(LPDWORD CacheInfo, LPDWORD size, DWORD bitmask)
+BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW CacheInfo, LPDWORD size, DWORD bitmask)
 {
     FIXME("(%p, %p, %x)\n", CacheInfo, size, bitmask);
     INTERNET_SetLastError(ERROR_INVALID_PARAMETER);
@@ -2812,7 +2813,7 @@ BOOL WINAPI GetUrlCacheConfigInfoW(LPDWORD CacheInfo, LPDWORD size, DWORD bitmas
  *
  * CacheInfo is some CACHE_CONFIG_INFO structure, with no MS info found by google
  */
-BOOL WINAPI GetUrlCacheConfigInfoA(LPDWORD CacheInfo, LPDWORD size, DWORD bitmask)
+BOOL WINAPI GetUrlCacheConfigInfoA(LPINTERNET_CACHE_CONFIG_INFOA CacheInfo, LPDWORD size, DWORD bitmask)
 {
     FIXME("(%p, %p, %x)\n", CacheInfo, size, bitmask);
     INTERNET_SetLastError(ERROR_INVALID_PARAMETER);
@@ -2855,13 +2856,13 @@ BOOL WINAPI SetUrlCacheGroupAttributeW( GROUPID gid, DWORD dwFlags, DWORD dwAttr
     return TRUE;
 }
 
-BOOL WINAPI SetUrlCacheConfigInfoA( LPDWORD lpCacheConfigInfo, DWORD dwFieldControl )
+BOOL WINAPI SetUrlCacheConfigInfoA( LPINTERNET_CACHE_CONFIG_INFOA lpCacheConfigInfo, DWORD dwFieldControl )
 {
     FIXME("(%p, 0x%08x) stub\n", lpCacheConfigInfo, dwFieldControl);
     return TRUE;
 }
 
-BOOL WINAPI SetUrlCacheConfigInfoW( LPDWORD lpCacheConfigInfo, DWORD dwFieldControl )
+BOOL WINAPI SetUrlCacheConfigInfoW( LPINTERNET_CACHE_CONFIG_INFOW lpCacheConfigInfo, DWORD dwFieldControl )
 {
     FIXME("(%p, 0x%08x) stub\n", lpCacheConfigInfo, dwFieldControl);
     return TRUE;
@@ -2877,13 +2878,11 @@ BOOL WINAPI SetUrlCacheConfigInfoW( LPDWORD lpCacheConfigInfo, DWORD dwFieldCont
  *   hInst       [I] Instance of process calling the function.
  *   lpszCmdLine [I] Options used by function.
  *   nCmdShow    [I] The nCmdShow value to use when showing windows created, if any.
- *
- * RETURNS
- *   nothing
  */
-void WINAPI DeleteIE3Cache(HWND hWnd, HINSTANCE hInst, LPSTR lpszCmdLine, int nCmdShow)
+DWORD WINAPI DeleteIE3Cache(HWND hWnd, HINSTANCE hInst, LPSTR lpszCmdLine, int nCmdShow)
 {
     FIXME("(%p, %p, %s, %d)\n", hWnd, hInst, debugstr_a(lpszCmdLine), nCmdShow);
+    return 0;
 }
 
 /***********************************************************************
@@ -2891,12 +2890,12 @@ void WINAPI DeleteIE3Cache(HWND hWnd, HINSTANCE hInst, LPSTR lpszCmdLine, int nC
  *
  * PARAMS
  *   url        [I]    Url
- *   b                 Unknown
- *   c                 Unknown ptr
+ *   dwFlags           Unknown
+ *   pftLastModified   Unknown ptr
  */
-DWORD WINAPI IsUrlCacheEntryExpiredA( LPCSTR url, DWORD b, void *c )
+BOOL WINAPI IsUrlCacheEntryExpiredA( LPCSTR url, DWORD dwFlags, FILETIME* pftLastModified )
 {
-    FIXME("(%s, %08x, %p) stub\n", debugstr_a(url), b, c);
+    FIXME("(%s, %08x, %p) stub\n", debugstr_a(url), dwFlags, pftLastModified);
     return FALSE;
 }
 
@@ -2905,11 +2904,11 @@ DWORD WINAPI IsUrlCacheEntryExpiredA( LPCSTR url, DWORD b, void *c )
  *
  * PARAMS
  *   url        [I]    Url
- *   b                 Unknown
- *   c                 Unknown ptr
+ *   dwFlags           Unknown
+ *   pftLastModified   Unknown ptr
  */
-DWORD WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD b, void *c )
+BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLastModified )
 {
-    FIXME("(%s, %08x, %p) stub\n", debugstr_w(url), b, c);
+    FIXME("(%s, %08x, %p) stub\n", debugstr_w(url), dwFlags, pftLastModified);
     return FALSE;
 }
diff --git a/include/Makefile.in b/include/Makefile.in
index 6c3a31d..00c0a7b 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -370,6 +370,7 @@ SRCDIR_INCLUDES = \
 	winerror.h \
 	wingdi.h \
 	wininet.h \
+	winineti.h \
 	winioctl.h \
 	winldap.h \
 	winnetwk.h \
diff --git a/include/wininet.h b/include/wininet.h
index 56973d7..12e6c44 100644
--- a/include/wininet.h
+++ b/include/wininet.h
@@ -1460,10 +1460,6 @@ BOOLAPI RetrieveUrlCacheEntryFileA(LPCSTR ,LPINTERNET_CACHE_ENTRY_INFOA ,LPDWORD
 BOOLAPI RetrieveUrlCacheEntryFileW(LPCWSTR ,LPINTERNET_CACHE_ENTRY_INFOW ,LPDWORD ,DWORD);
 #define RetrieveUrlCacheEntryFile  WINELIB_NAME_AW(RetrieveUrlCacheEntryFile)
 
-BOOLAPI SetUrlCacheConfigInfoA(LPDWORD,DWORD);
-BOOLAPI SetUrlCacheConfigInfoW(LPDWORD,DWORD);
-#define SetUrlCacheConfigInfo  WINELIB_NAME_AW(SetUrlCacheConfigInfo)
-
 BOOLAPI UnlockUrlCacheEntryFileA(LPCSTR ,DWORD);
 BOOLAPI UnlockUrlCacheEntryFileW(LPCWSTR ,DWORD);
 #define UnlockUrlCacheEntryFile  WINELIB_NAME_AW(UnlockUrlCacheEntryFile)
diff --git a/include/winineti.h b/include/winineti.h
new file mode 100644
index 0000000..98cba3b
--- /dev/null
+++ b/include/winineti.h
@@ -0,0 +1,108 @@
+/*
+ * 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_WININETI_H_
+#define _WINE_WININETI_H_
+
+/* FIXME: #include <iedial.h> */
+#include <schannel.h>
+
+typedef struct _INTERNET_CACHE_CONFIG_PATH_ENTRYA
+{
+    CHAR CachePath[MAX_PATH];
+    DWORD dwCacheSize;
+} INTERNET_CACHE_CONFIG_PATH_ENTRYA, *LPINTERNET_CACHE_CONFIG_PATH_ENTRYA;
+
+typedef struct _INTERNET_CACHE_CONFIG_PATH_ENTRYW
+{
+    WCHAR CachePath[MAX_PATH];
+    DWORD dwCacheSize;
+} INTERNET_CACHE_CONFIG_PATH_ENTRYW, *LPINTERNET_CACHE_CONFIG_PATH_ENTRYW;
+
+DECL_WINELIB_TYPE_AW(INTERNET_CACHE_CONFIG_PATH_ENTRY)
+DECL_WINELIB_TYPE_AW(LPINTERNET_CACHE_CONFIG_PATH_ENTRY)
+
+typedef struct _INTERNET_CACHE_CONFIG_INFOA
+{
+    DWORD dwStructSize;
+    DWORD dwContainer;
+    DWORD dwQuota;
+    DWORD dwReserved4;
+    BOOL fPerUser;
+    DWORD dwSyncMode;
+    DWORD dwNumCachePaths;
+    union
+    {
+        struct
+        {
+            CHAR CachePath[MAX_PATH];
+            DWORD dwCacheSize;
+        } DUMMYSTRUCTNAME;
+        INTERNET_CACHE_CONFIG_PATH_ENTRYA CachePaths[ANYSIZE_ARRAY];
+    } DUMYUNIONNAME;
+    DWORD dwNormalUsage;
+    DWORD dwExemptUsage;
+} INTERNET_CACHE_CONFIG_INFOA, *LPINTERNET_CACHE_CONFIG_INFOA;
+
+typedef struct _INTERNET_CACHE_CONFIG_INFOW
+{
+    DWORD dwStructSize;
+    DWORD dwContainer;
+    DWORD dwQuota;
+    DWORD dwReserved4;
+    BOOL  fPerUser;
+    DWORD dwSyncMode;
+    DWORD dwNumCachePaths;
+    union
+    {
+        struct
+        {
+            WCHAR CachePath[MAX_PATH];
+            DWORD dwCacheSize;
+        } DUMMYSTRUCTNAME;
+        INTERNET_CACHE_CONFIG_PATH_ENTRYW CachePaths[ANYSIZE_ARRAY];
+    } ;
+    DWORD dwNormalUsage;
+    DWORD dwExemptUsage;
+} INTERNET_CACHE_CONFIG_INFOW, *LPINTERNET_CACHE_CONFIG_INFOW;
+
+DECL_WINELIB_TYPE_AW(INTERNET_CACHE_CONFIG_INFO)
+DECL_WINELIB_TYPE_AW(LPINTERNET_CACHE_CONFIG_INFO)
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DWORD       WINAPI DeleteIE3Cache(HWND,HINSTANCE,LPSTR,int);
+BOOL        WINAPI GetUrlCacheConfigInfoA(LPINTERNET_CACHE_CONFIG_INFOA,LPDWORD,DWORD);
+BOOL        WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW,LPDWORD,DWORD);
+#define     GetUrlCacheConfigInfo WINELIB_NAME_AW(GetUrlCacheConfigInfo)
+BOOL        WINAPI InternetQueryFortezzaStatus(DWORD*,DWORD_PTR);
+BOOL        WINAPI IsUrlCacheEntryExpiredA(LPCSTR,DWORD,FILETIME*);
+BOOL        WINAPI IsUrlCacheEntryExpiredW(LPCWSTR,DWORD,FILETIME*);
+#define     IsUrlCacheEntryExpired WINELIB_NAME_AW(IsUrlCacheEntryExpired)
+BOOL        WINAPI SetUrlCacheConfigInfoA(LPINTERNET_CACHE_CONFIG_INFOA,DWORD);
+BOOL        WINAPI SetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW,DWORD);
+#define     SetUrlCacheConfigInfo WINELIB_NAME_AW(SetUrlCacheConfigInfo)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINE_WININETI_H_ */
diff --git a/tools/winapi/win32.api b/tools/winapi/win32.api
index 0d36800..3fd950d 100644
--- a/tools/winapi/win32.api
+++ b/tools/winapi/win32.api
@@ -5606,6 +5606,8 @@ FILETIME
 
 %ptr
 
+DWORD *
+FILETIME *
 GOPHER_ATTRIBUTE_ENUMERATORA
 GOPHER_ATTRIBUTE_ENUMERATORW
 GROUPID *
@@ -5621,6 +5623,8 @@ LPGOPHER_FIND_DATAA
 LPGOPHER_FIND_DATAW
 LPINTERNET_BUFFERSA
 LPINTERNET_BUFFERSW
+LPINTERNET_CACHE_CONFIG_INFOA
+LPINTERNET_CACHE_CONFIG_INFOW
 LPINTERNET_CACHE_ENTRY_INFOA
 LPINTERNET_CACHE_ENTRY_INFOW
 LPINTERNET_CACHE_GROUP_INFOA
@@ -5641,10 +5645,6 @@ unsigned long *
 LPCSTR
 LPSTR
 
-%void
-
-void
-
 %wstr
 
 LPCWSTR
-- 
1.5.2.4




More information about the wine-patches mailing list