wininet: Implement FindNextUrlCacheEntryW.

This commit is contained in:
Juan Lang 2011-03-07 11:22:43 -08:00 committed by Alexandre Julliard
parent 9cd7545c00
commit c4d628cb02
1 changed files with 29 additions and 14 deletions

View File

@ -3304,19 +3304,15 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern,
return pEntryHandle; return pEntryHandle;
} }
/*********************************************************************** static BOOL FindNextUrlCacheEntryInternal(
* FindNextUrlCacheEntryA (WININET.@)
*/
BOOL WINAPI FindNextUrlCacheEntryA(
HANDLE hEnumHandle, HANDLE hEnumHandle,
LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo, LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo,
LPDWORD lpdwNextCacheEntryInfoBufferSize) LPDWORD lpdwNextCacheEntryInfoBufferSize,
BOOL unicode)
{ {
URLCacheFindEntryHandle *pEntryHandle = (URLCacheFindEntryHandle *)hEnumHandle; URLCacheFindEntryHandle *pEntryHandle = (URLCacheFindEntryHandle *)hEnumHandle;
URLCACHECONTAINER * pContainer; URLCACHECONTAINER * pContainer;
TRACE("(%p, %p, %p)\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize);
if (pEntryHandle->dwMagic != URLCACHE_FIND_ENTRY_HANDLE_MAGIC) if (pEntryHandle->dwMagic != URLCACHE_FIND_ENTRY_HANDLE_MAGIC)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
@ -3354,8 +3350,10 @@ BOOL WINAPI FindNextUrlCacheEntryA(
continue; continue;
pUrlEntry = (const URL_CACHEFILE_ENTRY *)pEntry; pUrlEntry = (const URL_CACHEFILE_ENTRY *)pEntry;
TRACE("Found URL: %s\n", (LPCSTR)pUrlEntry + pUrlEntry->dwOffsetUrl); TRACE("Found URL: %s\n",
TRACE("Header info: %s\n", (LPCSTR)pUrlEntry + pUrlEntry->dwOffsetHeaderInfo); debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetUrl));
TRACE("Header info: %s\n",
debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetHeaderInfo));
error = URLCache_CopyEntry( error = URLCache_CopyEntry(
pContainer, pContainer,
@ -3363,14 +3361,15 @@ BOOL WINAPI FindNextUrlCacheEntryA(
lpNextCacheEntryInfo, lpNextCacheEntryInfo,
lpdwNextCacheEntryInfoBufferSize, lpdwNextCacheEntryInfoBufferSize,
pUrlEntry, pUrlEntry,
FALSE /* not UNICODE */); unicode);
if (error != ERROR_SUCCESS) if (error != ERROR_SUCCESS)
{ {
URLCacheContainer_UnlockIndex(pContainer, pHeader); URLCacheContainer_UnlockIndex(pContainer, pHeader);
SetLastError(error); SetLastError(error);
return FALSE; return FALSE;
} }
TRACE("Local File Name: %s\n", debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName)); TRACE("Local File Name: %s\n",
debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName));
/* increment the current index so that next time the function /* increment the current index so that next time the function
* is called the next entry is returned */ * is called the next entry is returned */
@ -3387,6 +3386,20 @@ BOOL WINAPI FindNextUrlCacheEntryA(
return FALSE; return FALSE;
} }
/***********************************************************************
* FindNextUrlCacheEntryA (WININET.@)
*/
BOOL WINAPI FindNextUrlCacheEntryA(
HANDLE hEnumHandle,
LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo,
LPDWORD lpdwNextCacheEntryInfoBufferSize)
{
TRACE("(%p, %p, %p)\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize);
return FindNextUrlCacheEntryInternal(hEnumHandle, lpNextCacheEntryInfo,
lpdwNextCacheEntryInfoBufferSize, FALSE /* not UNICODE */);
}
/*********************************************************************** /***********************************************************************
* FindNextUrlCacheEntryW (WININET.@) * FindNextUrlCacheEntryW (WININET.@)
*/ */
@ -3396,9 +3409,11 @@ BOOL WINAPI FindNextUrlCacheEntryW(
LPDWORD lpdwNextCacheEntryInfoBufferSize LPDWORD lpdwNextCacheEntryInfoBufferSize
) )
{ {
FIXME("(%p, %p, %p) stub\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize); TRACE("(%p, %p, %p)\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FindNextUrlCacheEntryInternal(hEnumHandle,
(LPINTERNET_CACHE_ENTRY_INFOA)lpNextCacheEntryInfo,
lpdwNextCacheEntryInfoBufferSize, TRUE /* UNICODE */);
} }
/*********************************************************************** /***********************************************************************