1 /* IDirectMusicSegmentState8 Implementation
3 * Copyright (C) 2003 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.
26 #include "wine/debug.h"
28 #include "dmime_private.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(dmime
);
33 /* IDirectMusicSegmentState8 IUnknown part: */
34 HRESULT WINAPI
IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface
, REFIID riid
, LPVOID
*ppobj
)
36 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
38 if (IsEqualIID(riid
, &IID_IUnknown
) ||
39 IsEqualIID(riid
, &IID_IDirectMusicSegmentState
) ||
40 IsEqualIID(riid
, &IID_IDirectMusicSegmentState8
)) {
41 IDirectMusicSegmentState8Impl_AddRef(iface
);
45 WARN("(%p)->(%s,%p),not found\n",This
,debugstr_guid(riid
),ppobj
);
49 ULONG WINAPI
IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface
)
51 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
52 TRACE("(%p) : AddRef from %ld\n", This
, This
->ref
);
56 ULONG WINAPI
IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface
)
58 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
59 ULONG ref
= --This
->ref
;
60 TRACE("(%p) : ReleaseRef to %ld\n", This
, This
->ref
);
62 HeapFree(GetProcessHeap(), 0, This
);
67 /* IDirectMusicSegmentState8 IDirectMusicSegmentState part: */
68 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface
, DWORD
* pdwRepeats
)
70 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
72 FIXME("(%p, %p): stub\n", This
, pdwRepeats
);
77 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface
, IDirectMusicSegment
** ppSegment
)
79 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
81 FIXME("(%p, %p): stub\n", This
, ppSegment
);
86 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface
, MUSIC_TIME
* pmtStart
)
88 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
90 FIXME("(%p, %p): stub\n", This
, pmtStart
);
95 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface
, MUSIC_TIME
* pmtSeek
)
97 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
99 FIXME("(%p, %p): stub\n", This
, pmtSeek
);
104 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface
, MUSIC_TIME
* pmtStart
)
106 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
108 FIXME("(%p, %p): stub\n", This
, pmtStart
);
113 /* IDirectMusicSegmentState8 IDirectMusicSegmentState8 part: */
114 HRESULT WINAPI
IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface
, REFGUID rguidTrackClassID
, DWORD dwGroupBits
, DWORD dwIndex
, DWORD dwFlagsOn
, DWORD dwFlagsOff
)
116 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
118 FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This
, debugstr_guid(rguidTrackClassID
), dwGroupBits
, dwIndex
, dwFlagsOn
, dwFlagsOff
);
123 HRESULT WINAPI
IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface
, DWORD dwPChannel
, DWORD dwStage
, DWORD dwBuffer
, REFGUID guidObject
, DWORD dwIndex
, REFGUID iidInterface
, void** ppObject
)
125 ICOM_THIS(IDirectMusicSegmentState8Impl
,iface
);
127 FIXME("(%p, %ld, %ld, %ld, %s, %ld, %s, %p): stub\n", This
, dwPChannel
, dwStage
, dwBuffer
, debugstr_guid(guidObject
), dwIndex
, debugstr_guid(iidInterface
), ppObject
);
132 ICOM_VTABLE(IDirectMusicSegmentState8
) DirectMusicSegmentState8_Vtbl
=
134 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
135 IDirectMusicSegmentState8Impl_QueryInterface
,
136 IDirectMusicSegmentState8Impl_AddRef
,
137 IDirectMusicSegmentState8Impl_Release
,
138 IDirectMusicSegmentState8Impl_GetRepeats
,
139 IDirectMusicSegmentState8Impl_GetSegment
,
140 IDirectMusicSegmentState8Impl_GetStartTime
,
141 IDirectMusicSegmentState8Impl_GetSeek
,
142 IDirectMusicSegmentState8Impl_GetStartPoint
,
143 IDirectMusicSegmentState8Impl_SetTrackConfig
,
144 IDirectMusicSegmentState8Impl_GetObjectInPath
147 /* for ClassFactory */
148 HRESULT WINAPI
DMUSIC_CreateDirectMusicSegmentState (LPCGUID lpcGUID
, LPDIRECTMUSICSEGMENTSTATE8
*ppDMSeg
, LPUNKNOWN pUnkOuter
)
150 if (IsEqualIID (lpcGUID
, &IID_IDirectMusicSegmentState
)
151 || IsEqualIID (lpcGUID
, &IID_IDirectMusicSegmentState8
)) {
153 return E_NOINTERFACE
;
155 WARN("No interface found\n");
157 return E_NOINTERFACE
;