Implement IsTokenRestricted.
[wine] / dlls / dmsynth / dmsynth_private.h
1 /* DirectMusicSynthesizer Private Include
2  *
3  * Copyright (C) 2003-2004 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_DMSYNTH_PRIVATE_H
21 #define __WINE_DMSYNTH_PRIVATE_H
22
23 #include <stdarg.h>
24
25 #define COBJMACROS
26
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winnt.h"
30 #include "wingdi.h"
31 #include "winuser.h"
32
33 #include "wine/debug.h"
34 #include "wine/list.h"
35 #include "wine/unicode.h"
36 #include "winreg.h"
37 #include "objbase.h"
38
39 #include "dmusici.h"
40 #include "dmusicf.h"
41 #include "dmusics.h"
42
43 /*****************************************************************************
44  * Interfaces
45  */
46 typedef struct IDirectMusicSynth8Impl IDirectMusicSynth8Impl;
47 typedef struct IDirectMusicSynthSinkImpl IDirectMusicSynthSinkImpl;
48
49 /*****************************************************************************
50  * ClassFactory
51  */
52 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
53 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
54
55 /*****************************************************************************
56  * IDirectMusicSynth8Impl implementation structure
57  */
58 struct IDirectMusicSynth8Impl {
59   /* IUnknown fields */
60   const IDirectMusicSynth8Vtbl *lpVtbl;
61   DWORD          ref;
62
63   /* IDirectMusicSynth8 fields */
64   DMUS_PORTCAPS pCaps;
65   BOOL fActive;
66   IReferenceClock* pLatencyClock;
67   IDirectMusicSynthSinkImpl* pSynthSink;
68 };
69
70 /* IUnknown: */
71 extern HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface (LPDIRECTMUSICSYNTH8 iface, REFIID riid, LPVOID *ppobj);
72 extern ULONG WINAPI   IDirectMusicSynth8Impl_AddRef (LPDIRECTMUSICSYNTH8 iface);
73
74 /*****************************************************************************
75  * IDirectMusicSynthSinkImpl implementation structure
76  */
77 struct IDirectMusicSynthSinkImpl {
78   /* IUnknown fields */
79   const IDirectMusicSynthSinkVtbl *lpVtbl;
80   DWORD          ref;
81
82   /* IDirectMusicSynthSinkImpl fields */
83 };
84
85 /* IUnknown: */
86 extern ULONG WINAPI   IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface);
87
88 /**********************************************************************
89  * Dll lifetime tracking declaration for dmsynth.dll
90  */
91 extern LONG DMSYNTH_refCount;
92 static inline void DMSYNTH_LockModule(void) { InterlockedIncrement( &DMSYNTH_refCount ); }
93 static inline void DMSYNTH_UnlockModule(void) { InterlockedDecrement( &DMSYNTH_refCount ); }
94
95 /*****************************************************************************
96  * Misc.
97  */
98 /* used for generic dumping (copied from ddraw) */
99 typedef struct {
100     DWORD val;
101     const char* name;
102 } flag_info;
103
104 typedef struct {
105     const GUID *guid;
106     const char* name;
107 } guid_info;
108
109 /* used for initialising structs (primarily for DMUS_OBJECTDESC) */
110 #define DM_STRUCT_INIT(x)                               \
111         do {                                                            \
112                 memset((x), 0, sizeof(*(x)));   \
113                 (x)->dwSize = sizeof(*x);               \
114         } while (0)
115
116 #define FE(x) { x, #x } 
117 #define GE(x) { &x, #x }
118
119 /* FOURCC to string conversion for debug messages */
120 extern const char *debugstr_fourcc (DWORD fourcc);
121 /* DMUS_VERSION struct to string conversion for debug messages */
122 extern const char *debugstr_dmversion (LPDMUS_VERSION version);
123 /* returns name of given GUID */
124 extern const char *debugstr_dmguid (const GUID *id);
125 /* returns name of given error code */
126 extern const char *debugstr_dmreturn (DWORD code);
127 /* generic flags-dumping function */
128 extern const char *debugstr_flags (DWORD flags, const flag_info* names, size_t num_names);
129
130
131 #endif  /* __WINE_DMSYNTH_PRIVATE_H */