Set SE_GROUP_ENABLED in Attributes of Administrators SID during
[wine] / dlls / dmband / dmband_private.h
1 /* DirectMusicBand Private Include
2  *
3  * Copyright (C) 2003 Rok Mandeljc
4  *
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.
9  *
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.
14  *
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.
18  */
19
20 #ifndef __WINE_DMBAND_PRIVATE_H
21 #define __WINE_DMBAND_PRIVATE_H
22
23 #include "windef.h"
24 #include "wine/debug.h"
25 #include "winbase.h"
26 #include "winnt.h"
27 #include "dmusicc.h"
28 #include "dmusici.h"
29 #include "dmusics.h"
30 #include "dmplugin.h"
31 #include "dmusicf.h"
32 #include "dsound.h"
33
34 /*****************************************************************************
35  * Interfaces
36  */
37 typedef struct IDirectMusicBandImpl IDirectMusicBandImpl;
38
39 typedef struct IDirectMusicBandObject IDirectMusicBandObject;
40 typedef struct IDirectMusicBandObjectStream IDirectMusicBandObjectStream;
41
42 typedef struct IDirectMusicBandTrack IDirectMusicBandTrack;
43 typedef struct IDirectMusicBandTrackStream IDirectMusicBandTrackStream;
44         
45 /*****************************************************************************
46  * Predeclare the interface implementation structures
47  */
48 extern ICOM_VTABLE(IDirectMusicBand) DirectMusicBand_Vtbl;
49
50 extern ICOM_VTABLE(IDirectMusicObject) DirectMusicBandObject_Vtbl;
51 extern ICOM_VTABLE(IPersistStream) DirectMusicBandObjectStream_Vtbl;
52
53 extern ICOM_VTABLE(IDirectMusicTrack8) DirectMusicBandTrack_Vtbl;
54 extern ICOM_VTABLE(IPersistStream) DirectMusicBandTrackStream_Vtbl;
55
56 /*****************************************************************************
57  * ClassFactory
58  * can support IID_IDirectMusicBand
59  * return always an IDirectMusicBandImpl
60  */
61 extern HRESULT WINAPI DMUSIC_CreateDirectMusicBand (LPCGUID lpcGUID, LPDIRECTMUSICBAND* ppDMBand, LPUNKNOWN pUnkOuter);
62
63 extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandObject (LPCGUID lpcGUID, LPDIRECTMUSICOBJECT* ppObject, LPUNKNOWN pUnkOuter);
64
65 extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPDIRECTMUSICTRACK8* ppTrack, LPUNKNOWN pUnkOuter);
66
67 /*****************************************************************************
68  * IDirectMusicBandImpl implementation structure
69  */
70 struct IDirectMusicBandImpl
71 {
72   /* IUnknown fields */
73   ICOM_VFIELD(IDirectMusicBand);
74   DWORD          ref;
75
76   /* IDirectMusicBandImpl fields */
77   IDirectMusicBandObject* pObject;
78   GUID guidID; /* unique id */
79   DMUS_IO_VERSION vVersion; /* version */
80   /* info from UNFO list */
81   WCHAR* wszName;
82   WCHAR* wszArtist;
83   WCHAR* wszCopyright;
84   WCHAR* wszSubject;
85   WCHAR* wszComment;
86   /* data */
87   DMUS_IO_INSTRUMENT pInstruments[255];
88   IDirectMusicCollection* ppReferenceCollection[255];
89   DWORD dwInstruments;
90 };
91
92 /* IUnknown: */
93 extern HRESULT WINAPI IDirectMusicBandImpl_QueryInterface (LPDIRECTMUSICBAND iface, REFIID riid, LPVOID *ppobj);
94 extern ULONG WINAPI   IDirectMusicBandImpl_AddRef (LPDIRECTMUSICBAND iface);
95 extern ULONG WINAPI   IDirectMusicBandImpl_Release (LPDIRECTMUSICBAND iface);
96 /* IDirectMusicBand: */
97 extern HRESULT WINAPI IDirectMusicBandImpl_CreateSegment (LPDIRECTMUSICBAND iface, IDirectMusicSegment** ppSegment);
98 extern HRESULT WINAPI IDirectMusicBandImpl_Download (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance);
99 extern HRESULT WINAPI IDirectMusicBandImpl_Unload (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance);
100
101
102 /*****************************************************************************
103  * IDirectMusicBandObject implementation structure
104  */
105 struct IDirectMusicBandObject
106 {
107   /* IUnknown fields */
108   ICOM_VFIELD(IDirectMusicObject);
109   DWORD          ref;
110
111   /* IDirectMusicObjectImpl fields */
112   LPDMUS_OBJECTDESC pDesc;
113   IDirectMusicBandObjectStream* pStream;
114   IDirectMusicBandImpl* pBand;
115 };
116
117 /* IUnknown: */
118 extern HRESULT WINAPI IDirectMusicBandObject_QueryInterface (LPDIRECTMUSICOBJECT iface, REFIID riid, LPVOID *ppobj);
119 extern ULONG WINAPI   IDirectMusicBandObject_AddRef (LPDIRECTMUSICOBJECT iface);
120 extern ULONG WINAPI   IDirectMusicBandObject_Release (LPDIRECTMUSICOBJECT iface);
121 /* IDirectMusicObject: */
122 extern HRESULT WINAPI IDirectMusicBandObject_GetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
123 extern HRESULT WINAPI IDirectMusicBandObject_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
124 extern HRESULT WINAPI IDirectMusicBandObject_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc);
125
126 /*****************************************************************************
127  * IDirectMusicBandObjectStream implementation structure
128  */
129 struct IDirectMusicBandObjectStream
130 {
131   /* IUnknown fields */
132   ICOM_VFIELD (IPersistStream);
133   DWORD          ref;
134
135   /* IPersistStreamImpl fields */
136   IDirectMusicBandObject* pParentObject;
137 };
138
139 /* IUnknown: */
140 extern HRESULT WINAPI IDirectMusicBandObjectStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject);
141 extern ULONG WINAPI IDirectMusicBandObjectStream_AddRef (LPPERSISTSTREAM iface);
142 extern ULONG WINAPI IDirectMusicBandObjectStream_Release (LPPERSISTSTREAM iface);
143 /* IPersist: */
144 extern HRESULT WINAPI IDirectMusicBandObjectStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID);
145 /* IPersistStream: */
146 extern HRESULT WINAPI IDirectMusicBandObjectStream_IsDirty (LPPERSISTSTREAM iface);
147 extern HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream* pStm);
148 extern HRESULT WINAPI IDirectMusicBandObjectStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
149 extern HRESULT WINAPI IDirectMusicBandObjectStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
150
151 /* i don't like M$'s idea about two different band item headers, so behold: universal one */
152 typedef struct _DMUS_PRIVATE_BAND_ITEM_HEADER {
153         DWORD dwVersion; /* 1 or 2 */
154         /* v.1 */
155         MUSIC_TIME lBandTime;
156         /* v.2 */
157         MUSIC_TIME lBandTimeLogical;
158         MUSIC_TIME lBandTimePhysical;
159 } DMUS_PRIVATE_BAND_ITEM_HEADER;
160
161 /*****************************************************************************
162  * IDirectMusicBandTrack implementation structure
163  */
164 struct IDirectMusicBandTrack
165 {
166   /* IUnknown fields */
167   ICOM_VFIELD(IDirectMusicTrack8);
168   DWORD          ref;
169
170   /* IDirectMusicBandTrack fields */
171   IDirectMusicBandTrackStream* pStream;
172   DMUS_IO_BAND_TRACK_HEADER btkHeader; /* header */
173   GUID guidID; /* unique id */
174   DMUS_IO_VERSION vVersion; /* version */
175   /* info from UNFO list */
176   WCHAR* wszName;
177   WCHAR* wszArtist;
178   WCHAR* wszCopyright;
179   WCHAR* wszSubject;
180   WCHAR* wszComment;
181   /* data */
182   DMUS_PRIVATE_BAND_ITEM_HEADER pBandHeaders[255]; /* band item headers for bands */
183   IDirectMusicBandImpl* ppBands[255]; /* bands */
184   DWORD dwBands; /* nr. of IDirectMusicBandImpl* and DMUS_PRIVATE_BAND_ITEM_HEADER */
185 };
186
187 /* IUnknown: */
188 extern HRESULT WINAPI IDirectMusicBandTrack_QueryInterface (LPDIRECTMUSICTRACK8 iface, REFIID riid, LPVOID *ppobj);
189 extern ULONG WINAPI   IDirectMusicBandTrack_AddRef (LPDIRECTMUSICTRACK8 iface);
190 extern ULONG WINAPI   IDirectMusicBandTrack_Release (LPDIRECTMUSICTRACK8 iface);
191 /* IDirectMusicTrack: */
192 extern HRESULT WINAPI IDirectMusicBandTrack_Init (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegment* pSegment);
193 extern HRESULT WINAPI IDirectMusicBandTrack_InitPlay (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrackID, DWORD dwFlags);
194 extern HRESULT WINAPI IDirectMusicBandTrack_EndPlay (LPDIRECTMUSICTRACK8 iface, void* pStateData);
195 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);
196 extern HRESULT WINAPI IDirectMusicBandTrack_GetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam);
197 extern HRESULT WINAPI IDirectMusicBandTrack_SetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, void* pParam);
198 extern HRESULT WINAPI IDirectMusicBandTrack_IsParamSupported (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType);
199 extern HRESULT WINAPI IDirectMusicBandTrack_AddNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType);
200 extern HRESULT WINAPI IDirectMusicBandTrack_RemoveNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType);
201 extern HRESULT WINAPI IDirectMusicBandTrack_Clone (LPDIRECTMUSICTRACK8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack);
202 /* IDirectMusicTrack8: */
203 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);
204 extern HRESULT WINAPI IDirectMusicBandTrack_GetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, REFERENCE_TIME* prtNext, void* pParam, void* pStateData, DWORD dwFlags);
205 extern HRESULT WINAPI IDirectMusicBandTrack_SetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, void* pParam, void* pStateData, DWORD dwFlags);
206 extern HRESULT WINAPI IDirectMusicBandTrack_Compose (LPDIRECTMUSICTRACK8 iface, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack);
207 extern HRESULT WINAPI IDirectMusicBandTrack_Join (LPDIRECTMUSICTRACK8 iface, IDirectMusicTrack* pNewTrack, MUSIC_TIME mtJoin, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack);
208
209 /*****************************************************************************
210  * IDirectMusicBandTrackStream implementation structure
211  */
212 struct IDirectMusicBandTrackStream
213 {
214   /* IUnknown fields */
215   ICOM_VFIELD (IPersistStream);
216   DWORD          ref;
217
218   /* IPersistStreamImpl fields */
219   IDirectMusicBandTrack* pParentTrack;
220 };
221
222 /* IUnknown: */
223 extern HRESULT WINAPI  IDirectMusicBandTrackStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject);
224 extern ULONG WINAPI IDirectMusicBandTrackStream_AddRef (LPPERSISTSTREAM iface);
225 extern ULONG WINAPI IDirectMusicBandTrackStream_Release (LPPERSISTSTREAM iface);
226 /* IPersist: */
227 extern HRESULT WINAPI IDirectMusicBandTrackStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID);
228 /* IPersistStream: */
229 extern HRESULT WINAPI IDirectMusicBandTrackStream_IsDirty (LPPERSISTSTREAM iface);
230 extern HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* pStm);
231 extern HRESULT WINAPI IDirectMusicBandTrackStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
232 extern HRESULT WINAPI IDirectMusicBandTrackStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
233
234 static inline const char *debugstr_fourcc( DWORD fourcc )
235 {
236     if (!fourcc) return "'null'";
237     return wine_dbg_sprintf( "\'%c%c%c%c\'",
238                              (char)(fourcc), (char)(fourcc >> 8),
239                              (char)(fourcc >> 16), (char)(fourcc >> 24) );
240 }
241
242 #endif  /* __WINE_DMBAND_PRIVATE_H */