Spelling/Grammar fixes.
[wine] / dlls / dmusic / portdownload.c
1 /* IDirectMusicPortDownloadImpl 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 "dmusic_private.h"
29
30 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
31
32 /* IDirectMusicPortDownload IUnknown parts follow: */
33 HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ppobj)
34 {
35         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
36
37         if (IsEqualIID (riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) {
38                 IDirectMusicPortDownloadImpl_AddRef(iface);
39                 *ppobj = This;
40                 return S_OK;
41         }
42
43         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
44         return E_NOINTERFACE;
45 }
46
47 ULONG WINAPI IDirectMusicPortDownloadImpl_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface)
48 {
49         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
50         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
51         return ++(This->ref);
52 }
53
54 ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD iface)
55 {
56         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
57         ULONG ref = --This->ref;
58         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
59         if (ref == 0) {
60                 HeapFree(GetProcessHeap(), 0, This);
61         }
62         return ref;
63 }
64
65 /* IDirectMusicPortDownload Interface follow: */
66 HRESULT WINAPI IDirectMusicPortDownloadImpl_GetBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwDLId, IDirectMusicDownload** ppIDMDownload)
67 {
68         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
69         
70         FIXME("(%p, %ld, %p): stub\n", This, dwDLId, ppIDMDownload);
71         
72         return S_OK;
73 }
74
75 HRESULT WINAPI IDirectMusicPortDownloadImpl_AllocateBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwSize, IDirectMusicDownload** ppIDMDownload)
76 {
77         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
78         
79         FIXME("(%p, %ld, %p): stub\n", This, dwSize, ppIDMDownload);
80         
81         return S_OK;
82 }
83
84 HRESULT WINAPI IDirectMusicPortDownloadImpl_GetDLId (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwStartDLId, DWORD dwCount)
85 {
86         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
87         
88         FIXME("(%p, %p, %ld): stub\n", This, pdwStartDLId, dwCount);
89         
90         return S_OK;
91 }
92
93 HRESULT WINAPI IDirectMusicPortDownloadImpl_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwAppend)
94 {
95         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
96         
97         FIXME("(%p, %p): stub\n", This, pdwAppend);
98         
99         return S_OK;
100 }
101
102 HRESULT WINAPI IDirectMusicPortDownloadImpl_Download (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload)
103 {
104         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
105         
106         FIXME("(%p, %p): stub\n", This, pIDMDownload);
107         
108         return S_OK;
109 }
110
111 HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload)
112 {
113         ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
114         
115         FIXME("(%p, %p): stub\n", This, pIDMDownload);
116         
117         return S_OK;
118 }
119
120 ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl =
121 {
122     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
123         IDirectMusicPortDownloadImpl_QueryInterface,
124         IDirectMusicPortDownloadImpl_AddRef,
125         IDirectMusicPortDownloadImpl_Release,
126         IDirectMusicPortDownloadImpl_GetBuffer,
127         IDirectMusicPortDownloadImpl_AllocateBuffer,
128         IDirectMusicPortDownloadImpl_GetDLId,
129         IDirectMusicPortDownloadImpl_GetAppend,
130         IDirectMusicPortDownloadImpl_Download,
131         IDirectMusicPortDownloadImpl_Unload
132 };
133
134 /* for ClassFactory */
135 HRESULT WINAPI DMUSIC_CreateDirectMusicPortDownload (LPCGUID lpcGUID, LPDIRECTMUSICPORTDOWNLOAD* ppDMPortDL, LPUNKNOWN pUnkOuter)
136 {
137         if (IsEqualIID (lpcGUID, &IID_IDirectMusicPortDownload))
138         {
139                 FIXME("Not yet\n");
140                 return E_NOINTERFACE;
141         }
142
143         WARN("No interface found\n");   
144         return E_NOINTERFACE;   
145 }