Commit 5861f8c5 authored by Mohamad Al-Jaf's avatar Mohamad Al-Jaf Committed by Alexandre Julliard

windows.media.mediacontrol: Implement IMusicDisplayProperties2::get/put_AlbumTitle().

Called by Roon.
parent e99cf458
...@@ -123,6 +123,7 @@ struct music_properties ...@@ -123,6 +123,7 @@ struct music_properties
IMusicDisplayProperties2 IMusicDisplayProperties2_iface; IMusicDisplayProperties2 IMusicDisplayProperties2_iface;
LONG ref; LONG ref;
HSTRING album_title;
HSTRING artist; HSTRING artist;
HSTRING title; HSTRING title;
}; };
...@@ -266,14 +267,17 @@ DEFINE_IINSPECTABLE( music_properties2, IMusicDisplayProperties2, struct music_p ...@@ -266,14 +267,17 @@ DEFINE_IINSPECTABLE( music_properties2, IMusicDisplayProperties2, struct music_p
static HRESULT STDMETHODCALLTYPE music_properties2_get_AlbumTitle( IMusicDisplayProperties2 *iface, HSTRING *value ) static HRESULT STDMETHODCALLTYPE music_properties2_get_AlbumTitle( IMusicDisplayProperties2 *iface, HSTRING *value )
{ {
FIXME( "iface %p, value %p stub\n", iface, value ); struct music_properties *impl = impl_from_IMusicDisplayProperties2( iface );
return E_NOTIMPL; TRACE( "iface %p, value %p\n", iface, value );
return WindowsDuplicateString( impl->album_title, value );
} }
static HRESULT STDMETHODCALLTYPE music_properties2_put_AlbumTitle( IMusicDisplayProperties2 *iface, HSTRING value ) static HRESULT STDMETHODCALLTYPE music_properties2_put_AlbumTitle( IMusicDisplayProperties2 *iface, HSTRING value )
{ {
FIXME( "iface %p, value %s stub\n", iface, debugstr_hstring( value ) ); struct music_properties *impl = impl_from_IMusicDisplayProperties2( iface );
return E_NOTIMPL; TRACE( "iface %p, value %p\n", iface, value );
WindowsDeleteString( impl->album_title );
return WindowsDuplicateString( value, &impl->album_title );
} }
static HRESULT STDMETHODCALLTYPE music_properties2_get_TrackNumber( IMusicDisplayProperties2 *iface, UINT32 *value ) static HRESULT STDMETHODCALLTYPE music_properties2_get_TrackNumber( IMusicDisplayProperties2 *iface, UINT32 *value )
......
...@@ -212,17 +212,17 @@ static void test_MediaControlStatics(void) ...@@ -212,17 +212,17 @@ static void test_MediaControlStatics(void)
ok( hr == S_OK, "got hr %#lx.\n", hr ); ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = IMusicDisplayProperties2_put_AlbumTitle( music_properties2, NULL ); hr = IMusicDisplayProperties2_put_AlbumTitle( music_properties2, NULL );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = WindowsCreateStringReference( L"Wine Hits", wcslen( L"Wine Hits" ), &header, &str ); hr = WindowsCreateStringReference( L"Wine Hits", wcslen( L"Wine Hits" ), &header, &str );
ok( hr == S_OK, "got hr %#lx.\n", hr ); ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = IMusicDisplayProperties2_put_AlbumTitle( music_properties2, str ); hr = IMusicDisplayProperties2_put_AlbumTitle( music_properties2, str );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = IMusicDisplayProperties2_get_AlbumTitle( music_properties2, &ret_str ); hr = IMusicDisplayProperties2_get_AlbumTitle( music_properties2, &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 ); hr = WindowsCompareStringOrdinal( str, ret_str, &res );
ok( hr == S_OK, "got hr %#lx.\n", hr ); ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( !res, "got string %s.\n", debugstr_hstring( ret_str ) ); 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( str != ret_str, "got same HSTRINGs %p, %p.\n", str, ret_str );
WindowsDeleteString( str ); WindowsDeleteString( str );
WindowsDeleteString( ret_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