1 /* IDirectMusicSegmentState8 Implementation
3 * Copyright (C) 2003-2004 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #include "dmime_private.h"
22 WINE_DEFAULT_DEBUG_CHANNEL(dmime
);
24 /* IDirectMusicSegmentState8Impl IUnknown part: */
25 HRESULT WINAPI
IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface
, REFIID riid
, LPVOID
*ppobj
) {
26 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
27 TRACE("(%p, %s, %p)\n", This
, debugstr_dmguid(riid
), ppobj
);
29 if (IsEqualIID(riid
, &IID_IUnknown
) ||
30 IsEqualIID(riid
, &IID_IDirectMusicSegmentState
) ||
31 IsEqualIID(riid
, &IID_IDirectMusicSegmentState8
)) {
32 IDirectMusicSegmentState8Impl_AddRef(iface
);
36 WARN("(%p, %s, %p): not found\n", This
, debugstr_dmguid(riid
), ppobj
);
40 ULONG WINAPI
IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface
) {
41 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
42 TRACE("(%p): AddRef from %ld\n", This
, This
->ref
);
46 ULONG WINAPI
IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface
) {
47 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
48 ULONG ref
= --This
->ref
;
49 TRACE("(%p): ReleaseRef to %ld\n", This
, This
->ref
);
51 HeapFree(GetProcessHeap(), 0, This
);
56 /* IDirectMusicSegmentState8Impl IDirectMusicSegmentState part: */
57 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface
, DWORD
* pdwRepeats
) {
58 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
59 FIXME("(%p, %p): stub\n", This
, pdwRepeats
);
63 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface
, IDirectMusicSegment
** ppSegment
) {
64 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
65 FIXME("(%p, %p): stub\n", This
, ppSegment
);
69 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface
, MUSIC_TIME
* pmtStart
) {
70 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
71 FIXME("(%p, %p): stub\n", This
, pmtStart
);
75 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface
, MUSIC_TIME
* pmtSeek
) {
76 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
77 FIXME("(%p, %p): stub\n", This
, pmtSeek
);
81 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface
, MUSIC_TIME
* pmtStart
) {
82 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
83 FIXME("(%p, %p): stub\n", This
, pmtStart
);
87 /* IDirectMusicSegmentState8Impl IDirectMusicSegmentState8 part: */
88 HRESULT WINAPI
IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface
, REFGUID rguidTrackClassID
, DWORD dwGroupBits
, DWORD dwIndex
, DWORD dwFlagsOn
, DWORD dwFlagsOff
) {
89 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
90 FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This
, debugstr_dmguid(rguidTrackClassID
), dwGroupBits
, dwIndex
, dwFlagsOn
, dwFlagsOff
);
94 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface
, DWORD dwPChannel
, DWORD dwStage
, DWORD dwBuffer
, REFGUID guidObject
, DWORD dwIndex
, REFGUID iidInterface
, void** ppObject
) {
95 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
96 FIXME("(%p, %ld, %ld, %ld, %s, %ld, %s, %p): stub\n", This
, dwPChannel
, dwStage
, dwBuffer
, debugstr_dmguid(guidObject
), dwIndex
, debugstr_dmguid(iidInterface
), ppObject
);
100 ICOM_VTABLE(IDirectMusicSegmentState8
) DirectMusicSegmentState8_Vtbl
= {
101 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
102 IDirectMusicSegmentState8Impl_QueryInterface
,
103 IDirectMusicSegmentState8Impl_AddRef
,
104 IDirectMusicSegmentState8Impl_Release
,
105 IDirectMusicSegmentState8Impl_GetRepeats
,
106 IDirectMusicSegmentState8Impl_GetSegment
,
107 IDirectMusicSegmentState8Impl_GetStartTime
,
108 IDirectMusicSegmentState8Impl_GetSeek
,
109 IDirectMusicSegmentState8Impl_GetStartPoint
,
110 IDirectMusicSegmentState8Impl_SetTrackConfig
,
111 IDirectMusicSegmentState8Impl_GetObjectInPath
114 /* for ClassFactory */
115 HRESULT WINAPI
DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
) {
116 IDirectMusicSegmentState8Impl
* obj
;
118 obj
= HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirectMusicSegmentState8Impl
));
120 *ppobj
= (LPVOID
) NULL
;
121 return E_OUTOFMEMORY
;
123 obj
->lpVtbl
= &DirectMusicSegmentState8_Vtbl
;
124 obj
->ref
= 0; /* will be inited by QueryInterface */
126 return IDirectMusicSegmentState8Impl_QueryInterface ((LPDIRECTMUSICSEGMENTSTATE8
)obj
, lpcGUID
, ppobj
);