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
b27e9297
Commit
b27e9297
authored
Sep 06, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Sep 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented IUriBuilder_{Get/Set}Query.
parent
a4eee688
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
16 deletions
+46
-16
uri.c
dlls/urlmon/tests/uri.c
+34
-1
uri.c
dlls/urlmon/uri.c
+12
-15
No files found.
dlls/urlmon/tests/uri.c
View file @
b27e9297
...
@@ -4280,7 +4280,7 @@ static const uri_builder_test uri_builder_tests[] = {
...
@@ -4280,7 +4280,7 @@ static const uri_builder_test uri_builder_tests[] = {
{
{
{
TRUE
,
"#fragment"
,
NULL
,
Uri_PROPERTY_FRAGMENT
,
S_OK
,
FALSE
},
{
TRUE
,
"#fragment"
,
NULL
,
Uri_PROPERTY_FRAGMENT
,
S_OK
,
FALSE
},
{
TRUE
,
"password"
,
NULL
,
Uri_PROPERTY_PASSWORD
,
S_OK
,
FALSE
},
{
TRUE
,
"password"
,
NULL
,
Uri_PROPERTY_PASSWORD
,
S_OK
,
FALSE
},
{
TRUE
,
"?query=x"
,
NULL
,
Uri_PROPERTY_QUERY
,
S_OK
,
TRU
E
},
{
TRUE
,
"?query=x"
,
NULL
,
Uri_PROPERTY_QUERY
,
S_OK
,
FALS
E
},
{
TRUE
,
"username"
,
NULL
,
Uri_PROPERTY_USER_NAME
,
S_OK
,
TRUE
}
{
TRUE
,
"username"
,
NULL
,
Uri_PROPERTY_USER_NAME
,
S_OK
,
TRUE
}
},
},
{
FALSE
},
{
FALSE
},
...
@@ -4671,6 +4671,39 @@ static const uri_builder_test uri_builder_tests[] = {
...
@@ -4671,6 +4671,39 @@ static const uri_builder_test uri_builder_tests[] = {
{
URL_SCHEME_HTTP
,
S_OK
},
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
},
{
"http://google.com/"
,
0
,
S_OK
,
FALSE
,
{
{
TRUE
,
"test"
,
"?test"
,
Uri_PROPERTY_QUERY
,
S_OK
,
FALSE
},
},
{
FALSE
},
0
,
S_OK
,
TRUE
,
0
,
S_OK
,
TRUE
,
0
,
0
,
0
,
S_OK
,
TRUE
,
{
{
"http://google.com/?test"
,
S_OK
},
{
"google.com"
,
S_OK
},
{
"http://google.com/?test"
,
S_OK
},
{
"google.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"google.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"/"
,
S_OK
},
{
"/?test"
,
S_OK
},
{
"?test"
,
S_OK
},
{
"http://google.com/?test"
,
S_OK
},
{
"http"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
},
{
80
,
S_OK
},
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
}
};
};
...
...
dlls/urlmon/uri.c
View file @
b27e9297
...
@@ -94,6 +94,9 @@ typedef struct {
...
@@ -94,6 +94,9 @@ typedef struct {
BOOL
has_port
;
BOOL
has_port
;
DWORD
port
;
DWORD
port
;
WCHAR
*
query
;
DWORD
query_len
;
}
UriBuilder
;
}
UriBuilder
;
typedef
struct
{
typedef
struct
{
...
@@ -4324,6 +4327,7 @@ static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
...
@@ -4324,6 +4327,7 @@ static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
heap_free
(
This
->
host
);
heap_free
(
This
->
host
);
heap_free
(
This
->
password
);
heap_free
(
This
->
password
);
heap_free
(
This
->
path
);
heap_free
(
This
->
path
);
heap_free
(
This
->
query
);
heap_free
(
This
);
heap_free
(
This
);
}
}
...
@@ -4519,19 +4523,11 @@ static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery,
...
@@ -4519,19 +4523,11 @@ static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery,
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchQuery
,
ppwzQuery
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchQuery
,
ppwzQuery
);
if
(
!
pcchQuery
)
{
if
(
!
This
->
uri
||
This
->
uri
->
query_start
==
-
1
||
This
->
modified_props
&
Uri_HAS_QUERY
)
if
(
ppwzQuery
)
return
get_builder_component
(
&
This
->
query
,
&
This
->
query_len
,
NULL
,
0
,
ppwzQuery
,
pcchQuery
);
*
ppwzQuery
=
NULL
;
else
return
E_POINTER
;
return
get_builder_component
(
&
This
->
query
,
&
This
->
query_len
,
This
->
uri
->
canon_uri
+
This
->
uri
->
query_start
,
}
This
->
uri
->
query_len
,
ppwzQuery
,
pcchQuery
);
if
(
!
ppwzQuery
)
{
*
pcchQuery
=
0
;
return
E_POINTER
;
}
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchQuery
,
ppwzQuery
);
return
E_NOTIMPL
;
}
}
static
HRESULT
WINAPI
UriBuilder_GetSchemeName
(
IUriBuilder
*
iface
,
DWORD
*
pcchSchemeName
,
LPCWSTR
*
ppwzSchemeName
)
static
HRESULT
WINAPI
UriBuilder_GetSchemeName
(
IUriBuilder
*
iface
,
DWORD
*
pcchSchemeName
,
LPCWSTR
*
ppwzSchemeName
)
...
@@ -4620,8 +4616,9 @@ static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWOR
...
@@ -4620,8 +4616,9 @@ static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWOR
static
HRESULT
WINAPI
UriBuilder_SetQuery
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
static
HRESULT
WINAPI
UriBuilder_SetQuery
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
{
{
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzNewValue
));
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzNewValue
));
return
E_NOTIMPL
;
return
set_builder_component
(
&
This
->
query
,
&
This
->
query_len
,
pwzNewValue
,
'?'
,
&
This
->
modified_props
,
Uri_HAS_QUERY
);
}
}
static
HRESULT
WINAPI
UriBuilder_SetSchemeName
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
static
HRESULT
WINAPI
UriBuilder_SetSchemeName
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
...
...
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