From: Michael Stefaniuc Subject: [PATCH 11/11] dmstyle: Mark IPersistStream_Save() as stub Message-Id: <20150701072959.GK12024@redhat.com> Date: Wed, 1 Jul 2015 09:29:59 +0200 --- dlls/dmstyle/auditiontrack.c | 14 +++++++++++++- dlls/dmstyle/chordtrack.c | 11 ++++++++--- dlls/dmstyle/commandtrack.c | 9 ++++++++- dlls/dmstyle/mutetrack.c | 14 +++++++++++++- dlls/dmstyle/tests/dmstyle.c | 2 +- 5 files changed, 43 insertions(+), 7 deletions(-) diff --git a/dlls/dmstyle/auditiontrack.c b/dlls/dmstyle/auditiontrack.c index 3239ed7..3c304ca 100644 --- a/dlls/dmstyle/auditiontrack.c +++ b/dlls/dmstyle/auditiontrack.c @@ -242,6 +242,11 @@ static const IDirectMusicTrack8Vtbl dmtrack8_vtbl = { IDirectMusicTrack8Impl_Join }; +static inline IDirectMusicAuditionTrack * impl_from_IPersistStream(IPersistStream *iface) +{ + return CONTAINING_RECORD(iface, IDirectMusicAuditionTrack, dmobj.IPersistStream_iface); +} + static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *stream) { FIXME(": Loading not implemented yet\n"); @@ -251,7 +256,14 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *st static HRESULT WINAPI IPersistStreamImpl_Save(IPersistStream *iface, IStream *stream, BOOL cleardirty) { - return E_NOTIMPL; + IDirectMusicAuditionTrack *This = impl_from_IPersistStream(iface); + + FIXME("(%p, %p, %d): stub\n", This, stream, cleardirty); + + if (!stream) + return E_POINTER; + + return E_NOTIMPL; } static const IPersistStreamVtbl persiststream_vtbl = { diff --git a/dlls/dmstyle/chordtrack.c b/dlls/dmstyle/chordtrack.c index db4befc..fd290bf 100644 --- a/dlls/dmstyle/chordtrack.c +++ b/dlls/dmstyle/chordtrack.c @@ -376,9 +376,14 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS static HRESULT WINAPI IPersistStreamImpl_Save(IPersistStream *iface, IStream *stream, BOOL cleardirty) { - IDirectMusicChordTrack *This = impl_from_IPersistStream(iface); - FIXME("(%p): Saving not implemented yet\n", This); - return E_NOTIMPL; + IDirectMusicChordTrack *This = impl_from_IPersistStream(iface); + + FIXME("(%p, %p, %d): stub\n", This, stream, cleardirty); + + if (!stream) + return E_POINTER; + + return E_NOTIMPL; } static const IPersistStreamVtbl persiststream_vtbl = { diff --git a/dlls/dmstyle/commandtrack.c b/dlls/dmstyle/commandtrack.c index 9f798e7..e326241 100644 --- a/dlls/dmstyle/commandtrack.c +++ b/dlls/dmstyle/commandtrack.c @@ -319,7 +319,14 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS static HRESULT WINAPI IPersistStreamImpl_Save(IPersistStream *iface, IStream *stream, BOOL cleardirty) { - return E_NOTIMPL; + IDirectMusicCommandTrack *This = impl_from_IPersistStream(iface); + + FIXME("(%p, %p, %d): stub\n", This, stream, cleardirty); + + if (!stream) + return E_POINTER; + + return E_NOTIMPL; } static const IPersistStreamVtbl persiststream_vtbl = { diff --git a/dlls/dmstyle/mutetrack.c b/dlls/dmstyle/mutetrack.c index c912ee0..67bfbc3 100644 --- a/dlls/dmstyle/mutetrack.c +++ b/dlls/dmstyle/mutetrack.c @@ -247,6 +247,11 @@ static const IDirectMusicTrack8Vtbl dmtrack8_vtbl = { IDirectMusicTrack8Impl_Join }; +static inline IDirectMusicMuteTrack * impl_from_IPersistStream(IPersistStream *iface) +{ + return CONTAINING_RECORD(iface, IDirectMusicMuteTrack, dmobj.IPersistStream_iface); +} + static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *stream) { FIXME(": Loading not implemented yet\n"); @@ -256,7 +261,14 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *st static HRESULT WINAPI IPersistStreamImpl_Save(IPersistStream *iface, IStream *stream, BOOL cleardirty) { - return E_NOTIMPL; + IDirectMusicMuteTrack *This = impl_from_IPersistStream(iface); + + FIXME("(%p, %p, %d): stub\n", This, stream, cleardirty); + + if (!stream) + return E_POINTER; + + return E_NOTIMPL; } static const IPersistStreamVtbl persiststream_vtbl = { diff --git a/dlls/dmstyle/tests/dmstyle.c b/dlls/dmstyle/tests/dmstyle.c index 9468c39..2677daa 100644 --- a/dlls/dmstyle/tests/dmstyle.c +++ b/dlls/dmstyle/tests/dmstyle.c @@ -339,7 +339,7 @@ static void test_track(void) hr = IPersistStream_Save(ps, NULL, TRUE); if (class[i].has_save) - todo_wine ok(hr == E_POINTER, "IPersistStream_Save failed: %08x\n", hr); + ok(hr == E_POINTER, "IPersistStream_Save failed: %08x\n", hr); else ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr); -- 2.1.0