Commit a34700f0 authored by Thomas Mullaly's avatar Thomas Mullaly Committed by Alexandre Julliard

urlmon: Implemented functionality for retrieving the scheme type of a IUri.

parent d4e69aec
......@@ -112,7 +112,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_DNS,S_OK,TRUE}, /* HOST_TYPE */
{80,S_OK,TRUE}, /* PORT */
{URL_SCHEME_HTTP,S_OK,TRUE}, /* SCHEME */
{URL_SCHEME_HTTP,S_OK,FALSE}, /* SCHEME */
{URLZONE_INVALID,E_NOTIMPL,FALSE} /* ZONE */
}
},
......@@ -141,7 +141,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_DNS,S_OK,TRUE},
{80,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
......@@ -170,7 +170,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_DNS,S_OK,TRUE},
{80,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE},
}
},
......@@ -199,7 +199,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_DNS,S_OK,TRUE},
{80,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE},
}
},
......@@ -229,7 +229,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_DNS,S_OK,TRUE},
{9999,S_OK,TRUE},
{URL_SCHEME_FTP,S_OK,TRUE},
{URL_SCHEME_FTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
......@@ -257,7 +257,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_UNKNOWN,S_OK,TRUE},
{0,S_FALSE,TRUE},
{URL_SCHEME_FILE,S_OK,TRUE},
{URL_SCHEME_FILE,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
......@@ -285,7 +285,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_UNKNOWN,S_OK,TRUE},
{0,S_FALSE,TRUE},
{URL_SCHEME_FILE,S_OK,TRUE},
{URL_SCHEME_FILE,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
......@@ -313,7 +313,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_UNKNOWN,S_OK,TRUE},
{0,S_FALSE,TRUE},
{URL_SCHEME_UNKNOWN,S_OK,TRUE},
{URL_SCHEME_UNKNOWN,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
......@@ -342,7 +342,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_IPV4,S_OK,TRUE},
{80,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
......@@ -371,7 +371,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_IPV6,S_OK,TRUE},
{80,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
......@@ -400,7 +400,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_IPV6,S_OK,TRUE},
{21,S_OK,TRUE},
{URL_SCHEME_FTP,S_OK,TRUE},
{URL_SCHEME_FTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
......@@ -429,7 +429,7 @@ static const uri_properties uri_tests[] = {
{
{Uri_HOST_IPV6,S_OK,TRUE},
{80,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,TRUE},
{URL_SCHEME_HTTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
}
......
......@@ -500,6 +500,8 @@ static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, D
static HRESULT WINAPI Uri_GetPropertyDWORD(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
{
Uri *This = URI_THIS(iface);
HRESULT hres;
TRACE("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
if(!pcchProperty)
......@@ -520,7 +522,17 @@ static HRESULT WINAPI Uri_GetPropertyDWORD(IUri *iface, Uri_PROPERTY uriProp, DW
return E_INVALIDARG;
}
return E_NOTIMPL;
switch(uriProp) {
case Uri_PROPERTY_SCHEME:
*pcchProperty = This->scheme_type;
hres = S_OK;
break;
default:
FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
hres = E_NOTIMPL;
}
return hres;
}
static HRESULT WINAPI Uri_HasProperty(IUri *iface, Uri_PROPERTY uriProp, BOOL *pfHasProperty)
......@@ -718,12 +730,8 @@ static HRESULT WINAPI Uri_GetPort(IUri *iface, DWORD *pdwPort)
static HRESULT WINAPI Uri_GetScheme(IUri *iface, DWORD *pdwScheme)
{
Uri *This = URI_THIS(iface);
FIXME("(%p)->(%p)\n", This, pdwScheme);
if(!pdwScheme)
return E_INVALIDARG;
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, pdwScheme);
return Uri_GetPropertyDWORD(iface, Uri_PROPERTY_SCHEME, pdwScheme, 0);
}
static HRESULT WINAPI Uri_GetZone(IUri *iface, DWORD *pdwZone)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment