wininet: Implement IsUrlCacheEntryExpiredA.

This commit is contained in:
Juan Lang 2007-10-19 10:20:25 -07:00 committed by Alexandre Julliard
parent a6c252c122
commit 1594b429f8
1 changed files with 39 additions and 2 deletions

View File

@ -2894,8 +2894,45 @@ DWORD WINAPI DeleteIE3Cache(HWND hWnd, HINSTANCE hInst, LPSTR lpszCmdLine, int n
*/
BOOL WINAPI IsUrlCacheEntryExpiredA( LPCSTR url, DWORD dwFlags, FILETIME* pftLastModified )
{
FIXME("(%s, %08x, %p) stub\n", debugstr_a(url), dwFlags, pftLastModified);
return FALSE;
LPURLCACHE_HEADER pHeader;
CACHEFILE_ENTRY * pEntry;
URL_CACHEFILE_ENTRY * pUrlEntry;
URLCACHECONTAINER * pContainer;
TRACE("(%s, %08x, %p)\n", debugstr_a(url), dwFlags, pftLastModified);
if (!URLCacheContainers_FindContainerA(url, &pContainer))
return FALSE;
if (!URLCacheContainer_OpenIndex(pContainer))
return FALSE;
if (!(pHeader = URLCacheContainer_LockIndex(pContainer)))
return FALSE;
if (!URLCache_FindEntryInHash(pHeader, url, &pEntry))
{
URLCacheContainer_UnlockIndex(pContainer, pHeader);
TRACE("entry %s not found!\n", url);
SetLastError(ERROR_FILE_NOT_FOUND);
return FALSE;
}
if (pEntry->dwSignature != URL_SIGNATURE)
{
URLCacheContainer_UnlockIndex(pContainer, pHeader);
FIXME("Trying to retrieve entry of unknown format %s\n", debugstr_an((LPSTR)&pEntry->dwSignature, sizeof(DWORD)));
SetLastError(ERROR_FILE_NOT_FOUND);
return FALSE;
}
pUrlEntry = (URL_CACHEFILE_ENTRY *)pEntry;
DosDateTimeToFileTime(pUrlEntry->wExpiredDate, pUrlEntry->wExpiredTime, pftLastModified);
URLCacheContainer_UnlockIndex(pContainer, pHeader);
return TRUE;
}
/***********************************************************************