Fixed some broken macros.
[wine/multimedia.git] / dlls / quartz / ifmap3.c
blob44093da83a0d03dd109d183a1445dddc229f2cdc
1 /*
2 * Implementation of IFilterMapper3 for CLSID_FilterMapper2.
4 * FIXME - stub.
6 * hidenori@a2.ctktv.ne.jp
7 */
9 #include "config.h"
11 #include "windef.h"
12 #include "winbase.h"
13 #include "wingdi.h"
14 #include "winreg.h"
15 #include "winerror.h"
16 #include "wine/obj_base.h"
17 #include "wine/obj_oleaut.h"
18 #include "strmif.h"
19 #include "control.h"
20 #include "uuids.h"
22 #include "debugtools.h"
23 DEFAULT_DEBUG_CHANNEL(quartz);
25 #include "quartz_private.h"
26 #include "fmap2.h"
27 #include "regsvr.h"
30 static HRESULT WINAPI
31 IFilterMapper3_fnQueryInterface(IFilterMapper3* iface,REFIID riid,void** ppobj)
33 CFilterMapper2_THIS(iface,fmap3);
35 TRACE("(%p)->()\n",This);
37 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
40 static ULONG WINAPI
41 IFilterMapper3_fnAddRef(IFilterMapper3* iface)
43 CFilterMapper2_THIS(iface,fmap3);
45 TRACE("(%p)->()\n",This);
47 return IUnknown_AddRef(This->unk.punkControl);
50 static ULONG WINAPI
51 IFilterMapper3_fnRelease(IFilterMapper3* iface)
53 CFilterMapper2_THIS(iface,fmap3);
55 TRACE("(%p)->()\n",This);
57 return IUnknown_Release(This->unk.punkControl);
60 static HRESULT WINAPI
61 IFilterMapper3_fnCreateCategory(IFilterMapper3* iface,REFCLSID rclsidCategory,DWORD dwMerit,LPCWSTR lpwszDesc)
63 CFilterMapper2_THIS(iface,fmap3);
65 FIXME("(%p)->(%s,%lu,%s) stub!\n",This,
66 debugstr_guid(rclsidCategory),
67 (unsigned long)dwMerit,debugstr_w(lpwszDesc));
69 return E_NOTIMPL;
73 static HRESULT WINAPI
74 IFilterMapper3_fnUnregisterFilter(IFilterMapper3* iface,const CLSID* pclsidCategory,const OLECHAR* lpwszInst,REFCLSID rclsidFilter)
76 CFilterMapper2_THIS(iface,fmap3);
78 FIXME("(%p)->(%s,%s,%s) stub!\n",This,
79 debugstr_guid(pclsidCategory),
80 debugstr_w(lpwszInst),
81 debugstr_guid(rclsidFilter));
83 if ( pclsidCategory == NULL )
84 pclsidCategory = &CLSID_LegacyAmFilterCategory;
86 /* FIXME */
87 return QUARTZ_RegisterAMovieFilter(
88 pclsidCategory,
89 rclsidFilter,
90 NULL, 0,
91 NULL, lpwszInst, FALSE );
95 static HRESULT WINAPI
96 IFilterMapper3_fnRegisterFilter(IFilterMapper3* iface,REFCLSID rclsidFilter,LPCWSTR lpName,IMoniker** ppMoniker,const CLSID* pclsidCategory,const OLECHAR* lpwszInst,const REGFILTER2* pRF2)
98 CFilterMapper2_THIS(iface,fmap3);
100 FIXME( "(%p)->(%s,%s,%p,%s,%s,%p) stub!\n",This,
101 debugstr_guid(rclsidFilter),debugstr_w(lpName),
102 ppMoniker,debugstr_guid(pclsidCategory),
103 debugstr_w(lpwszInst),pRF2 );
105 if ( lpName == NULL || pRF2 == NULL )
106 return E_POINTER;
108 if ( ppMoniker != NULL )
110 FIXME( "ppMoniker != NULL - not implemented!\n" );
111 return E_NOTIMPL;
114 if ( pclsidCategory == NULL )
115 pclsidCategory = &CLSID_LegacyAmFilterCategory;
117 /* FIXME!! - all members in REGFILTER2 are ignored ! */
119 return QUARTZ_RegisterAMovieFilter(
120 pclsidCategory,
121 rclsidFilter,
122 NULL, 0,
123 lpName, lpwszInst, TRUE );
127 static HRESULT WINAPI
128 IFilterMapper3_fnEnumMatchingFilters(IFilterMapper3* iface,IEnumMoniker** ppMoniker,DWORD dwFlags,BOOL bExactMatch,DWORD dwMerit,BOOL bInputNeeded,DWORD cInputTypes,const GUID* pguidInputTypes,const REGPINMEDIUM* pPinMediumIn,const CLSID* pPinCategoryIn,BOOL bRender,BOOL bOutputNeeded,DWORD cOutputTypes,const GUID* pguidOutputTypes,const REGPINMEDIUM* pPinMediumOut,const CLSID* pPinCategoryOut)
130 CFilterMapper2_THIS(iface,fmap3);
132 FIXME("(%p)->() stub!\n",This);
134 return E_NOTIMPL;
137 static HRESULT WINAPI
138 IFilterMapper3_fnGetICreateDevEnum(IFilterMapper3* iface,ICreateDevEnum** ppDevEnum)
140 CFilterMapper2_THIS(iface,fmap3);
142 /* undocumented */
143 FIXME("(%p)->() stub!\n",This);
145 return E_NOTIMPL;
151 static ICOM_VTABLE(IFilterMapper3) ifmap3 =
153 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
154 /* IUnknown fields */
155 IFilterMapper3_fnQueryInterface,
156 IFilterMapper3_fnAddRef,
157 IFilterMapper3_fnRelease,
158 /* IFilterMapper2 fields */
159 IFilterMapper3_fnCreateCategory,
160 IFilterMapper3_fnUnregisterFilter,
161 IFilterMapper3_fnRegisterFilter,
162 IFilterMapper3_fnEnumMatchingFilters,
163 /* IFilterMapper3 fields */
164 IFilterMapper3_fnGetICreateDevEnum,
168 HRESULT CFilterMapper2_InitIFilterMapper3( CFilterMapper2* pfm )
170 TRACE("(%p)\n",pfm);
171 ICOM_VTBL(&pfm->fmap3) = &ifmap3;
173 return NOERROR;
176 void CFilterMapper2_UninitIFilterMapper3( CFilterMapper2* pfm )
178 TRACE("(%p)\n",pfm);