Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
aad75398
Commit
aad75398
authored
Jul 03, 2015
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Use the generic IPersistStream for DMLyricsTrack.
parent
696168cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
51 deletions
+18
-51
lyricstrack.c
dlls/dmime/lyricstrack.c
+17
-50
dmime.c
dlls/dmime/tests/dmime.c
+1
-1
No files found.
dlls/dmime/lyricstrack.c
View file @
aad75398
...
...
@@ -18,6 +18,7 @@
*/
#include "dmime_private.h"
#include "dmobject.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmime
);
...
...
@@ -26,9 +27,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmime);
*/
typedef
struct
IDirectMusicLyricsTrack
{
IDirectMusicTrack8
IDirectMusicTrack8_iface
;
const
IPersistStreamVtbl
*
PersistStreamVtbl
;
struct
dmobject
dmobj
;
/* IPersistStream only */
LONG
ref
;
DMUS_OBJECTDESC
*
pDesc
;
}
IDirectMusicLyricsTrack
;
/* IDirectMusicLyricsTrack IDirectMusicTrack8 part: */
...
...
@@ -50,7 +50,7 @@ static HRESULT WINAPI IDirectMusicTrack8Impl_QueryInterface(IDirectMusicTrack8 *
IsEqualIID
(
riid
,
&
IID_IDirectMusicTrack8
))
*
ret_iface
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistStream
))
*
ret_iface
=
&
This
->
PersistStreamVtbl
;
*
ret_iface
=
&
This
->
dmobj
.
IPersistStream_iface
;
else
{
WARN
(
"(%p, %s, %p): not found
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ret_iface
);
return
E_NOINTERFACE
;
...
...
@@ -240,52 +240,21 @@ static const IDirectMusicTrack8Vtbl dmtrack8_vtbl = {
IDirectMusicTrack8Impl_Join
};
/* IDirectMusicLyricsTrack IPersistStream part: */
static
HRESULT
WINAPI
IDirectMusicLyricsTrack_IPersistStream_QueryInterface
(
LPPERSISTSTREAM
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS_MULTI
(
IDirectMusicLyricsTrack
,
PersistStreamVtbl
,
iface
);
return
IDirectMusicTrack8_QueryInterface
(
&
This
->
IDirectMusicTrack8_iface
,
riid
,
ppobj
);
}
static
ULONG
WINAPI
IDirectMusicLyricsTrack_IPersistStream_AddRef
(
LPPERSISTSTREAM
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicLyricsTrack
,
PersistStreamVtbl
,
iface
);
return
IDirectMusicTrack8_AddRef
(
&
This
->
IDirectMusicTrack8_iface
);
}
static
ULONG
WINAPI
IDirectMusicLyricsTrack_IPersistStream_Release
(
LPPERSISTSTREAM
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicLyricsTrack
,
PersistStreamVtbl
,
iface
);
return
IDirectMusicTrack8_Release
(
&
This
->
IDirectMusicTrack8_iface
);
}
static
HRESULT
WINAPI
IDirectMusicLyricsTrack_IPersistStream_GetClassID
(
LPPERSISTSTREAM
iface
,
CLSID
*
pClassID
)
{
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectMusicLyricsTrack_IPersistStream_IsDirty
(
LPPERSISTSTREAM
iface
)
{
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectMusicLyricsTrack_IPersistStream_Load
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
)
{
static
HRESULT
WINAPI
IPersistStreamImpl_Load
(
IPersistStream
*
iface
,
IStream
*
stream
)
{
FIXME
(
": Loading not implemented yet
\n
"
);
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicLyricsTrack_IPersistStream_Save
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
)
{
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectMusicLyricsTrack_IPersistStream_GetSizeMax
(
LPPERSISTSTREAM
iface
,
ULARGE_INTEGER
*
pcbSize
)
{
return
E_NOTIMPL
;
}
static
const
IPersistStreamVtbl
DirectMusicLyricsTrack_PersistStream_Vtbl
=
{
IDirectMusicLyricsTrack_IPersistStream_QueryInterface
,
IDirectMusicLyricsTrack_IPersistStream_AddRef
,
IDirectMusicLyricsTrack_IPersistStream_Release
,
IDirectMusicLyricsTrack_IPersistStream_GetClassID
,
IDirectMusicLyricsTrack_IPersistStream_IsDirty
,
IDirectMusicLyricsTrack_IPersistStream_Load
,
IDirectMusicLyricsTrack_IPersistStream_Save
,
IDirectMusicLyricsTrack_IPersistStream_GetSizeMax
static
const
IPersistStreamVtbl
persiststream_vtbl
=
{
dmobj_IPersistStream_QueryInterface
,
dmobj_IPersistStream_AddRef
,
dmobj_IPersistStream_Release
,
dmobj_IPersistStream_GetClassID
,
unimpl_IPersistStream_IsDirty
,
IPersistStreamImpl_Load
,
unimpl_IPersistStream_Save
,
unimpl_IPersistStream_GetSizeMax
};
/* for ClassFactory */
...
...
@@ -300,12 +269,10 @@ HRESULT WINAPI create_dmlyricstrack(REFIID lpcGUID, void **ppobj)
return
E_OUTOFMEMORY
;
}
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
PersistStreamVtbl
=
&
DirectMusicLyricsTrack_PersistStream_Vtbl
;
track
->
pDesc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DMUS_OBJECTDESC
));
DM_STRUCT_INIT
(
track
->
pDesc
);
track
->
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
track
->
pDesc
->
guidClass
,
&
CLSID_DirectMusicLyricsTrack
,
sizeof
(
CLSID
));
track
->
ref
=
1
;
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicLyricsTrack
,
(
IUnknown
*
)
&
track
->
IDirectMusicTrack8_iface
);
track
->
dmobj
.
IPersistStream_iface
.
lpVtbl
=
&
persiststream_vtbl
;
DMIME_LockModule
();
hr
=
IDirectMusicTrack8_QueryInterface
(
&
track
->
IDirectMusicTrack8_iface
,
lpcGUID
,
ppobj
);
...
...
dlls/dmime/tests/dmime.c
View file @
aad75398
...
...
@@ -494,7 +494,7 @@ static void test_track(void)
const
char
*
name
;
BOOL
todo
;
}
class
[]
=
{
{
X
(
DirectMusicLyricsTrack
),
TRU
E
},
{
X
(
DirectMusicLyricsTrack
),
FALS
E
},
{
X
(
DirectMusicMarkerTrack
),
FALSE
},
{
X
(
DirectMusicParamControlTrack
),
TRUE
},
{
X
(
DirectMusicSegmentTriggerTrack
),
FALSE
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment