Commit 780a173f authored by Mohamad Al-Jaf's avatar Mohamad Al-Jaf Committed by Alexandre Julliard

windows.media.mediacontrol: Implement IMusicDisplayProperties::get/put_Artist().

Called by Roon.
parent b7768065
......@@ -122,6 +122,7 @@ struct music_properties
IMusicDisplayProperties IMusicDisplayProperties_iface;
LONG ref;
HSTRING artist;
HSTRING title;
};
......@@ -168,6 +169,7 @@ static ULONG WINAPI music_properties_Release( IMusicDisplayProperties *iface )
if (!ref)
{
WindowsDeleteString( impl->artist );
WindowsDeleteString( impl->title );
free( impl );
}
......@@ -221,14 +223,17 @@ static HRESULT WINAPI music_properties_put_AlbumArtist( IMusicDisplayProperties
static HRESULT WINAPI music_properties_get_Artist( IMusicDisplayProperties *iface, HSTRING *value )
{
FIXME( "iface %p, value %p stub!\n", iface, value );
return E_NOTIMPL;
struct music_properties *impl = impl_from_IMusicDisplayProperties( iface );
TRACE( "iface %p, value %p\n", iface, value );
return WindowsDuplicateString( impl->artist, value );
}
static HRESULT WINAPI music_properties_put_Artist( IMusicDisplayProperties *iface, HSTRING value )
{
FIXME( "iface %p, value %s stub!\n", iface, debugstr_hstring(value) );
return E_NOTIMPL;
struct music_properties *impl = impl_from_IMusicDisplayProperties( iface );
TRACE( "iface %p, value %p\n", iface, value );
WindowsDeleteString( impl->artist );
return WindowsDuplicateString( value, &impl->artist );
}
static const IMusicDisplayPropertiesVtbl music_properties_vtbl =
......
......@@ -193,17 +193,17 @@ static void test_MediaControlStatics(void)
WindowsDeleteString( ret_str );
hr = IMusicDisplayProperties_put_Artist( music_properties, NULL );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = WindowsCreateStringReference( L"The Wine Project", wcslen( L"The Wine Project" ), &header, &str );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = IMusicDisplayProperties_put_Artist( music_properties, str );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = IMusicDisplayProperties_get_Artist( music_properties, &ret_str );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = WindowsCompareStringOrdinal( str, ret_str, &res );
ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( !res, "got string %s.\n", debugstr_hstring( ret_str ) );
todo_wine ok( str != ret_str, "got same HSTRINGs %p, %p.\n", str, ret_str );
ok( !res, "got string %s.\n", debugstr_hstring( ret_str ) );
ok( str != ret_str, "got same HSTRINGs %p, %p.\n", str, ret_str );
WindowsDeleteString( str );
WindowsDeleteString( ret_str );
......
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