Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
33725537
Commit
33725537
authored
Mar 26, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Rename URLCacheFindEntryHandle to find_handle.
parent
299739d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
40 deletions
+39
-40
urlcache.c
dlls/wininet/urlcache.c
+39
-40
No files found.
dlls/wininet/urlcache.c
View file @
33725537
...
@@ -100,6 +100,8 @@ static const char urlcache_ver[] = "0.2012001";
...
@@ -100,6 +100,8 @@ static const char urlcache_ver[] = "0.2012001";
#define DWORD_ALIGN(x) ( (DWORD)(((DWORD)(x)+sizeof(DWORD)-1)/sizeof(DWORD))*sizeof(DWORD) )
#define DWORD_ALIGN(x) ( (DWORD)(((DWORD)(x)+sizeof(DWORD)-1)/sizeof(DWORD))*sizeof(DWORD) )
#define URLCACHE_FIND_ENTRY_HANDLE_MAGIC 0xF389ABCD
typedef
struct
typedef
struct
{
{
DWORD
signature
;
DWORD
signature
;
...
@@ -195,6 +197,14 @@ typedef struct
...
@@ -195,6 +197,14 @@ typedef struct
DWORD
default_entry_type
;
DWORD
default_entry_type
;
}
cache_container
;
}
cache_container
;
typedef
struct
{
DWORD
magic
;
LPWSTR
url_search_pattern
;
DWORD
container_idx
;
DWORD
hash_table_idx
;
DWORD
hash_entry_idx
;
}
find_handle
;
/* List of all containers available */
/* List of all containers available */
static
struct
list
UrlContainers
=
LIST_INIT
(
UrlContainers
);
static
struct
list
UrlContainers
=
LIST_INIT
(
UrlContainers
);
...
@@ -3839,17 +3849,6 @@ HANDLE WINAPI FindFirstUrlCacheEntryExW(
...
@@ -3839,17 +3849,6 @@ HANDLE WINAPI FindFirstUrlCacheEntryExW(
return
NULL
;
return
NULL
;
}
}
#define URLCACHE_FIND_ENTRY_HANDLE_MAGIC 0xF389ABCD
typedef
struct
URLCacheFindEntryHandle
{
DWORD
dwMagic
;
LPWSTR
lpszUrlSearchPattern
;
DWORD
dwContainerIndex
;
DWORD
dwHashTableIndex
;
DWORD
dwHashEntryIndex
;
}
URLCacheFindEntryHandle
;
/***********************************************************************
/***********************************************************************
* FindFirstUrlCacheEntryA (WININET.@)
* FindFirstUrlCacheEntryA (WININET.@)
*
*
...
@@ -3857,7 +3856,7 @@ typedef struct URLCacheFindEntryHandle
...
@@ -3857,7 +3856,7 @@ typedef struct URLCacheFindEntryHandle
INTERNETAPI
HANDLE
WINAPI
FindFirstUrlCacheEntryA
(
LPCSTR
lpszUrlSearchPattern
,
INTERNETAPI
HANDLE
WINAPI
FindFirstUrlCacheEntryA
(
LPCSTR
lpszUrlSearchPattern
,
LPINTERNET_CACHE_ENTRY_INFOA
lpFirstCacheEntryInfo
,
LPDWORD
lpdwFirstCacheEntryInfoBufferSize
)
LPINTERNET_CACHE_ENTRY_INFOA
lpFirstCacheEntryInfo
,
LPDWORD
lpdwFirstCacheEntryInfoBufferSize
)
{
{
URLCacheFindEntryH
andle
*
pEntryHandle
;
find_h
andle
*
pEntryHandle
;
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_a
(
lpszUrlSearchPattern
),
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
);
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_a
(
lpszUrlSearchPattern
),
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
);
...
@@ -3865,21 +3864,21 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern,
...
@@ -3865,21 +3864,21 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern,
if
(
!
pEntryHandle
)
if
(
!
pEntryHandle
)
return
NULL
;
return
NULL
;
pEntryHandle
->
dwM
agic
=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
;
pEntryHandle
->
m
agic
=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
;
if
(
lpszUrlSearchPattern
)
if
(
lpszUrlSearchPattern
)
{
{
pEntryHandle
->
lpszUrlSearchP
attern
=
heap_strdupAtoW
(
lpszUrlSearchPattern
);
pEntryHandle
->
url_search_p
attern
=
heap_strdupAtoW
(
lpszUrlSearchPattern
);
if
(
!
pEntryHandle
->
lpszUrlSearchP
attern
)
if
(
!
pEntryHandle
->
url_search_p
attern
)
{
{
heap_free
(
pEntryHandle
);
heap_free
(
pEntryHandle
);
return
NULL
;
return
NULL
;
}
}
}
}
else
else
pEntryHandle
->
lpszUrlSearchP
attern
=
NULL
;
pEntryHandle
->
url_search_p
attern
=
NULL
;
pEntryHandle
->
dwContainerInde
x
=
0
;
pEntryHandle
->
container_id
x
=
0
;
pEntryHandle
->
dwHashTableInde
x
=
0
;
pEntryHandle
->
hash_table_id
x
=
0
;
pEntryHandle
->
dwHashEntryInde
x
=
0
;
pEntryHandle
->
hash_entry_id
x
=
0
;
if
(
!
FindNextUrlCacheEntryA
(
pEntryHandle
,
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
))
if
(
!
FindNextUrlCacheEntryA
(
pEntryHandle
,
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
))
{
{
...
@@ -3896,7 +3895,7 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern,
...
@@ -3896,7 +3895,7 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern,
INTERNETAPI
HANDLE
WINAPI
FindFirstUrlCacheEntryW
(
LPCWSTR
lpszUrlSearchPattern
,
INTERNETAPI
HANDLE
WINAPI
FindFirstUrlCacheEntryW
(
LPCWSTR
lpszUrlSearchPattern
,
LPINTERNET_CACHE_ENTRY_INFOW
lpFirstCacheEntryInfo
,
LPDWORD
lpdwFirstCacheEntryInfoBufferSize
)
LPINTERNET_CACHE_ENTRY_INFOW
lpFirstCacheEntryInfo
,
LPDWORD
lpdwFirstCacheEntryInfoBufferSize
)
{
{
URLCacheFindEntryH
andle
*
pEntryHandle
;
find_h
andle
*
pEntryHandle
;
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_w
(
lpszUrlSearchPattern
),
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
);
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_w
(
lpszUrlSearchPattern
),
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
);
...
@@ -3904,21 +3903,21 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern,
...
@@ -3904,21 +3903,21 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern,
if
(
!
pEntryHandle
)
if
(
!
pEntryHandle
)
return
NULL
;
return
NULL
;
pEntryHandle
->
dwM
agic
=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
;
pEntryHandle
->
m
agic
=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
;
if
(
lpszUrlSearchPattern
)
if
(
lpszUrlSearchPattern
)
{
{
pEntryHandle
->
lpszUrlSearchP
attern
=
heap_strdupW
(
lpszUrlSearchPattern
);
pEntryHandle
->
url_search_p
attern
=
heap_strdupW
(
lpszUrlSearchPattern
);
if
(
!
pEntryHandle
->
lpszUrlSearchP
attern
)
if
(
!
pEntryHandle
->
url_search_p
attern
)
{
{
heap_free
(
pEntryHandle
);
heap_free
(
pEntryHandle
);
return
NULL
;
return
NULL
;
}
}
}
}
else
else
pEntryHandle
->
lpszUrlSearchP
attern
=
NULL
;
pEntryHandle
->
url_search_p
attern
=
NULL
;
pEntryHandle
->
dwContainerInde
x
=
0
;
pEntryHandle
->
container_id
x
=
0
;
pEntryHandle
->
dwHashTableInde
x
=
0
;
pEntryHandle
->
hash_table_id
x
=
0
;
pEntryHandle
->
dwHashEntryInde
x
=
0
;
pEntryHandle
->
hash_entry_id
x
=
0
;
if
(
!
FindNextUrlCacheEntryW
(
pEntryHandle
,
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
))
if
(
!
FindNextUrlCacheEntryW
(
pEntryHandle
,
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
))
{
{
...
@@ -3934,17 +3933,17 @@ static BOOL FindNextUrlCacheEntryInternal(
...
@@ -3934,17 +3933,17 @@ static BOOL FindNextUrlCacheEntryInternal(
LPDWORD
lpdwNextCacheEntryInfoBufferSize
,
LPDWORD
lpdwNextCacheEntryInfoBufferSize
,
BOOL
unicode
)
BOOL
unicode
)
{
{
URLCacheFindEntryHandle
*
pEntryHandle
=
(
URLCacheFindEntryHandle
*
)
hEnumHandle
;
find_handle
*
pEntryHandle
=
(
find_handle
*
)
hEnumHandle
;
cache_container
*
pContainer
;
cache_container
*
pContainer
;
if
(
pEntryHandle
->
dwM
agic
!=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
)
if
(
pEntryHandle
->
m
agic
!=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
)
{
{
SetLastError
(
ERROR_INVALID_HANDLE
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
return
FALSE
;
}
}
for
(;
URLCacheContainers_Enum
(
pEntryHandle
->
lpszUrlSearchPattern
,
pEntryHandle
->
dwContainerInde
x
,
&
pContainer
);
for
(;
URLCacheContainers_Enum
(
pEntryHandle
->
url_search_pattern
,
pEntryHandle
->
container_id
x
,
&
pContainer
);
pEntryHandle
->
dwContainerIndex
++
,
pEntryHandle
->
dwHashTableInde
x
=
0
)
pEntryHandle
->
container_idx
++
,
pEntryHandle
->
hash_table_id
x
=
0
)
{
{
urlcache_header
*
pHeader
;
urlcache_header
*
pHeader
;
entry_hash_table
*
pHashTableEntry
;
entry_hash_table
*
pHashTableEntry
;
...
@@ -3960,12 +3959,12 @@ static BOOL FindNextUrlCacheEntryInternal(
...
@@ -3960,12 +3959,12 @@ static BOOL FindNextUrlCacheEntryInternal(
if
(
!
(
pHeader
=
cache_container_lock_index
(
pContainer
)))
if
(
!
(
pHeader
=
cache_container_lock_index
(
pContainer
)))
return
FALSE
;
return
FALSE
;
for
(;
URLCache_EnumHashTables
(
pHeader
,
&
pEntryHandle
->
dwHashTableInde
x
,
&
pHashTableEntry
);
for
(;
URLCache_EnumHashTables
(
pHeader
,
&
pEntryHandle
->
hash_table_id
x
,
&
pHashTableEntry
);
pEntryHandle
->
dwHashTableIndex
++
,
pEntryHandle
->
dwHashEntryInde
x
=
0
)
pEntryHandle
->
hash_table_idx
++
,
pEntryHandle
->
hash_entry_id
x
=
0
)
{
{
const
struct
hash_entry
*
pHashEntry
=
NULL
;
const
struct
hash_entry
*
pHashEntry
=
NULL
;
for
(;
URLCache_EnumHashTableEntries
(
pHeader
,
pHashTableEntry
,
&
pEntryHandle
->
dwHashEntryInde
x
,
&
pHashEntry
);
for
(;
URLCache_EnumHashTableEntries
(
pHeader
,
pHashTableEntry
,
&
pEntryHandle
->
hash_entry_id
x
,
&
pHashEntry
);
pEntryHandle
->
dwHashEntryInde
x
++
)
pEntryHandle
->
hash_entry_id
x
++
)
{
{
const
entry_url
*
pUrlEntry
;
const
entry_url
*
pUrlEntry
;
const
entry_header
*
pEntry
=
(
const
entry_header
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
offset
);
const
entry_header
*
pEntry
=
(
const
entry_header
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
offset
);
...
@@ -3998,7 +3997,7 @@ static BOOL FindNextUrlCacheEntryInternal(
...
@@ -3998,7 +3997,7 @@ static BOOL FindNextUrlCacheEntryInternal(
/* 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 */
pEntryHandle
->
dwHashEntryInde
x
++
;
pEntryHandle
->
hash_entry_id
x
++
;
cache_container_unlock_index
(
pContainer
,
pHeader
);
cache_container_unlock_index
(
pContainer
,
pHeader
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -4046,18 +4045,18 @@ BOOL WINAPI FindNextUrlCacheEntryW(
...
@@ -4046,18 +4045,18 @@ BOOL WINAPI FindNextUrlCacheEntryW(
*/
*/
BOOL
WINAPI
FindCloseUrlCache
(
HANDLE
hEnumHandle
)
BOOL
WINAPI
FindCloseUrlCache
(
HANDLE
hEnumHandle
)
{
{
URLCacheFindEntryHandle
*
pEntryHandle
=
(
URLCacheFindEntryHandle
*
)
hEnumHandle
;
find_handle
*
pEntryHandle
=
(
find_handle
*
)
hEnumHandle
;
TRACE
(
"(%p)
\n
"
,
hEnumHandle
);
TRACE
(
"(%p)
\n
"
,
hEnumHandle
);
if
(
!
pEntryHandle
||
pEntryHandle
->
dwM
agic
!=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
)
if
(
!
pEntryHandle
||
pEntryHandle
->
m
agic
!=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
)
{
{
SetLastError
(
ERROR_INVALID_HANDLE
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
return
FALSE
;
}
}
pEntryHandle
->
dwM
agic
=
0
;
pEntryHandle
->
m
agic
=
0
;
heap_free
(
pEntryHandle
->
lpszUrlSearchP
attern
);
heap_free
(
pEntryHandle
->
url_search_p
attern
);
heap_free
(
pEntryHandle
);
heap_free
(
pEntryHandle
);
return
TRUE
;
return
TRUE
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment