Add a couple of missing spec files.
[wine.git] / dlls / dmband / dmband_private.h
blob9f56f47dc0bfdb21467f54aee44a217326ddca69
1 /* DirectMusicBand Private Include
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.
20 #ifndef __WINE_DMBAND_PRIVATE_H
21 #define __WINE_DMBAND_PRIVATE_H
23 #include <stdarg.h>
25 #include "windef.h"
26 #include "wine/debug.h"
27 #include "winbase.h"
28 #include "winnt.h"
29 #include "wingdi.h"
30 #include "dmusicc.h"
31 #include "dmusici.h"
32 #include "dmusics.h"
33 #include "dmplugin.h"
34 #include "dmusicf.h"
35 #include "dsound.h"
36 #include "wine/list.h"
39 /*****************************************************************************
40 * Interfaces
42 typedef struct IDirectMusicBandImpl IDirectMusicBandImpl;
44 typedef struct IDirectMusicBandObject IDirectMusicBandObject;
45 typedef struct IDirectMusicBandObjectStream IDirectMusicBandObjectStream;
47 typedef struct IDirectMusicBandTrack IDirectMusicBandTrack;
48 typedef struct IDirectMusicBandTrackStream IDirectMusicBandTrackStream;
50 /*****************************************************************************
51 * Predeclare the interface implementation structures
53 extern ICOM_VTABLE(IDirectMusicBand) DirectMusicBand_Vtbl;
55 extern ICOM_VTABLE(IDirectMusicObject) DirectMusicBandObject_Vtbl;
56 extern ICOM_VTABLE(IPersistStream) DirectMusicBandObjectStream_Vtbl;
58 extern ICOM_VTABLE(IDirectMusicTrack8) DirectMusicBandTrack_Vtbl;
59 extern ICOM_VTABLE(IPersistStream) DirectMusicBandTrackStream_Vtbl;
61 /*****************************************************************************
62 * ClassFactory
63 * can support IID_IDirectMusicBand
64 * return always an IDirectMusicBandImpl
66 extern HRESULT WINAPI DMUSIC_CreateDirectMusicBand (LPCGUID lpcGUID, LPDIRECTMUSICBAND* ppDMBand, LPUNKNOWN pUnkOuter);
68 extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandObject (LPCGUID lpcGUID, LPDIRECTMUSICOBJECT* ppObject, LPUNKNOWN pUnkOuter);
70 extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPDIRECTMUSICTRACK8* ppTrack, LPUNKNOWN pUnkOuter);
73 /*****************************************************************************
74 * Auxiliary definitions
76 /* i don't like M$'s idea about two different band item headers, so behold: universal one */
77 typedef struct _DMUS_PRIVATE_BAND_ITEM_HEADER {
78 DWORD dwVersion; /* 1 or 2 */
79 /* v.1 */
80 MUSIC_TIME lBandTime;
81 /* v.2 */
82 MUSIC_TIME lBandTimeLogical;
83 MUSIC_TIME lBandTimePhysical;
84 } DMUS_PRIVATE_BAND_ITEM_HEADER;
86 typedef struct _DMUS_PRIVATE_INSTRUMENT {
87 struct list entry; /* for listing elements */
88 DMUS_IO_INSTRUMENT pInstrument;
89 IDirectMusicCollection* ppReferenceCollection;
90 } DMUS_PRIVATE_INSTRUMENT, *LPDMUS_PRIVATE_INSTRUMENT;
92 typedef struct _DMUS_PRIVATE_BAND {
93 struct list entry; /* for listing elements */
94 DMUS_PRIVATE_BAND_ITEM_HEADER pBandHeader;
95 IDirectMusicBandImpl* ppBand;
96 } DMUS_PRIVATE_BAND, *LPDMUS_PRIVATE_BAND;
99 /*****************************************************************************
100 * IDirectMusicBandImpl implementation structure
102 struct IDirectMusicBandImpl
104 /* IUnknown fields */
105 ICOM_VFIELD(IDirectMusicBand);
106 DWORD ref;
108 /* IDirectMusicBandImpl fields */
109 IDirectMusicBandObject* pObject;
111 GUID* guidID; /* unique id */
112 DMUS_IO_VERSION* vVersion; /* version */
113 /* info from UNFO list */
114 WCHAR* wzName;
115 WCHAR* wzArtist;
116 WCHAR* wzCopyright;
117 WCHAR* wzSubject;
118 WCHAR* wzComment;
120 /* data */
121 struct list Instruments;
124 /* IUnknown: */
125 extern HRESULT WINAPI IDirectMusicBandImpl_QueryInterface (LPDIRECTMUSICBAND iface, REFIID riid, LPVOID *ppobj);
126 extern ULONG WINAPI IDirectMusicBandImpl_AddRef (LPDIRECTMUSICBAND iface);
127 extern ULONG WINAPI IDirectMusicBandImpl_Release (LPDIRECTMUSICBAND iface);
128 /* IDirectMusicBand: */
129 extern HRESULT WINAPI IDirectMusicBandImpl_CreateSegment (LPDIRECTMUSICBAND iface, IDirectMusicSegment** ppSegment);
130 extern HRESULT WINAPI IDirectMusicBandImpl_Download (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance);
131 extern HRESULT WINAPI IDirectMusicBandImpl_Unload (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance);
134 /*****************************************************************************
135 * IDirectMusicBandObject implementation structure
137 struct IDirectMusicBandObject
139 /* IUnknown fields */
140 ICOM_VFIELD(IDirectMusicObject);
141 DWORD ref;
143 /* IDirectMusicObjectImpl fields */
144 LPDMUS_OBJECTDESC pDesc;
145 IDirectMusicBandObjectStream* pStream;
146 IDirectMusicBandImpl* pBand;
149 /* IUnknown: */
150 extern HRESULT WINAPI IDirectMusicBandObject_QueryInterface (LPDIRECTMUSICOBJECT iface, REFIID riid, LPVOID *ppobj);
151 extern ULONG WINAPI IDirectMusicBandObject_AddRef (LPDIRECTMUSICOBJECT iface);
152 extern ULONG WINAPI IDirectMusicBandObject_Release (LPDIRECTMUSICOBJECT iface);
153 /* IDirectMusicObject: */
154 extern HRESULT WINAPI IDirectMusicBandObject_GetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
155 extern HRESULT WINAPI IDirectMusicBandObject_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
156 extern HRESULT WINAPI IDirectMusicBandObject_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc);
158 /*****************************************************************************
159 * IDirectMusicBandObjectStream implementation structure
161 struct IDirectMusicBandObjectStream
163 /* IUnknown fields */
164 ICOM_VFIELD (IPersistStream);
165 DWORD ref;
167 /* IPersistStreamImpl fields */
168 IDirectMusicBandObject* pParentObject;
171 /* IUnknown: */
172 extern HRESULT WINAPI IDirectMusicBandObjectStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject);
173 extern ULONG WINAPI IDirectMusicBandObjectStream_AddRef (LPPERSISTSTREAM iface);
174 extern ULONG WINAPI IDirectMusicBandObjectStream_Release (LPPERSISTSTREAM iface);
175 /* IPersist: */
176 extern HRESULT WINAPI IDirectMusicBandObjectStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID);
177 /* IPersistStream: */
178 extern HRESULT WINAPI IDirectMusicBandObjectStream_IsDirty (LPPERSISTSTREAM iface);
179 extern HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream* pStm);
180 extern HRESULT WINAPI IDirectMusicBandObjectStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
181 extern HRESULT WINAPI IDirectMusicBandObjectStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
184 /*****************************************************************************
185 * IDirectMusicBandTrack implementation structure
187 struct IDirectMusicBandTrack
189 /* IUnknown fields */
190 ICOM_VFIELD(IDirectMusicTrack8);
191 DWORD ref;
193 /* IDirectMusicBandTrack fields */
194 IDirectMusicBandTrackStream* pStream;
195 DMUS_IO_BAND_TRACK_HEADER* btkHeader; /* header */
196 GUID* guidID; /* unique id */
197 DMUS_IO_VERSION* vVersion; /* version */
198 /* info from UNFO list */
199 WCHAR* wzName;
200 WCHAR* wzArtist;
201 WCHAR* wzCopyright;
202 WCHAR* wzSubject;
203 WCHAR* wzComment;
205 /* data */
206 struct list Bands;
209 /* IUnknown: */
210 extern HRESULT WINAPI IDirectMusicBandTrack_QueryInterface (LPDIRECTMUSICTRACK8 iface, REFIID riid, LPVOID *ppobj);
211 extern ULONG WINAPI IDirectMusicBandTrack_AddRef (LPDIRECTMUSICTRACK8 iface);
212 extern ULONG WINAPI IDirectMusicBandTrack_Release (LPDIRECTMUSICTRACK8 iface);
213 /* IDirectMusicTrack: */
214 extern HRESULT WINAPI IDirectMusicBandTrack_Init (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegment* pSegment);
215 extern HRESULT WINAPI IDirectMusicBandTrack_InitPlay (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrackID, DWORD dwFlags);
216 extern HRESULT WINAPI IDirectMusicBandTrack_EndPlay (LPDIRECTMUSICTRACK8 iface, void* pStateData);
217 extern HRESULT WINAPI IDirectMusicBandTrack_Play (LPDIRECTMUSICTRACK8 iface, void* pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID);
218 extern HRESULT WINAPI IDirectMusicBandTrack_GetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam);
219 extern HRESULT WINAPI IDirectMusicBandTrack_SetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, void* pParam);
220 extern HRESULT WINAPI IDirectMusicBandTrack_IsParamSupported (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType);
221 extern HRESULT WINAPI IDirectMusicBandTrack_AddNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType);
222 extern HRESULT WINAPI IDirectMusicBandTrack_RemoveNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType);
223 extern HRESULT WINAPI IDirectMusicBandTrack_Clone (LPDIRECTMUSICTRACK8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack);
224 /* IDirectMusicTrack8: */
225 extern HRESULT WINAPI IDirectMusicBandTrack_PlayEx (LPDIRECTMUSICTRACK8 iface, void* pStateData, REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd, REFERENCE_TIME rtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID);
226 extern HRESULT WINAPI IDirectMusicBandTrack_GetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, REFERENCE_TIME* prtNext, void* pParam, void* pStateData, DWORD dwFlags);
227 extern HRESULT WINAPI IDirectMusicBandTrack_SetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, void* pParam, void* pStateData, DWORD dwFlags);
228 extern HRESULT WINAPI IDirectMusicBandTrack_Compose (LPDIRECTMUSICTRACK8 iface, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack);
229 extern HRESULT WINAPI IDirectMusicBandTrack_Join (LPDIRECTMUSICTRACK8 iface, IDirectMusicTrack* pNewTrack, MUSIC_TIME mtJoin, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack);
231 /*****************************************************************************
232 * IDirectMusicBandTrackStream implementation structure
234 struct IDirectMusicBandTrackStream
236 /* IUnknown fields */
237 ICOM_VFIELD (IPersistStream);
238 DWORD ref;
240 /* IPersistStreamImpl fields */
241 IDirectMusicBandTrack* pParentTrack;
244 /* IUnknown: */
245 extern HRESULT WINAPI IDirectMusicBandTrackStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject);
246 extern ULONG WINAPI IDirectMusicBandTrackStream_AddRef (LPPERSISTSTREAM iface);
247 extern ULONG WINAPI IDirectMusicBandTrackStream_Release (LPPERSISTSTREAM iface);
248 /* IPersist: */
249 extern HRESULT WINAPI IDirectMusicBandTrackStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID);
250 /* IPersistStream: */
251 extern HRESULT WINAPI IDirectMusicBandTrackStream_IsDirty (LPPERSISTSTREAM iface);
252 extern HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* pStm);
253 extern HRESULT WINAPI IDirectMusicBandTrackStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
254 extern HRESULT WINAPI IDirectMusicBandTrackStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
256 static inline const char *debugstr_fourcc (DWORD fourcc) {
257 if (!fourcc) return "'null'";
258 return wine_dbg_sprintf ("\'%c%c%c%c\'",
259 (char)(fourcc), (char)(fourcc >> 8),
260 (char)(fourcc >> 16), (char)(fourcc >> 24));
263 #endif /* __WINE_DMBAND_PRIVATE_H */