ReactOS
0.4.14-dev-583-g2a1ba2c
|
#include "ws2tcpip.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wininet.h"
#include "winineti.h"
#include "winerror.h"
#include "winreg.h"
#include "shlwapi.h"
#include "shlobj.h"
#include "shellapi.h"
#include "internet.h"
#include "wine/unicode.h"
#include "wine/debug.h"
Go to the source code of this file.
Classes | |
struct | entry_header |
struct | entry_url |
struct | hash_entry |
struct | entry_hash_table |
struct | urlcache_header |
struct | urlcache_header::_directory_data |
struct | stream_handle |
struct | cache_container |
struct | find_handle |
Variables | |
static const char | urlcache_ver_prefix [] = "WINE URLCache Ver " |
static const char | urlcache_ver [] = "0.2012001" |
static struct list | UrlContainers = LIST_INIT(UrlContainers) |
BOOL | bDefaultContainersAdded = FALSE |
static HANDLE | free_cache_running |
static HANDLE | dll_unload_event |
#define ALLOCATION_TABLE_OFFSET 0x250 |
Definition at line 68 of file urlcache.c.
#define ALLOCATION_TABLE_SIZE (ENTRY_START_OFFSET - ALLOCATION_TABLE_OFFSET) |
Definition at line 69 of file urlcache.c.
#define BLOCKSIZE 128 |
Definition at line 64 of file urlcache.c.
#define CACHE_CONTAINER_NO_SUBDIR 0xFE |
Definition at line 84 of file urlcache.c.
#define CACHE_HEADER_DATA_ROOT_LEAK_OFFSET 0x16 |
Definition at line 86 of file urlcache.c.
Definition at line 58 of file urlcache.c.
#define DIR_LENGTH 8 |
Definition at line 62 of file urlcache.c.
Definition at line 96 of file urlcache.c.
Definition at line 90 of file urlcache.c.
#define ENTRY_START_OFFSET 0x4000 |
Definition at line 61 of file urlcache.c.
#define FILE_SIZE | ( | blocks | ) | ((blocks) * BLOCKSIZE + ENTRY_START_OFFSET) |
Definition at line 72 of file urlcache.c.
#define FILETIME_SECOND 10000000 |
Definition at line 88 of file urlcache.c.
#define GET_INSTALLED_ENTRY 0x200 |
Definition at line 83 of file urlcache.c.
#define HASHTABLE_BLOCKSIZE (HASHTABLE_SIZE / HASHTABLE_NUM_ENTRIES) |
Definition at line 67 of file urlcache.c.
#define HASHTABLE_DEL 1 |
Definition at line 75 of file urlcache.c.
#define HASHTABLE_FLAG_BITS 6 |
Definition at line 79 of file urlcache.c.
#define HASHTABLE_FREE 3 |
Definition at line 77 of file urlcache.c.
#define HASHTABLE_LOCK 2 |
Definition at line 76 of file urlcache.c.
#define HASHTABLE_NUM_ENTRIES 64 /* this needs to be power of 2, that divides HASHTABLE_SIZE */ |
Definition at line 66 of file urlcache.c.
#define HASHTABLE_REDR 5 |
Definition at line 78 of file urlcache.c.
#define HASHTABLE_SIZE 448 |
Definition at line 65 of file urlcache.c.
#define HASHTABLE_URL 0 |
Definition at line 74 of file urlcache.c.
#define INSTALLED_CACHE_ENTRY 0x10000000 |
Definition at line 82 of file urlcache.c.
#define MAX_BLOCK_NO (ALLOCATION_TABLE_SIZE * CHAR_BIT) |
Definition at line 71 of file urlcache.c.
#define MAX_DIR_NO 0x20 |
Definition at line 63 of file urlcache.c.
#define MIN_BLOCK_NO 0x80 |
Definition at line 70 of file urlcache.c.
#define NONAMELESSSTRUCT |
Definition at line 26 of file urlcache.c.
#define NONAMELESSUNION |
Definition at line 25 of file urlcache.c.
#define PENDING_DELETE_CACHE_ENTRY 0x00400000 |
Definition at line 81 of file urlcache.c.
#define URLCACHE_FIND_ENTRY_HANDLE_MAGIC 0xF389ABCD |
Definition at line 98 of file urlcache.c.
|
static |
Definition at line 1203 of file urlcache.c.
Referenced by urlcache_entry_commit().
|
static |
Definition at line 688 of file urlcache.c.
Referenced by cache_container_clean_index(), cache_container_delete_container(), cache_container_lock_index(), FreeUrlCacheSpaceW(), and GetUrlCacheConfigInfoW().
Definition at line 389 of file urlcache.c.
Referenced by cache_container_map_index(), and cache_containers_add().
|
static |
Definition at line 742 of file urlcache.c.
Referenced by cache_containers_free().
Definition at line 1745 of file urlcache.c.
Referenced by FreeUrlCacheSpaceW().
|
static |
Definition at line 555 of file urlcache.c.
Referenced by cache_container_open_index().
|
static |
Definition at line 926 of file urlcache.c.
Referenced by DeleteUrlCacheEntryA(), FreeUrlCacheSpaceW(), IsUrlCacheEntryExpiredA(), SetUrlCacheEntryInfoA(), UnlockUrlCacheEntryFileA(), urlcache_entry_commit(), urlcache_entry_create(), urlcache_entry_get_file(), urlcache_find_next_entry(), and urlcache_get_entry_info().
|
static |
Definition at line 399 of file urlcache.c.
Referenced by cache_container_open_index(), and cache_container_set_size().
|
static |
Definition at line 600 of file urlcache.c.
Referenced by cache_container_clean_index(), cache_container_lock_index(), DeleteUrlCacheEntryA(), FreeUrlCacheSpaceW(), GetUrlCacheConfigInfoW(), IsUrlCacheEntryExpiredA(), SetUrlCacheEntryInfoA(), UnlockUrlCacheEntryFileA(), urlcache_entry_commit(), urlcache_entry_create(), urlcache_entry_get_file(), urlcache_find_next_entry(), and urlcache_get_entry_info().
|
static |
Definition at line 420 of file urlcache.c.
Referenced by cache_container_open_index().
|
static |
Definition at line 985 of file urlcache.c.
Referenced by DeleteUrlCacheEntryA(), FreeUrlCacheSpaceW(), IsUrlCacheEntryExpiredA(), SetUrlCacheEntryInfoA(), UnlockUrlCacheEntryFileA(), urlcache_entry_commit(), urlcache_entry_create(), urlcache_entry_get_file(), urlcache_find_next_entry(), and urlcache_get_entry_info().
|
static |
Definition at line 694 of file urlcache.c.
Referenced by cache_containers_init().
|
static |
Definition at line 875 of file urlcache.c.
Referenced by urlcache_find_next_entry().
|
static |
Definition at line 845 of file urlcache.c.
Referenced by DeleteUrlCacheEntryA(), IsUrlCacheEntryExpiredA(), SetUrlCacheEntryInfoA(), UnlockUrlCacheEntryFileA(), urlcache_entry_commit(), urlcache_entry_create(), urlcache_entry_get_file(), and urlcache_get_entry_info().
Definition at line 837 of file urlcache.c.
Referenced by free_urlcache().
Definition at line 753 of file urlcache.c.
Referenced by cache_containers_enum(), cache_containers_find(), and init_urlcache().
BOOL WINAPI CommitUrlCacheEntryA | ( | LPCSTR | lpszUrlName, |
LPCSTR | lpszLocalFileName, | ||
FILETIME | ExpireTime, | ||
FILETIME | LastModifiedTime, | ||
DWORD | CacheEntryType, | ||
LPBYTE | lpHeaderInfo, | ||
DWORD | dwHeaderSize, | ||
LPCSTR | lpszFileExtension, | ||
LPCSTR | lpszOriginalUrl | ||
) |
Definition at line 3075 of file urlcache.c.
Referenced by create_cache_entry(), test_cache_read(), test_http_cache(), test_trailing_slash(), and test_urlcacheA().
BOOL WINAPI CommitUrlCacheEntryW | ( | LPCWSTR | lpszUrlName, |
LPCWSTR | lpszLocalFileName, | ||
FILETIME | ExpireTime, | ||
FILETIME | LastModifiedTime, | ||
DWORD | CacheEntryType, | ||
LPWSTR | lpHeaderInfo, | ||
DWORD | dwHeaderSize, | ||
LPCWSTR | lpszFileExtension, | ||
LPCWSTR | lpszOriginalUrl | ||
) |
Definition at line 3097 of file urlcache.c.
Referenced by commit_cache_entry(), CRYPT_CacheURL(), save_persistent_cookie(), test_urlcacheW(), and URLDownloadToCacheFileW().
BOOL WINAPI CreateUrlCacheContainerA | ( | DWORD | d1, |
DWORD | d2, | ||
DWORD | d3, | ||
DWORD | d4, | ||
DWORD | d5, | ||
DWORD | d6, | ||
DWORD | d7, | ||
DWORD | d8 | ||
) |
Definition at line 3384 of file urlcache.c.
BOOL WINAPI CreateUrlCacheContainerW | ( | DWORD | d1, |
DWORD | d2, | ||
DWORD | d3, | ||
DWORD | d4, | ||
DWORD | d5, | ||
DWORD | d6, | ||
DWORD | d7, | ||
DWORD | d8 | ||
) |
Definition at line 3395 of file urlcache.c.
BOOL WINAPI CreateUrlCacheEntryA | ( | LPCSTR | lpszUrlName, |
DWORD | dwExpectedFileSize, | ||
LPCSTR | lpszFileExtension, | ||
LPSTR | lpszFileName, | ||
DWORD | dwReserved | ||
) |
Definition at line 2808 of file urlcache.c.
Referenced by create_cache_entry(), test_cache_read(), test_trailing_slash(), and test_urlcacheA().
BOOL WINAPI CreateUrlCacheEntryW | ( | LPCWSTR | lpszUrlName, |
DWORD | dwExpectedFileSize, | ||
LPCWSTR | lpszFileExtension, | ||
LPWSTR | lpszFileName, | ||
DWORD | dwReserved | ||
) |
Definition at line 2827 of file urlcache.c.
Referenced by create_cache_entry(), CRYPT_CacheURL(), FTP_FtpOpenFileW(), save_persistent_cookie(), test_urlcacheW(), and URLDownloadToCacheFileW().
INTERNETAPI GROUPID WINAPI CreateUrlCacheGroup | ( | DWORD | dwFlags, |
LPVOID | lpReserved | ||
) |
Definition at line 3735 of file urlcache.c.
Definition at line 3958 of file urlcache.c.
Definition at line 3369 of file urlcache.c.
Definition at line 3375 of file urlcache.c.
Definition at line 3310 of file urlcache.c.
Referenced by DeleteUrlCacheEntryW(), InternetOpenUrlA_test(), test_cache_read(), test_cache_read_gzipped(), test_http_cache(), test_no_cache(), and test_trailing_slash().
Definition at line 3356 of file urlcache.c.
Referenced by CRYPT_CacheURL(), CRYPT_GetObjectFromCache(), save_persistent_cookie(), and test_http_protocol_url().
Definition at line 3745 of file urlcache.c.
Definition at line 3756 of file urlcache.c.
Definition at line 1234 of file urlcache.c.
Referenced by urlcache_copy_entry(), and urlcache_entry_is_expired().
|
static |
Definition at line 1107 of file urlcache.c.
Referenced by urlcache_delete_file(), urlcache_entry_commit(), and urlcache_set_entry_info().
|
static |
Definition at line 3792 of file urlcache.c.
Referenced by GetUrlCacheConfigInfoW().
Definition at line 3671 of file urlcache.c.
Referenced by test_find_url_cache_entriesA(), and test_FindCloseUrlCache().
Definition at line 3406 of file urlcache.c.
Definition at line 3415 of file urlcache.c.
INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA | ( | LPCSTR | lpszUrlSearchPattern, |
LPINTERNET_CACHE_ENTRY_INFOA | lpFirstCacheEntryInfo, | ||
LPDWORD | lpdwFirstCacheEntryInfoBufferSize | ||
) |
Definition at line 3481 of file urlcache.c.
Referenced by test_find_url_cache_entriesA().
HANDLE WINAPI FindFirstUrlCacheEntryExA | ( | LPCSTR | lpszUrlSearchPattern, |
DWORD | dwFlags, | ||
DWORD | dwFilter, | ||
GROUPID | GroupId, | ||
LPINTERNET_CACHE_ENTRY_INFOA | lpFirstCacheEntryInfo, | ||
LPDWORD | lpdwFirstCacheEntryInfoBufferSize, | ||
LPVOID | lpReserved, | ||
LPDWORD | pcbReserved2, | ||
LPVOID | lpReserved3 | ||
) |
Definition at line 3439 of file urlcache.c.
HANDLE WINAPI FindFirstUrlCacheEntryExW | ( | LPCWSTR | lpszUrlSearchPattern, |
DWORD | dwFlags, | ||
DWORD | dwFilter, | ||
GROUPID | GroupId, | ||
LPINTERNET_CACHE_ENTRY_INFOW | lpFirstCacheEntryInfo, | ||
LPDWORD | lpdwFirstCacheEntryInfoBufferSize, | ||
LPVOID | lpReserved, | ||
LPDWORD | pcbReserved2, | ||
LPVOID | lpReserved3 | ||
) |
Definition at line 3458 of file urlcache.c.
INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW | ( | LPCWSTR | lpszUrlSearchPattern, |
LPINTERNET_CACHE_ENTRY_INFOW | lpFirstCacheEntryInfo, | ||
LPDWORD | lpdwFirstCacheEntryInfoBufferSize | ||
) |
Definition at line 3520 of file urlcache.c.
HANDLE WINAPI FindFirstUrlCacheGroup | ( | DWORD | dwFlags, |
DWORD | dwFilter, | ||
LPVOID | lpSearchCondition, | ||
DWORD | dwSearchCondition, | ||
GROUPID * | lpGroupId, | ||
LPVOID | lpReserved | ||
) |
Definition at line 3689 of file urlcache.c.
Definition at line 3424 of file urlcache.c.
Definition at line 3433 of file urlcache.c.
BOOL WINAPI FindNextUrlCacheEntryA | ( | HANDLE | hEnumHandle, |
LPINTERNET_CACHE_ENTRY_INFOA | lpNextCacheEntryInfo, | ||
LPDWORD | lpdwNextCacheEntryInfoBufferSize | ||
) |
Definition at line 3641 of file urlcache.c.
Referenced by FindFirstUrlCacheEntryA(), and test_find_url_cache_entriesA().
BOOL WINAPI FindNextUrlCacheEntryExA | ( | HANDLE | hEnumHandle, |
LPINTERNET_CACHE_ENTRY_INFOA | lpFirstCacheEntryInfo, | ||
LPDWORD | lpdwFirstCacheEntryInfoBufferSize, | ||
LPVOID | lpReserved, | ||
LPDWORD | pcbReserved2, | ||
LPVOID | lpReserved3 | ||
) |
Definition at line 3697 of file urlcache.c.
BOOL WINAPI FindNextUrlCacheEntryExW | ( | HANDLE | hEnumHandle, |
LPINTERNET_CACHE_ENTRY_INFOW | lpFirstCacheEntryInfo, | ||
LPDWORD | lpdwFirstCacheEntryInfoBufferSize, | ||
LPVOID | lpReserved, | ||
LPDWORD | pcbReserved2, | ||
LPVOID | lpReserved3 | ||
) |
Definition at line 3711 of file urlcache.c.
BOOL WINAPI FindNextUrlCacheEntryW | ( | HANDLE | hEnumHandle, |
LPINTERNET_CACHE_ENTRY_INFOW | lpNextCacheEntryInfo, | ||
LPDWORD | lpdwNextCacheEntryInfoBufferSize | ||
) |
Definition at line 3655 of file urlcache.c.
Referenced by FindFirstUrlCacheEntryW().
Definition at line 3725 of file urlcache.c.
Definition at line 4142 of file urlcache.c.
Referenced by DllMain().
Definition at line 2541 of file urlcache.c.
Definition at line 2384 of file urlcache.c.
Referenced by cache_container_open_index(), delhist_on_command(), FreeUrlCacheSpaceA(), and handle_full_cache_worker().
BOOL WINAPI GetDiskInfoA | ( | PCSTR | path, |
PDWORD | cluster_size, | ||
PDWORDLONG | free, | ||
PDWORDLONG | total | ||
) |
Definition at line 4074 of file urlcache.c.
Referenced by test_GetDiskInfoA().
BOOL WINAPI GetUrlCacheConfigInfoA | ( | LPINTERNET_CACHE_CONFIG_INFOA | info, |
LPDWORD | size, | ||
DWORD | flags | ||
) |
Definition at line 3869 of file urlcache.c.
Referenced by test_GetUrlCacheConfigInfo().
BOOL WINAPI GetUrlCacheConfigInfoW | ( | LPINTERNET_CACHE_CONFIG_INFOW | info, |
LPDWORD | size, | ||
DWORD | flags | ||
) |
Definition at line 3828 of file urlcache.c.
Referenced by GetUrlCacheConfigInfoA().
BOOL WINAPI GetUrlCacheEntryInfoA | ( | LPCSTR | lpszUrlName, |
LPINTERNET_CACHE_ENTRY_INFOA | lpCacheEntryInfo, | ||
LPDWORD | lpdwCacheEntryInfoBufferSize | ||
) |
Definition at line 1898 of file urlcache.c.
Referenced by cache_entry_exists(), test_complicated_cookie(), test_IsUrlCacheEntryExpiredA(), test_urlcacheA(), and test_urlcacheW().
BOOL WINAPI GetUrlCacheEntryInfoExA | ( | LPCSTR | lpszUrl, |
LPINTERNET_CACHE_ENTRY_INFOA | lpCacheEntryInfo, | ||
LPDWORD | lpdwCacheEntryInfoBufSize, | ||
LPSTR | lpszReserved, | ||
LPDWORD | lpdwReserved, | ||
LPVOID | lpReserved, | ||
DWORD | dwFlags | ||
) |
Definition at line 1879 of file urlcache.c.
Referenced by GetUrlCacheEntryInfoA(), and test_GetUrlCacheEntryInfoExA().
BOOL WINAPI GetUrlCacheEntryInfoExW | ( | LPCWSTR | lpszUrl, |
LPINTERNET_CACHE_ENTRY_INFOW | lpCacheEntryInfo, | ||
LPDWORD | lpdwCacheEntryInfoBufSize, | ||
LPWSTR | lpszReserved, | ||
LPDWORD | lpdwReserved, | ||
LPVOID | lpReserved, | ||
DWORD | dwFlags | ||
) |
Definition at line 1992 of file urlcache.c.
Referenced by GetUrlCacheEntryInfoW(), and test_GetUrlCacheEntryInfoExA().
BOOL WINAPI GetUrlCacheEntryInfoW | ( | LPCWSTR | lpszUrl, |
LPINTERNET_CACHE_ENTRY_INFOW | lpCacheEntryInfo, | ||
LPDWORD | lpdwCacheEntryInfoBufferSize | ||
) |
Definition at line 2022 of file urlcache.c.
Referenced by CRYPT_CacheURL(), HTTPREQ_QueryOption(), msi_download_file(), and test_urlcacheW().
BOOL WINAPI GetUrlCacheGroupAttributeA | ( | GROUPID | gid, |
DWORD | dwFlags, | ||
DWORD | dwAttributes, | ||
LPINTERNET_CACHE_GROUP_INFOA | lpGroupInfo, | ||
LPDWORD | lpdwGroupInfo, | ||
LPVOID | lpReserved | ||
) |
Definition at line 3899 of file urlcache.c.
BOOL WINAPI GetUrlCacheGroupAttributeW | ( | GROUPID | gid, |
DWORD | dwFlags, | ||
DWORD | dwAttributes, | ||
LPINTERNET_CACHE_GROUP_INFOW | lpGroupInfo, | ||
LPDWORD | lpdwGroupInfo, | ||
LPVOID | lpReserved | ||
) |
Definition at line 3909 of file urlcache.c.
Definition at line 2260 of file urlcache.c.
Referenced by urlcache_entry_commit().
Definition at line 2253 of file urlcache.c.
Referenced by handle_full_cache().
Definition at line 209 of file urlcache.c.
Referenced by CommitUrlCacheEntryW(), and CreateUrlCacheEntryW().
Definition at line 4108 of file urlcache.c.
Definition at line 4124 of file urlcache.c.
Referenced by DllMain().
Definition at line 3990 of file urlcache.c.
Referenced by IsUrlCacheEntryExpiredW(), and test_IsUrlCacheEntryExpiredA().
Definition at line 4058 of file urlcache.c.
Definition at line 4156 of file urlcache.c.
BOOL WINAPI ReadUrlCacheEntryStream | ( | IN HANDLE | hUrlCacheStream, |
IN DWORD | dwLocation, | ||
IN OUT LPVOID | lpBuffer, | ||
IN OUT LPDWORD | lpdwLen, | ||
IN DWORD | dwReserved | ||
) |
Definition at line 3145 of file urlcache.c.
Referenced by load_persistent_cookie().
Definition at line 4099 of file urlcache.c.
BOOL WINAPI RetrieveUrlCacheEntryFileA | ( | LPCSTR | lpszUrlName, |
LPINTERNET_CACHE_ENTRY_INFOA | lpCacheEntryInfo, | ||
LPDWORD | lpdwCacheEntryInfoBufferSize, | ||
DWORD | dwReserved | ||
) |
Definition at line 2183 of file urlcache.c.
Referenced by RetrieveUrlCacheEntryStreamA(), test_RetrieveUrlCacheEntryA(), and test_urlcacheA().
BOOL WINAPI RetrieveUrlCacheEntryFileW | ( | LPCWSTR | lpszUrlName, |
LPINTERNET_CACHE_ENTRY_INFOW | lpCacheEntryInfo, | ||
LPDWORD | lpdwCacheEntryInfoBufferSize, | ||
DWORD | dwReserved | ||
) |
Definition at line 2195 of file urlcache.c.
Referenced by CRYPT_GetObjectFromCache(), and RetrieveUrlCacheEntryStreamW().
HANDLE WINAPI RetrieveUrlCacheEntryStreamA | ( | LPCSTR | lpszUrlName, |
LPINTERNET_CACHE_ENTRY_INFOA | lpCacheEntryInfo, | ||
LPDWORD | lpdwCacheEntryInfoBufferSize, | ||
BOOL | fRandomRead, | ||
DWORD | dwReserved | ||
) |
Definition at line 3178 of file urlcache.c.
HANDLE WINAPI RetrieveUrlCacheEntryStreamW | ( | LPCWSTR | lpszUrlName, |
LPINTERNET_CACHE_ENTRY_INFOW | lpCacheEntryInfo, | ||
LPDWORD | lpdwCacheEntryInfoBufferSize, | ||
BOOL | fRandomRead, | ||
DWORD | dwReserved | ||
) |
Definition at line 3223 of file urlcache.c.