Release 20030408.
[wine/gsoc-2012-control.git] / dlls / dmusic / dmusic_plugins.c
blobd022c519ea0fb66dc82e37b59871e6310d0c911b
1 /* IDirectMusicTool Implementation
2 * IDirectMusicTool8 Implementation
3 * IDirectMusicTrack Implementation
4 * IDirectMusicTrack8 Implementation
6 * Copyright (C) 2003 Rok Mandeljc
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Library General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "wingdi.h"
27 #include "wine/debug.h"
29 #include "dmusic_private.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
33 /* IDirectMusicTool IUnknown parts follow: */
34 HRESULT WINAPI IDirectMusicToolImpl_QueryInterface (LPDIRECTMUSICTOOL iface, REFIID riid, LPVOID *ppobj)
36 ICOM_THIS(IDirectMusicToolImpl,iface);
38 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicTool))
40 IDirectMusicToolImpl_AddRef(iface);
41 *ppobj = This;
42 return DS_OK;
44 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
45 return E_NOINTERFACE;
48 ULONG WINAPI IDirectMusicToolImpl_AddRef (LPDIRECTMUSICTOOL iface)
50 ICOM_THIS(IDirectMusicToolImpl,iface);
51 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
52 return ++(This->ref);
55 ULONG WINAPI IDirectMusicToolImpl_Release (LPDIRECTMUSICTOOL iface)
57 ICOM_THIS(IDirectMusicToolImpl,iface);
58 ULONG ref = --This->ref;
59 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
60 if (ref == 0)
62 HeapFree(GetProcessHeap(), 0, This);
64 return ref;
67 /* IDirectMusicTool Interface follow: */
68 HRESULT WINAPI IDirectMusicToolImpl_Init (LPDIRECTMUSICTOOL iface, IDirectMusicGraph* pGraph)
70 FIXME("stub\n");
71 return DS_OK;
74 HRESULT WINAPI IDirectMusicToolImpl_GetMsgDeliveryType (LPDIRECTMUSICTOOL iface, DWORD* pdwDeliveryType)
76 FIXME("stub\n");
77 return DS_OK;
80 HRESULT WINAPI IDirectMusicToolImpl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL iface, DWORD* pdwNumElements)
82 FIXME("stub\n");
83 return DS_OK;
86 HRESULT WINAPI IDirectMusicToolImpl_GetMediaTypes (LPDIRECTMUSICTOOL iface, DWORD** padwMediaTypes, DWORD dwNumElements)
88 FIXME("stub\n");
89 return DS_OK;
92 HRESULT WINAPI IDirectMusicToolImpl_ProcessPMsg (LPDIRECTMUSICTOOL iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG)
94 FIXME("stub\n");
95 return DS_OK;
98 HRESULT WINAPI IDirectMusicToolImpl_Flush (LPDIRECTMUSICTOOL iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime)
100 FIXME("stub\n");
101 return DS_OK;
104 ICOM_VTABLE(IDirectMusicTool) DirectMusicTool_Vtbl =
106 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
107 IDirectMusicToolImpl_QueryInterface,
108 IDirectMusicToolImpl_AddRef,
109 IDirectMusicToolImpl_Release,
110 IDirectMusicToolImpl_Init,
111 IDirectMusicToolImpl_GetMsgDeliveryType,
112 IDirectMusicToolImpl_GetMediaTypeArraySize,
113 IDirectMusicToolImpl_GetMediaTypes,
114 IDirectMusicToolImpl_ProcessPMsg,
115 IDirectMusicToolImpl_Flush
119 /* IDirectMusicTool8 IUnknown parts follow: */
120 HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj)
122 ICOM_THIS(IDirectMusicTool8Impl,iface);
124 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicTool8))
126 IDirectMusicTool8Impl_AddRef(iface);
127 *ppobj = This;
128 return DS_OK;
130 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
131 return E_NOINTERFACE;
134 ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface)
136 ICOM_THIS(IDirectMusicTool8Impl,iface);
137 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
138 return ++(This->ref);
141 ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface)
143 ICOM_THIS(IDirectMusicTool8Impl,iface);
144 ULONG ref = --This->ref;
145 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
146 if (ref == 0)
148 HeapFree(GetProcessHeap(), 0, This);
150 return ref;
153 /* IDirectMusicTool8 Interface follow: */
154 HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph)
156 FIXME("stub\n");
157 return DS_OK;
160 HRESULT WINAPI IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface, DWORD* pdwDeliveryType)
162 FIXME("stub\n");
163 return DS_OK;
166 HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface, DWORD* pdwNumElements)
168 FIXME("stub\n");
169 return DS_OK;
172 HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface, DWORD** padwMediaTypes, DWORD dwNumElements)
174 FIXME("stub\n");
175 return DS_OK;
178 HRESULT WINAPI IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG)
180 FIXME("stub\n");
181 return DS_OK;
184 HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime)
186 FIXME("stub\n");
187 return DS_OK;
190 HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool)
192 FIXME("stub\n");
193 return DS_OK;
196 ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl =
198 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
199 IDirectMusicTool8Impl_QueryInterface,
200 IDirectMusicTool8Impl_AddRef,
201 IDirectMusicTool8Impl_Release,
202 IDirectMusicTool8Impl_Init,
203 IDirectMusicTool8Impl_GetMsgDeliveryType,
204 IDirectMusicTool8Impl_GetMediaTypeArraySize,
205 IDirectMusicTool8Impl_GetMediaTypes,
206 IDirectMusicTool8Impl_ProcessPMsg,
207 IDirectMusicTool8Impl_Flush,
208 IDirectMusicTool8Impl_Clone
212 /* IDirectMusicTrack IUnknown parts follow: */
213 HRESULT WINAPI IDirectMusicTrackImpl_QueryInterface (LPDIRECTMUSICTRACK iface, REFIID riid, LPVOID *ppobj)
215 ICOM_THIS(IDirectMusicTrackImpl,iface);
217 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicTrack))
219 IDirectMusicTrackImpl_AddRef(iface);
220 *ppobj = This;
221 return DS_OK;
223 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
224 return E_NOINTERFACE;
227 ULONG WINAPI IDirectMusicTrackImpl_AddRef (LPDIRECTMUSICTRACK iface)
229 ICOM_THIS(IDirectMusicTrackImpl,iface);
230 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
231 return ++(This->ref);
234 ULONG WINAPI IDirectMusicTrackImpl_Release (LPDIRECTMUSICTRACK iface)
236 ICOM_THIS(IDirectMusicTrackImpl,iface);
237 ULONG ref = --This->ref;
238 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
239 if (ref == 0)
241 HeapFree(GetProcessHeap(), 0, This);
243 return ref;
245 /* IDirectMusicTrack Interface follow: */
246 HRESULT WINAPI IDirectMusicTrackImpl_Init (LPDIRECTMUSICTRACK iface, IDirectMusicSegment* pSegment)
248 FIXME("stub\n");
249 return DS_OK;
252 HRESULT WINAPI IDirectMusicTrackImpl_InitPlay (LPDIRECTMUSICTRACK iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrackID, DWORD dwFlags)
254 FIXME("stub\n");
255 return DS_OK;
258 HRESULT WINAPI IDirectMusicTrackImpl_EndPlay (LPDIRECTMUSICTRACK iface, void* pStateData)
260 FIXME("stub\n");
261 return DS_OK;
264 HRESULT WINAPI IDirectMusicTrackImpl_Play (LPDIRECTMUSICTRACK iface, void* pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID)
266 FIXME("stub\n");
267 return DS_OK;
270 HRESULT WINAPI IDirectMusicTrackImpl_GetParam (LPDIRECTMUSICTRACK iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
272 FIXME("stub\n");
273 return DS_OK;
276 HRESULT WINAPI IDirectMusicTrackImpl_SetParam (LPDIRECTMUSICTRACK iface, REFGUID rguidType, MUSIC_TIME mtTime, void* pParam)
278 FIXME("stub\n");
279 return DS_OK;
282 HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported (LPDIRECTMUSICTRACK iface, REFGUID rguidType)
284 FIXME("stub\n");
285 return DS_OK;
288 HRESULT WINAPI IDirectMusicTrackImpl_AddNotificationType (LPDIRECTMUSICTRACK iface, REFGUID rguidNotificationType)
290 FIXME("stub\n");
291 return DS_OK;
294 HRESULT WINAPI IDirectMusicTrackImpl_RemoveNotificationType (LPDIRECTMUSICTRACK iface, REFGUID rguidNotificationType)
296 FIXME("stub\n");
297 return DS_OK;
300 HRESULT WINAPI IDirectMusicTrackImpl_Clone (LPDIRECTMUSICTRACK iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack)
302 FIXME("stub\n");
303 return DS_OK;
306 ICOM_VTABLE(IDirectMusicTrack) DirectMusicTrack_Vtbl =
308 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
309 IDirectMusicTrackImpl_QueryInterface,
310 IDirectMusicTrackImpl_AddRef,
311 IDirectMusicTrackImpl_Release,
312 IDirectMusicTrackImpl_Init,
313 IDirectMusicTrackImpl_InitPlay,
314 IDirectMusicTrackImpl_EndPlay,
315 IDirectMusicTrackImpl_Play,
316 IDirectMusicTrackImpl_GetParam,
317 IDirectMusicTrackImpl_SetParam,
318 IDirectMusicTrackImpl_IsParamSupported,
319 IDirectMusicTrackImpl_AddNotificationType,
320 IDirectMusicTrackImpl_RemoveNotificationType,
321 IDirectMusicTrackImpl_Clone
324 /* IDirectMusicTrack8 IUnknown parts follow: */
325 HRESULT WINAPI IDirectMusicTrack8Impl_QueryInterface (LPDIRECTMUSICTRACK8 iface, REFIID riid, LPVOID *ppobj)
327 ICOM_THIS(IDirectMusicTrack8Impl,iface);
329 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicTrack8))
331 IDirectMusicTrack8Impl_AddRef(iface);
332 *ppobj = This;
333 return DS_OK;
335 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
336 return E_NOINTERFACE;
339 ULONG WINAPI IDirectMusicTrack8Impl_AddRef (LPDIRECTMUSICTRACK8 iface)
341 ICOM_THIS(IDirectMusicTrack8Impl,iface);
342 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
343 return ++(This->ref);
346 ULONG WINAPI IDirectMusicTrack8Impl_Release (LPDIRECTMUSICTRACK8 iface)
348 ICOM_THIS(IDirectMusicTrack8Impl,iface);
349 ULONG ref = --This->ref;
350 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
351 if (ref == 0)
353 HeapFree(GetProcessHeap(), 0, This);
355 return ref;
357 /* IDirectMusicTrack Interface part follow: */
358 HRESULT WINAPI IDirectMusicTrack8Impl_Init (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegment* pSegment)
360 FIXME("stub\n");
361 return DS_OK;
364 HRESULT WINAPI IDirectMusicTrack8Impl_InitPlay (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrack8ID, DWORD dwFlags)
366 FIXME("stub\n");
367 return DS_OK;
370 HRESULT WINAPI IDirectMusicTrack8Impl_EndPlay (LPDIRECTMUSICTRACK8 iface, void* pStateData)
372 FIXME("stub\n");
373 return DS_OK;
376 HRESULT WINAPI IDirectMusicTrack8Impl_Play (LPDIRECTMUSICTRACK8 iface, void* pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID)
378 FIXME("stub\n");
379 return DS_OK;
382 HRESULT WINAPI IDirectMusicTrack8Impl_GetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
384 FIXME("stub\n");
385 return DS_OK;
388 HRESULT WINAPI IDirectMusicTrack8Impl_SetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, void* pParam)
390 FIXME("stub\n");
391 return DS_OK;
394 HRESULT WINAPI IDirectMusicTrack8Impl_IsParamSupported (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType)
396 FIXME("stub\n");
397 return DS_OK;
400 HRESULT WINAPI IDirectMusicTrack8Impl_AddNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType)
402 FIXME("stub\n");
403 return DS_OK;
406 HRESULT WINAPI IDirectMusicTrack8Impl_RemoveNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType)
408 FIXME("stub\n");
409 return DS_OK;
412 HRESULT WINAPI IDirectMusicTrack8Impl_Clone (LPDIRECTMUSICTRACK8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack)
414 FIXME("stub\n");
415 return DS_OK;
418 /* IDirectMusicTrack8 Interface part follow: */
420 HRESULT WINAPI IDirectMusicTrack8Impl_PlayEx (LPDIRECTMUSICTRACK8 iface, void* pStateData, REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd, REFERENCE_TIME rtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID)
422 FIXME("stub\n");
423 return DS_OK;
426 HRESULT WINAPI IDirectMusicTrack8Impl_GetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, REFERENCE_TIME* prtNext, void* pParam, void* pStateData, DWORD dwFlags)
428 FIXME("stub\n");
429 return DS_OK;
432 HRESULT WINAPI IDirectMusicTrack8Impl_SetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, void* pParam, void* pStateData, DWORD dwFlags)
434 FIXME("stub\n");
435 return DS_OK;
438 HRESULT WINAPI IDirectMusicTrack8Impl_Compose (LPDIRECTMUSICTRACK8 iface, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack)
440 FIXME("stub\n");
441 return DS_OK;
444 HRESULT WINAPI IDirectMusicTrack8Impl_Join (LPDIRECTMUSICTRACK8 iface, IDirectMusicTrack* pNewTrack, MUSIC_TIME mtJoin, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack)
446 FIXME("stub\n");
447 return DS_OK;
450 ICOM_VTABLE(IDirectMusicTrack8) DirectMusicTrack8_Vtbl =
452 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
453 IDirectMusicTrack8Impl_QueryInterface,
454 IDirectMusicTrack8Impl_AddRef,
455 IDirectMusicTrack8Impl_Release,
456 IDirectMusicTrack8Impl_Init,
457 IDirectMusicTrack8Impl_InitPlay,
458 IDirectMusicTrack8Impl_EndPlay,
459 IDirectMusicTrack8Impl_Play,
460 IDirectMusicTrack8Impl_GetParam,
461 IDirectMusicTrack8Impl_SetParam,
462 IDirectMusicTrack8Impl_IsParamSupported,
463 IDirectMusicTrack8Impl_AddNotificationType,
464 IDirectMusicTrack8Impl_RemoveNotificationType,
465 IDirectMusicTrack8Impl_Clone,
466 IDirectMusicTrack8Impl_PlayEx,
467 IDirectMusicTrack8Impl_GetParamEx,
468 IDirectMusicTrack8Impl_SetParamEx,
469 IDirectMusicTrack8Impl_Compose,
470 IDirectMusicTrack8Impl_Join