ReactOS 0.4.15-dev-7887-g64a59a1
tuningspace.cpp
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS BDA Proxy
4 * FILE: dll/directx/msvidctl/tuningspace.cpp
5 * PURPOSE: ITuningSpace interface
6 *
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org)
8 */
9#include "precomp.h"
10
11const GUID CLSID_DVBTNetworkProvider = {0x216c62df, 0x6d7f, 0x4e9a, {0x85, 0x71, 0x5, 0xf1, 0x4e, 0xdb, 0x76, 0x6a}};
12
14{
15public:
17
19 {
21 return m_Ref;
22 }
24 {
26
27 WCHAR Buffer[100];
28 swprintf(Buffer, L"CTuningSpace::Release : %p Ref %lu\n", this, m_Ref);
30
31 if (!m_Ref)
32 {
33 //delete this;
34 return 0;
35 }
36 return m_Ref;
37 }
38
39 // IDispatch methods
41 HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
42 HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
43 HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
44
45
46 //ITuningSpace methods
66 // IDVBTuningSpace
69
71
72 virtual ~CTuningSpace(){};
73
74protected:
76};
77
81 IN REFIID refiid,
83{
84 if (IsEqualGUID(refiid, IID_IUnknown))
85 {
86 *Output = PVOID(this);
87 reinterpret_cast<IUnknown*>(*Output)->AddRef();
88 return NOERROR;
89 }
90
91 if (IsEqualGUID(refiid, IID_ITuningSpace))
92 {
93 *Output = (ITuningSpace*)this;
94 reinterpret_cast<ITuningSpace*>(*Output)->AddRef();
95 return NOERROR;
96 }
97
98 if (IsEqualGUID(refiid, IID_IDVBTuningSpace))
99 {
100 *Output = (IDVBTuningSpace*)this;
101 reinterpret_cast<IDVBTuningSpace*>(*Output)->AddRef();
102 return NOERROR;
103 }
104
105
108 StringFromCLSID(refiid, &lpstr);
109 swprintf(Buffer, L"CTuningSpace::QueryInterface: NoInterface for %s", lpstr);
112
113
114 return E_NOINTERFACE;
115}
116
117//-------------------------------------------------------------------
118// IDispatch methods
119//
123{
124 OutputDebugStringW(L"CTuningSpace::GetTypeInfoCount : NotImplemented\n");
125 return E_NOTIMPL;
126}
127
131{
132 OutputDebugStringW(L"CTuningSpace::GetTypeInfo : NotImplemented\n");
133 return E_NOTIMPL;
134}
137CTuningSpace::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
138{
139 OutputDebugStringW(L"CTuningSpace::GetIDsOfNames : NotImplemented\n");
140 return E_NOTIMPL;
141}
144CTuningSpace::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
145{
146 OutputDebugStringW(L"CTuningSpace::Invoke : NotImplemented\n");
147 return E_NOTIMPL;
148}
149
150
151//-------------------------------------------------------------------
152// ITuningSpace interface
153//
154
158{
159 OutputDebugStringW(L"CTuningSpace::get_UniqueName : NotImplemented\n");
160 return E_NOTIMPL;
161}
162
166{
167 OutputDebugStringW(L"CTuningSpace::put_UniqueName : NotImplemented\n");
168 return E_NOTIMPL;
169}
170
174{
175 OutputDebugStringW(L"CTuningSpace::get_FriendlyName : NotImplemented\n");
176 return E_NOTIMPL;
177}
178
182{
183 OutputDebugStringW(L"CTuningSpace::put_FriendlyName : NotImplemented\n");
184 return E_NOTIMPL;
185}
186
190{
191 OutputDebugStringW(L"CTuningSpace::get_CLSID : NotImplemented\n");
192 return E_NOTIMPL;
193}
194
198{
199 OutputDebugStringW(L"CTuningSpace::get_NetworkType : stub\n");
200 return StringFromCLSID(CLSID_DVBTNetworkProvider, (LPOLESTR*)NetworkTypeGuid);
201
202}
203
207{
208 OutputDebugStringW(L"CTuningSpace::put_NetworkType : NotImplemented\n");
209 return E_NOTIMPL;
210}
211
215{
216#ifdef MSVIDCTL_TRACE
217 WCHAR Buffer[100];
218 swprintf(Buffer, L"CTuningSpace::get__NetworkType : %p stub\n", NetworkTypeGuid);
220#endif
221
222 CopyMemory(NetworkTypeGuid, &CLSID_DVBTNetworkProvider, sizeof(GUID));
223 OutputDebugStringW(L"CTuningSpace::get__NetworkType : done\n");
224 return S_OK;
225}
226
230{
231 OutputDebugStringW(L"CTuningSpace::put__NetworkType : NotImplemented\n");
232 return E_NOTIMPL;
233}
234
238{
239 OutputDebugStringW(L"CTuningSpace::CreateTuneRequest : stub\n");
240 return CTuneRequest_fnConstructor(NULL, (ITuningSpace*)this, IID_ITuneRequest, (void**)TuneRequest);
241}
242
246{
247 OutputDebugStringW(L"CTuningSpace::EnumCategoryGUIDs : NotImplemented\n");
248 return E_NOTIMPL;
249}
250
254{
255 OutputDebugStringW(L"CTuningSpace::EnumDeviceMonikers : NotImplemented\n");
256 return E_NOTIMPL;
257}
258
262{
263 OutputDebugStringW(L"CTuningSpace::get_DefaultPreferredComponentTypes : NotImplemented\n");
264 return E_NOTIMPL;
265}
266
270{
271 OutputDebugStringW(L"CTuningSpace::put_DefaultPreferredComponentTypes : NotImplemented\n");
272 return E_NOTIMPL;
273}
274
278{
279 OutputDebugStringW(L"CTuningSpace::get_FrequencyMapping : NotImplemented\n");
280 return E_NOTIMPL;
281}
282
286{
287 OutputDebugStringW(L"CTuningSpace::put_FrequencyMapping : NotImplemented\n");
288 return E_NOTIMPL;
289}
290
294{
295 OutputDebugStringW(L"CTuningSpace::get_DefaultLocator : NotImplemented\n");
296 return E_NOTIMPL;
297}
298
302{
303 OutputDebugStringW(L"CTuningSpace::put_DefaultLocator : NotImplemented\n");
304 return E_NOTIMPL;
305}
306
310{
311 OutputDebugStringW(L"CTuningSpace::Clone : NotImplemented\n");
312 return E_NOTIMPL;
313}
314
315//-------------------------------------------------------------------
316// IDVBTuningSpace
317//
321{
322 OutputDebugStringW(L"CTuningSpace::get_SystemType : NotImplemented\n");
323 return E_NOTIMPL;
324}
325
329{
330 OutputDebugStringW(L"CTuningSpace::put_SystemType : NotImplemented\n");
331 return E_NOTIMPL;
332}
333
335WINAPI
338 REFIID riid,
339 LPVOID * ppv)
340{
341 // construct device control
343
344#ifdef MSVIDCTL_TRACE
348 swprintf(Buffer, L"CTuningSpace_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
350#endif
351
352 if (!space)
353 return E_OUTOFMEMORY;
354
355 if (FAILED(space->QueryInterface(riid, ppv)))
356 {
357 /* not supported */
358 delete space;
359 return E_NOINTERFACE;
360 }
361
362 return NOERROR;
363}
364
365
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define STDMETHODIMP
Definition: basetyps.h:43
const GUID IID_IUnknown
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
DVBSystemType
Definition: bdatypes.h:162
_In_ BOOLEAN Release
Definition: cdrom.h:920
Definition: bufpool.h:45
HRESULT STDMETHODCALLTYPE EnumDeviceMonikers(IEnumMoniker **ppEnum)
HRESULT STDMETHODCALLTYPE put_NetworkType(BSTR NetworkTypeGuid)
HRESULT STDMETHODCALLTYPE get_SystemType(DVBSystemType *SysType)
STDMETHODIMP_(ULONG) Release()
Definition: tuningspace.cpp:23
HRESULT STDMETHODCALLTYPE put_DefaultLocator(ILocator *LocatorVal)
HRESULT STDMETHODCALLTYPE get_UniqueName(BSTR *Name)
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: tuningspace.cpp:80
HRESULT STDMETHODCALLTYPE CreateTuneRequest(ITuneRequest **TuneRequest)
HRESULT STDMETHODCALLTYPE get_FrequencyMapping(BSTR *pMapping)
HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
HRESULT STDMETHODCALLTYPE put_SystemType(DVBSystemType SysType)
STDMETHODIMP_(ULONG) AddRef()
Definition: tuningspace.cpp:18
HRESULT STDMETHODCALLTYPE get__NetworkType(GUID *NetworkTypeGuid)
HRESULT STDMETHODCALLTYPE Clone(ITuningSpace **NewTS)
HRESULT STDMETHODCALLTYPE get_CLSID(BSTR *SpaceCLSID)
HRESULT STDMETHODCALLTYPE get_DefaultPreferredComponentTypes(IComponentTypes **ComponentTypes)
HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
HRESULT STDMETHODCALLTYPE put_UniqueName(BSTR Name)
HRESULT STDMETHODCALLTYPE get_FriendlyName(BSTR *Name)
HRESULT STDMETHODCALLTYPE put_FrequencyMapping(BSTR Mapping)
HRESULT STDMETHODCALLTYPE get_NetworkType(BSTR *NetworkTypeGuid)
virtual ~CTuningSpace()
Definition: tuningspace.cpp:72
HRESULT STDMETHODCALLTYPE put__NetworkType(REFCLSID NetworkTypeGuid)
HRESULT STDMETHODCALLTYPE get_DefaultLocator(ILocator **LocatorVal)
HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
HRESULT STDMETHODCALLTYPE EnumCategoryGUIDs(IEnumGUID **ppEnum)
HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo)
HRESULT STDMETHODCALLTYPE put_FriendlyName(BSTR Name)
HRESULT STDMETHODCALLTYPE put_DefaultPreferredComponentTypes(IComponentTypes *NewComponentTypes)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
HRESULT WINAPI CTuneRequest_fnConstructor(IUnknown *pUnknown, ITuningSpace *TuningSpace, REFIID riid, LPVOID *ppv)
OLECHAR * BSTR
Definition: compat.h:2293
#define MAX_PATH
Definition: compat.h:34
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
#define swprintf
Definition: precomp.h:40
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
static PVOID Mapping[EMS_PHYSICAL_PAGES]
Definition: emsdrv.c:41
unsigned short WORD
Definition: ntddk_ex.h:93
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
ULONG AddRef()
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
static LPCSTR lpstr
Definition: font.c:51
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
DWORD LCID
Definition: nls.h:13
@ Output
Definition: arc.h:85
const GUID CLSID_DVBTNetworkProvider
Definition: tuningspace.cpp:11
HRESULT WINAPI CTuningSpace_fnConstructor(IUnknown *pUnknown, REFIID riid, LPVOID *ppv)
void * PVOID
Definition: typedefs.h:50
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
#define CopyMemory
Definition: winbase.h:1710
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354
__wchar_t WCHAR
Definition: xmlstorage.h:180