ReactOS 0.4.15-dev-8093-g3285f69
frequencyfilter.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/bdaplgin/frequencyfilter.cpp
5 * PURPOSE: IBDA_FrequencyFilter interface
6 *
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org)
8 */
9
10#include "precomp.h"
11
12#ifndef _MSC_VER
13const GUID IID_IBDA_FrequencyFilter = {0x71985f47, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x00, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
14const GUID KSPROPSETID_BdaFrequencyFilter = {0x71985f47, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
15#endif
16
18{
19public:
21
23 {
25 return m_Ref;
26 }
28 {
30 if (!m_Ref)
31 {
32 delete this;
33 return 0;
34 }
35 return m_Ref;
36 }
37
50
53
54protected:
58};
59
63 IN REFIID refiid,
65{
66 *Output = NULL;
67
68 if (IsEqualGUID(refiid, IID_IUnknown))
69 {
70 *Output = PVOID(this);
71 reinterpret_cast<IUnknown*>(*Output)->AddRef();
72 return NOERROR;
73 }
74
76 {
77 *Output = (IBDA_FrequencyFilter*)(this);
78 reinterpret_cast<IBDA_FrequencyFilter*>(*Output)->AddRef();
79 return NOERROR;
80 }
81
82#ifdef BDAPLGIN_TRACE
85 StringFromCLSID(refiid, &lpstr);
86 swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s", lpstr);
90#endif
91
92 return E_NOINTERFACE;
93}
94
98{
99 return E_NOINTERFACE;
100}
101
105{
106 return E_NOINTERFACE;
107}
108
112{
114 HRESULT hr;
115
116 // setup request
117 Node.NodeId = m_NodeId;
118 Node.Reserved = 0;
119
120 // perform request
122
123#ifdef BDAPLGIN_TRACE
124 WCHAR Buffer[100];
125 swprintf(Buffer, L"CBDAFrequencyFilter::put_Frequency: m_NodeId %lu ulFrequency %lu hr %lx\n", m_NodeId, ulFrequency, hr);
127#endif
128
129 return hr;
130}
131
135{
136 return E_NOINTERFACE;
137}
138
142{
144 HRESULT hr;
145
146 // setup request
147 Node.NodeId = m_NodeId;
148 Node.Reserved = 0;
149
150 // perform request
152
153#ifdef BDAPLGIN_TRACE
154 WCHAR Buffer[100];
155 swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu Polarity %lu hr %lx\n", m_NodeId, Polarity, hr);
157#endif
158
159 return hr;
160}
161
165{
166 return E_NOINTERFACE;
167}
168
172{
174 HRESULT hr;
175
176 // setup request
177 Node.NodeId = m_NodeId;
178 Node.Reserved = 0;
179
180 // perform request
182
183#ifdef BDAPLGIN_TRACE
184 WCHAR Buffer[100];
185 swprintf(Buffer, L"CBDAFrequencyFilter::put_Range: m_NodeId %lu ulRange %lu hr %lx\n", m_NodeId, ulRange, hr);
187#endif
188
189 return hr;
190}
191
195{
196 return E_NOINTERFACE;
197}
198
202{
204 HRESULT hr;
205
206 // setup request
207 Node.NodeId = m_NodeId;
208 Node.Reserved = 0;
209
210 // perform request
212
213#ifdef BDAPLGIN_TRACE
214 WCHAR Buffer[100];
215 swprintf(Buffer, L"CBDAFrequencyFilter::put_Bandwidth: m_NodeId %lu ulBandwidth %lu hr %lx\n", m_NodeId, ulBandwidth, hr);
217#endif
218
219 return hr;
220}
221
225{
226 return E_NOINTERFACE;
227}
231{
233 HRESULT hr;
234
235 // setup request
236 Node.NodeId = m_NodeId;
237 Node.Reserved = 0;
238
239 // perform request
241
242#ifdef BDAPLGIN_TRACE
243 WCHAR Buffer[100];
244 swprintf(Buffer, L"CBDAFrequencyFilter::put_FrequencyMultiplier: m_NodeId %lu ulMultiplier %lu hr %lx\n", m_NodeId, ulMultiplier, hr);
246#endif
247
248 return hr;
249}
250
254{
255 return E_NOINTERFACE;
256}
257
259WINAPI
262 ULONG NodeId,
263 REFIID riid,
264 LPVOID * ppv)
265{
266 // construct device control
268
269#ifdef BDAPLGIN_TRACE
270 OutputDebugStringW(L"CBDAFrequencyFilter_fnConstructor\n");
271#endif
272
273 if (!handler)
274 return E_OUTOFMEMORY;
275
276 if (FAILED(handler->QueryInterface(riid, ppv)))
277 {
278 /* not supported */
279 delete handler;
280 return E_NOINTERFACE;
281 }
282
283 return NOERROR;
284}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define STDMETHODIMP
Definition: basetyps.h:43
@ KSPROPERTY_BDA_RF_TUNER_FREQUENCY_MULTIPLIER
Definition: bdamedia.h:278
@ KSPROPERTY_BDA_RF_TUNER_RANGE
Definition: bdamedia.h:275
@ KSPROPERTY_BDA_RF_TUNER_FREQUENCY
Definition: bdamedia.h:273
@ KSPROPERTY_BDA_RF_TUNER_POLARITY
Definition: bdamedia.h:274
@ KSPROPERTY_BDA_RF_TUNER_BANDWIDTH
Definition: bdamedia.h:277
const GUID IID_IUnknown
_Must_inspect_result_ _In_ KSP_BDA_NODE_PIN * pProperty
Definition: bdasup.h:156
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
Polarisation
Definition: bdatypes.h:301
Definition: bufpool.h:45
virtual ~CBDAFrequencyFilter()
HRESULT STDMETHODCALLTYPE get_Polarity(Polarisation *pPolarity)
HRESULT STDMETHODCALLTYPE put_Range(ULONG ulRange)
HRESULT STDMETHODCALLTYPE put_Bandwidth(ULONG ulBandwidth)
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
HRESULT STDMETHODCALLTYPE put_Polarity(Polarisation Polarity)
HRESULT STDMETHODCALLTYPE put_Autotune(ULONG ulTransponder)
IKsPropertySet * m_pProperty
HRESULT STDMETHODCALLTYPE put_FrequencyMultiplier(ULONG ulMultiplier)
STDMETHODIMP_(ULONG) AddRef()
HRESULT STDMETHODCALLTYPE put_Frequency(ULONG ulFrequency)
HRESULT STDMETHODCALLTYPE get_Frequency(ULONG *pulFrequency)
HRESULT STDMETHODCALLTYPE get_Range(ULONG *pulRange)
STDMETHODIMP_(ULONG) Release()
HRESULT STDMETHODCALLTYPE get_Bandwidth(ULONG *pulBandwidth)
HRESULT STDMETHODCALLTYPE get_Autotune(ULONG *pulTransponder)
CBDAFrequencyFilter(IKsPropertySet *pProperty, ULONG NodeId)
HRESULT STDMETHODCALLTYPE get_FrequencyMultiplier(ULONG *pulMultiplier)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
union node Node
Definition: types.h:1255
#define MAX_PATH
Definition: compat.h:34
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
#define swprintf
Definition: precomp.h:40
HRESULT WINAPI CBDAFrequencyFilter_fnConstructor(IKsPropertySet *pProperty, ULONG NodeId, REFIID riid, LPVOID *ppv)
const GUID KSPROPSETID_BdaFrequencyFilter
const GUID IID_IBDA_FrequencyFilter
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
HRESULT Set([in] REFGUID guidPropSet, [in] DWORD dwPropID, [in, size_is(cbInstanceData)] LPVOID pInstanceData, [in] DWORD cbInstanceData, [in, size_is(cbPropData)] LPVOID pPropData, [in] DWORD cbPropData)
ULONG AddRef()
ULONG Release()
#define FAILED(hr)
Definition: intsafe.h:51
static LPCSTR lpstr
Definition: font.c:51
static LPOLESTR
Definition: stg_prop.c:27
#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
@ Output
Definition: arc.h:85
HRESULT hr
Definition: shlfolder.c:183
Definition: ks.h:2074
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
Definition: dlist.c:348
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
void WINAPI DebugBreak(void)
#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