mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:31:39 +00:00
windows.media.mediacontrol: Implement IMusicDisplayProperties::get/put_Artist().
Called by Roon.
This commit is contained in:
parent
b7768065c1
commit
780a173f45
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue