Added stubs for AccessCheckByType, AddAuditAccessAce,
[wine] / dlls / dmime / segmentstate.c
1 /* IDirectMusicSegmentState8 Implementation
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 #include <stdarg.h>
21
22 #include "windef.h"
23 #include "winbase.h"
24 #include "winuser.h"
25 #include "wingdi.h"
26 #include "wine/debug.h"
27
28 #include "dmime_private.h"
29
30 WINE_DEFAULT_DEBUG_CHANNEL(dmime);
31
32
33 /* IDirectMusicSegmentState8 IUnknown part: */
34 HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj)
35 {
36         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
37
38         if (IsEqualIID(riid, &IID_IUnknown) || 
39             IsEqualIID(riid, &IID_IDirectMusicSegmentState) ||
40             IsEqualIID(riid, &IID_IDirectMusicSegmentState8)) {
41                 IDirectMusicSegmentState8Impl_AddRef(iface);
42                 *ppobj = This;
43                 return S_OK;
44         }
45         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
46         return E_NOINTERFACE;
47 }
48
49 ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface)
50 {
51         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
52         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
53         return ++(This->ref);
54 }
55
56 ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface)
57 {
58         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
59         ULONG ref = --This->ref;
60         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
61         if (ref == 0) {
62                 HeapFree(GetProcessHeap(), 0, This);
63         }
64         return ref;
65 }
66
67 /* IDirectMusicSegmentState8 IDirectMusicSegmentState part: */
68 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface,  DWORD* pdwRepeats)
69 {
70         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
71
72         FIXME("(%p, %p): stub\n", This, pdwRepeats);
73
74         return S_OK;
75 }
76
77 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface, IDirectMusicSegment** ppSegment)
78 {
79         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
80
81         FIXME("(%p, %p): stub\n", This, ppSegment);
82
83         return S_OK;
84 }
85
86 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
87 {
88         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
89
90         FIXME("(%p, %p): stub\n", This, pmtStart);
91
92         return S_OK;
93 }
94
95 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtSeek)
96 {
97         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
98
99         FIXME("(%p, %p): stub\n", This, pmtSeek);
100
101         return S_OK;
102 }
103
104 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
105 {
106         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
107
108         FIXME("(%p, %p): stub\n", This, pmtStart);
109
110         return S_OK;
111 }
112
113 /* IDirectMusicSegmentState8 IDirectMusicSegmentState8 part: */
114 HRESULT WINAPI IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff)
115 {
116         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
117
118         FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This, debugstr_guid(rguidTrackClassID), dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff);
119
120         return S_OK;
121 }
122
123 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject)
124 {
125         ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
126
127         FIXME("(%p, %ld, %ld, %ld, %s, %ld, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_guid(guidObject), dwIndex, debugstr_guid(iidInterface), ppObject);
128
129         return S_OK;
130 }
131
132 ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl =
133 {
134     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
135         IDirectMusicSegmentState8Impl_QueryInterface,
136         IDirectMusicSegmentState8Impl_AddRef,
137         IDirectMusicSegmentState8Impl_Release,
138         IDirectMusicSegmentState8Impl_GetRepeats,
139         IDirectMusicSegmentState8Impl_GetSegment,
140         IDirectMusicSegmentState8Impl_GetStartTime,
141         IDirectMusicSegmentState8Impl_GetSeek,
142         IDirectMusicSegmentState8Impl_GetStartPoint,
143         IDirectMusicSegmentState8Impl_SetTrackConfig,
144         IDirectMusicSegmentState8Impl_GetObjectInPath
145 };
146
147 /* for ClassFactory */
148 HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentState (LPCGUID lpcGUID, LPDIRECTMUSICSEGMENTSTATE8 *ppDMSeg, LPUNKNOWN pUnkOuter)
149 {
150         if (IsEqualIID (lpcGUID, &IID_IDirectMusicSegmentState)
151                 || IsEqualIID (lpcGUID, &IID_IDirectMusicSegmentState8)) {
152                 FIXME("Not yet\n");
153                 return E_NOINTERFACE;
154         }
155         WARN("No interface found\n");
156         
157         return E_NOINTERFACE;   
158 }