forked from Mirrors/wine-wine
urlmon: Partially implemented IUri_GetHost.
parent
6a1dd3d18b
commit
cfc0f97d93
|
@ -329,7 +329,7 @@ static const uri_properties uri_tests[] = {
|
|||
{"",S_FALSE,TRUE},
|
||||
{".txt",S_OK,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"127.0.0.1",S_OK,TRUE},
|
||||
{"127.0.0.1",S_OK,FALSE},
|
||||
{"",S_FALSE,FALSE},
|
||||
{"/test%20dir/test.txt",S_OK,TRUE},
|
||||
{"/test%20dir/test.txt",S_OK,TRUE},
|
||||
|
@ -1233,7 +1233,7 @@ static const uri_properties uri_tests[] = {
|
|||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"127.0.0.100",S_OK,TRUE},
|
||||
{"127.0.0.100",S_OK,FALSE},
|
||||
{"",S_FALSE,FALSE},
|
||||
{"/",S_OK,TRUE},
|
||||
{"/",S_OK,TRUE},
|
||||
|
@ -1263,7 +1263,7 @@ static const uri_properties uri_tests[] = {
|
|||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"127.0.0.0",S_OK,TRUE},
|
||||
{"127.0.0.0",S_OK,FALSE},
|
||||
{"",S_FALSE,FALSE},
|
||||
{"/",S_OK,TRUE},
|
||||
{"/",S_OK,TRUE},
|
||||
|
@ -1293,7 +1293,7 @@ static const uri_properties uri_tests[] = {
|
|||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"0.1.226.64",S_OK,TRUE},
|
||||
{"0.1.226.64",S_OK,FALSE},
|
||||
{"",S_FALSE,FALSE},
|
||||
{"/",S_OK,TRUE},
|
||||
{"/",S_OK,TRUE},
|
||||
|
@ -1323,7 +1323,7 @@ static const uri_properties uri_tests[] = {
|
|||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"255.255.255.255",S_OK,TRUE},
|
||||
{"255.255.255.255",S_OK,FALSE},
|
||||
{"",S_FALSE,FALSE},
|
||||
{"/",S_OK,TRUE},
|
||||
{"/",S_OK,TRUE},
|
||||
|
@ -1383,7 +1383,7 @@ static const uri_properties uri_tests[] = {
|
|||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"4294967295",S_OK,TRUE},
|
||||
{"4294967295",S_OK,FALSE},
|
||||
{"",S_FALSE,FALSE},
|
||||
{"/",S_OK,TRUE},
|
||||
{"/",S_OK,TRUE},
|
||||
|
@ -1413,7 +1413,7 @@ static const uri_properties uri_tests[] = {
|
|||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"",S_FALSE,TRUE},
|
||||
{"127.001",S_OK,TRUE},
|
||||
{"127.001",S_OK,FALSE},
|
||||
{"",S_FALSE,FALSE},
|
||||
{"/",S_OK,TRUE},
|
||||
{"/",S_OK,TRUE},
|
||||
|
|
|
@ -1241,6 +1241,22 @@ static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BST
|
|||
}
|
||||
|
||||
switch(uriProp) {
|
||||
case Uri_PROPERTY_HOST:
|
||||
if(This->host_start > -1) {
|
||||
*pbstrProperty = SysAllocStringLen(This->canon_uri+This->host_start, This->host_len);
|
||||
hres = S_OK;
|
||||
} else {
|
||||
/* Canonicalizing/parsing the host of a URI is only partially
|
||||
* implemented, so return E_NOTIMPL for now.
|
||||
*/
|
||||
FIXME("(%p)->(%d %p %x) Partially implemented\n", This, uriProp, pbstrProperty, dwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
if(!(*pbstrProperty))
|
||||
hres = E_OUTOFMEMORY;
|
||||
|
||||
break;
|
||||
case Uri_PROPERTY_PASSWORD:
|
||||
if(This->userinfo_split > -1) {
|
||||
*pbstrProperty = SysAllocStringLen(
|
||||
|
@ -1338,6 +1354,18 @@ static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, D
|
|||
}
|
||||
|
||||
switch(uriProp) {
|
||||
case Uri_PROPERTY_HOST:
|
||||
if(This->host_start == -1) {
|
||||
/* Canonicalizing/parsing the host of a URI is only partially
|
||||
* implemented, so return E_NOTIMPL for now.
|
||||
*/
|
||||
FIXME("(%p)->(%d %p %x) Partially implemented\n", This, uriProp, pcchProperty, dwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
*pcchProperty = This->host_len;
|
||||
hres = (This->host_start > -1) ? S_OK : S_FALSE;
|
||||
break;
|
||||
case Uri_PROPERTY_PASSWORD:
|
||||
*pcchProperty = (This->userinfo_split > -1) ? This->userinfo_len-This->userinfo_split-1 : 0;
|
||||
hres = (This->userinfo_split > -1) ? S_OK : S_FALSE;
|
||||
|
@ -1483,13 +1511,8 @@ static HRESULT WINAPI Uri_GetFragment(IUri *iface, BSTR *pstrFragment)
|
|||
|
||||
static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
|
||||
{
|
||||
Uri *This = URI_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pstrHost);
|
||||
|
||||
if(!pstrHost)
|
||||
return E_POINTER;
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("(%p)->(%p)\n", iface, pstrHost);
|
||||
return Uri_GetPropertyBSTR(iface, Uri_PROPERTY_HOST, pstrHost, 0);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI Uri_GetPassword(IUri *iface, BSTR *pstrPassword)
|
||||
|
|
Loading…
Reference in New Issue