1 /* DirectMusicBand Private Include
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 #ifndef __WINE_DMBAND_PRIVATE_H
21 #define __WINE_DMBAND_PRIVATE_H
35 #include "wine/debug.h"
36 #include "wine/list.h"
37 #include "wine/unicode.h"
45 /*****************************************************************************
48 typedef struct IDirectMusicBandImpl IDirectMusicBandImpl;
50 typedef struct IDirectMusicBandTrack IDirectMusicBandTrack;
52 /*****************************************************************************
55 extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
57 extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
60 /*****************************************************************************
61 * Auxiliary definitions
63 /* i don't like M$'s idea about two different band item headers, so behold: universal one */
64 typedef struct _DMUS_PRIVATE_BAND_ITEM_HEADER {
65 DWORD dwVersion; /* 1 or 2 */
69 MUSIC_TIME lBandTimeLogical;
70 MUSIC_TIME lBandTimePhysical;
71 } DMUS_PRIVATE_BAND_ITEM_HEADER;
73 typedef struct _DMUS_PRIVATE_INSTRUMENT {
74 struct list entry; /* for listing elements */
75 DMUS_IO_INSTRUMENT pInstrument;
76 IDirectMusicCollection* ppReferenceCollection;
77 } DMUS_PRIVATE_INSTRUMENT, *LPDMUS_PRIVATE_INSTRUMENT;
79 typedef struct _DMUS_PRIVATE_BAND {
80 struct list entry; /* for listing elements */
81 DMUS_PRIVATE_BAND_ITEM_HEADER pBandHeader;
82 IDirectMusicBandImpl* ppBand;
83 } DMUS_PRIVATE_BAND, *LPDMUS_PRIVATE_BAND;
86 /*****************************************************************************
87 * IDirectMusicBandImpl implementation structure
89 struct IDirectMusicBandImpl {
91 const IUnknownVtbl *UnknownVtbl;
92 const IDirectMusicBandVtbl *BandVtbl;
93 const IDirectMusicObjectVtbl *ObjectVtbl;
94 const IPersistStreamVtbl *PersistStreamVtbl;
97 /* IDirectMusicBandImpl fields */
98 LPDMUS_OBJECTDESC pDesc;
100 struct list Instruments;
104 extern ULONG WINAPI IDirectMusicBandImpl_IUnknown_AddRef (LPUNKNOWN iface);
105 /* IDirectMusicBand: */
106 extern ULONG WINAPI IDirectMusicBandImpl_IDirectMusicBand_AddRef (LPDIRECTMUSICBAND iface);
107 /* IDirectMusicObject: */
108 extern ULONG WINAPI IDirectMusicBandImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface);
109 /* IPersistStream: */
110 extern ULONG WINAPI IDirectMusicBandImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface);
112 /*****************************************************************************
113 * IDirectMusicBandTrack implementation structure
115 struct IDirectMusicBandTrack {
116 /* IUnknown fields */
117 const IUnknownVtbl *UnknownVtbl;
118 const IDirectMusicTrack8Vtbl *TrackVtbl;
119 const IPersistStreamVtbl *PersistStreamVtbl;
122 /* IDirectMusicBandTrack fields */
123 LPDMUS_OBJECTDESC pDesc;
124 DMUS_IO_BAND_TRACK_HEADER header;
131 extern ULONG WINAPI IDirectMusicBandTrack_IUnknown_AddRef (LPUNKNOWN iface);
132 /* IDirectMusicTrack(8): */
133 extern ULONG WINAPI IDirectMusicBandTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface);
134 /* IPersistStream: */
135 extern ULONG WINAPI IDirectMusicBandTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface);
137 /**********************************************************************
138 * Dll lifetime tracking declaration for dmband.dll
140 extern LONG DMBAND_refCount;
141 static inline void DMBAND_LockModule() { InterlockedIncrement( &DMBAND_refCount ); }
142 static inline void DMBAND_UnlockModule() { InterlockedDecrement( &DMBAND_refCount ); }
144 /*****************************************************************************
150 #endif /* __WINE_DMBAND_PRIVATE_H */