Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
347da355
Commit
347da355
authored
Feb 27, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: COM cleanup of IDirectMusicSegmentState8 interface.
parent
b89f9218
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
98 deletions
+107
-98
dmime_private.h
dlls/dmime/dmime_private.h
+0
-12
segmentstate.c
dlls/dmime/segmentstate.c
+107
-86
No files found.
dlls/dmime/dmime_private.h
View file @
347da355
...
...
@@ -47,7 +47,6 @@
* Interfaces
*/
typedef
struct
IDirectMusicSegment8Impl
IDirectMusicSegment8Impl
;
typedef
struct
IDirectMusicSegmentState8Impl
IDirectMusicSegmentState8Impl
;
typedef
struct
IDirectMusicGraphImpl
IDirectMusicGraphImpl
;
typedef
struct
IDirectMusicAudioPathImpl
IDirectMusicAudioPathImpl
;
...
...
@@ -139,17 +138,6 @@ struct IDirectMusicSegment8Impl {
};
/*****************************************************************************
* IDirectMusicSegmentState8Impl implementation structure
*/
struct
IDirectMusicSegmentState8Impl
{
/* IUnknown fields */
const
IDirectMusicSegmentState8Vtbl
*
lpVtbl
;
LONG
ref
;
/* IDirectMusicSegmentState8Impl fields */
};
/*****************************************************************************
* IDirectMusicGraphImpl implementation structure
*/
struct
IDirectMusicGraphImpl
{
...
...
dlls/dmime/segmentstate.c
View file @
347da355
...
...
@@ -21,119 +21,140 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dmime
);
/* IDirectMusicSegmentState8Impl IUnknown part: */
static
HRESULT
WINAPI
IDirectMusicSegmentState8Impl_QueryInterface
(
LPDIRECTMUSICSEGMENTSTATE8
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
if
(
!
riid
||
!
ppobj
)
return
E_POINTER
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSegmentState
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSegmentState8
))
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
This
;
return
S_OK
;
}
WARN
(
"(%p, %s, %p): not found
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
typedef
struct
IDirectMusicSegmentState8Impl
{
IDirectMusicSegmentState8
IDirectMusicSegmentState8_iface
;
LONG
ref
;
}
IDirectMusicSegmentState8Impl
;
static
inline
IDirectMusicSegmentState8Impl
*
impl_from_IDirectMusicSegmentState8
(
IDirectMusicSegmentState8
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectMusicSegmentState8Impl
,
IDirectMusicSegmentState8_iface
);
}
static
ULONG
WINAPI
IDirectMusicSegmentState8Impl_AddRef
(
LPDIRECTMUSICSEGMENTSTATE8
iface
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
static
HRESULT
WINAPI
DirectMusicSegmentState8_QueryInterface
(
IDirectMusicSegmentState8
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
);
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p): AddRef from %d
\n
"
,
This
,
ref
-
1
)
;
*
ppobj
=
NULL
;
DMIME_LockModule
();
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSegmentState
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSegmentState8
))
{
IDirectMusicSegmentState8_AddRef
(
iface
);
*
ppobj
=
&
This
->
IDirectMusicSegmentState8_iface
;
return
S_OK
;
}
return
ref
;
WARN
(
"(%p, %s, %p): not found
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirectMusicSegmentState8Impl_Release
(
LPDIRECTMUSICSEGMENTSTATE8
iface
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
ULONG
WINAPI
DirectMusicSegmentState8_AddRef
(
IDirectMusicSegmentState8
*
iface
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p): %d
\n
"
,
This
,
ref
);
DMIME_LockModule
();
return
ref
;
}
static
ULONG
WINAPI
DirectMusicSegmentState8_Release
(
IDirectMusicSegmentState8
*
iface
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): %d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
DMIME_UnlockModule
();
DMIME_UnlockModule
();
return
ref
;
return
ref
;
}
/* IDirectMusicSegmentState8Impl IDirectMusicSegmentState part: */
static
HRESULT
WINAPI
IDirectMusicSegmentState8Impl_GetRepeats
(
LPDIRECTMUSICSEGMENTSTATE8
iface
,
DWORD
*
pdwRepeats
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pdwRepeats
);
return
S_OK
;
static
HRESULT
WINAPI
DirectMusicSegmentState8_GetRepeats
(
IDirectMusicSegmentState8
*
iface
,
DWORD
*
pdwRepeats
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
)
;
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pdwRepeats
);
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicSegmentState8Impl_GetSegment
(
LPDIRECTMUSICSEGMENTSTATE8
iface
,
IDirectMusicSegment
**
ppSegment
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
ppSegment
);
return
S_OK
;
static
HRESULT
WINAPI
DirectMusicSegmentState8_GetSegment
(
IDirectMusicSegmentState8
*
iface
,
IDirectMusicSegment
**
ppSegment
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
ppSegment
);
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicSegmentState8Impl_GetStartTime
(
LPDIRECTMUSICSEGMENTSTATE8
iface
,
MUSIC_TIME
*
pmtStart
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pmtStart
);
return
S_OK
;
static
HRESULT
WINAPI
DirectMusicSegmentState8_GetStartTime
(
IDirectMusicSegmentState8
*
iface
,
MUSIC_TIME
*
pmtStart
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pmtStart
);
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicSegmentState8Impl_GetSeek
(
LPDIRECTMUSICSEGMENTSTATE8
iface
,
MUSIC_TIME
*
pmtSeek
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pmtSeek
);
return
S_OK
;
static
HRESULT
WINAPI
DirectMusicSegmentState8_GetSeek
(
IDirectMusicSegmentState8
*
iface
,
MUSIC_TIME
*
pmtSeek
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pmtSeek
);
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicSegmentState8Impl_GetStartPoint
(
LPDIRECTMUSICSEGMENTSTATE8
iface
,
MUSIC_TIME
*
pmtStart
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pmtStart
);
return
S_OK
;
static
HRESULT
WINAPI
DirectMusicSegmentState8_GetStartPoint
(
IDirectMusicSegmentState8
*
iface
,
MUSIC_TIME
*
pmtStart
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pmtStart
);
return
S_OK
;
}
/* IDirectMusicSegmentState8Impl IDirectMusicSegmentState8 part: */
static
HRESULT
WINAPI
IDirectMusicSegmentState8Impl_SetTrackConfig
(
LPDIRECTMUSICSEGMENTSTATE8
iface
,
REFGUID
rguidTrackClassID
,
DWORD
dwGroupBits
,
DWORD
dwIndex
,
DWORD
dwFlagsOn
,
DWORD
dwFlagsOff
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
FIXME
(
"(%p, %s, %d, %d, %d, %d): stub
\n
"
,
This
,
debugstr_dmguid
(
rguidTrackClassID
),
dwGroupBits
,
dwIndex
,
dwFlagsOn
,
dwFlagsOff
);
return
S_OK
;
static
HRESULT
WINAPI
DirectMusicSegmentState8_SetTrackConfig
(
IDirectMusicSegmentState8
*
iface
,
REFGUID
rguidTrackClassID
,
DWORD
dwGroupBits
,
DWORD
dwIndex
,
DWORD
dwFlagsOn
,
DWORD
dwFlagsOff
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
);
FIXME
(
"(%p, %s, %d, %d, %d, %d): stub
\n
"
,
This
,
debugstr_dmguid
(
rguidTrackClassID
),
dwGroupBits
,
dwIndex
,
dwFlagsOn
,
dwFlagsOff
);
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicSegmentState8Impl_GetObjectInPath
(
LPDIRECTMUSICSEGMENTSTATE8
iface
,
DWORD
dwPChannel
,
DWORD
dwStage
,
DWORD
dwBuffer
,
REFGUID
guidObject
,
DWORD
dwIndex
,
REFGUID
iidInterface
,
void
**
ppObject
)
{
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
FIXME
(
"(%p, %d, %d, %d, %s, %d, %s, %p): stub
\n
"
,
This
,
dwPChannel
,
dwStage
,
dwBuffer
,
debugstr_dmguid
(
guidObject
),
dwIndex
,
debugstr_dmguid
(
iidInterface
),
ppObject
);
return
S_OK
;
static
HRESULT
WINAPI
DirectMusicSegmentState8_GetObjectInPath
(
IDirectMusicSegmentState8
*
iface
,
DWORD
dwPChannel
,
DWORD
dwStage
,
DWORD
dwBuffer
,
REFGUID
guidObject
,
DWORD
dwIndex
,
REFGUID
iidInterface
,
void
**
ppObject
)
{
IDirectMusicSegmentState8Impl
*
This
=
impl_from_IDirectMusicSegmentState8
(
iface
)
;
FIXME
(
"(%p, %d, %d, %d, %s, %d, %s, %p): stub
\n
"
,
This
,
dwPChannel
,
dwStage
,
dwBuffer
,
debugstr_dmguid
(
guidObject
),
dwIndex
,
debugstr_dmguid
(
iidInterface
),
ppObject
);
return
S_OK
;
}
static
const
IDirectMusicSegmentState8Vtbl
DirectMusicSegmentState8
_
Vtbl
=
{
IDirectMusicSegmentState8Impl
_QueryInterface
,
IDirectMusicSegmentState8Impl
_AddRef
,
IDirectMusicSegmentState8Impl
_Release
,
IDirectMusicSegmentState8Impl
_GetRepeats
,
IDirectMusicSegmentState8Impl
_GetSegment
,
IDirectMusicSegmentState8Impl
_GetStartTime
,
IDirectMusicSegmentState8Impl
_GetSeek
,
IDirectMusicSegmentState8Impl
_GetStartPoint
,
IDirectMusicSegmentState8Impl
_SetTrackConfig
,
IDirectMusicSegmentState8Impl
_GetObjectInPath
static
const
IDirectMusicSegmentState8Vtbl
DirectMusicSegmentState8Vtbl
=
{
DirectMusicSegmentState8
_QueryInterface
,
DirectMusicSegmentState8
_AddRef
,
DirectMusicSegmentState8
_Release
,
DirectMusicSegmentState8
_GetRepeats
,
DirectMusicSegmentState8
_GetSegment
,
DirectMusicSegmentState8
_GetStartTime
,
DirectMusicSegmentState8
_GetSeek
,
DirectMusicSegmentState8
_GetStartPoint
,
DirectMusicSegmentState8
_SetTrackConfig
,
DirectMusicSegmentState8
_GetObjectInPath
};
/* for ClassFactory */
HRESULT
WINAPI
create_dmsegmentstate
(
REFIID
lpcGUID
,
void
**
ppobj
)
HRESULT
WINAPI
create_dmsegmentstate
(
REFIID
riid
,
void
**
ret_iface
)
{
IDirectMusicSegmentState8Impl
*
obj
;
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectMusicSegmentState8Impl
));
if
(
NULL
==
obj
)
{
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
obj
->
lpVtbl
=
&
DirectMusicSegmentState8_Vtbl
;
obj
->
ref
=
0
;
/* will be inited by QueryInterface */
return
IDirectMusicSegmentState8Impl_QueryInterface
((
LPDIRECTMUSICSEGMENTSTATE8
)
obj
,
lpcGUID
,
ppobj
);
IDirectMusicSegmentState8Impl
*
obj
;
HRESULT
hr
;
*
ret_iface
=
NULL
;
obj
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IDirectMusicSegmentState8Impl
));
if
(
!
obj
)
return
E_OUTOFMEMORY
;
obj
->
IDirectMusicSegmentState8_iface
.
lpVtbl
=
&
DirectMusicSegmentState8Vtbl
;
obj
->
ref
=
1
;
hr
=
IDirectMusicSegmentState8_QueryInterface
(
&
obj
->
IDirectMusicSegmentState8_iface
,
riid
,
ret_iface
);
IDirectMusicSegmentState8_Release
(
&
obj
->
IDirectMusicSegmentState8_iface
);
return
hr
;
}
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