| 1 | /*
|
|---|
| 2 | * Implementation of IPersist for FilterGraph.
|
|---|
| 3 | *
|
|---|
| 4 | * FIXME - stub.
|
|---|
| 5 | *
|
|---|
| 6 | * hidenori@a2.ctktv.ne.jp
|
|---|
| 7 | */
|
|---|
| 8 |
|
|---|
| 9 | #include "config.h"
|
|---|
| 10 |
|
|---|
| 11 | #include "windef.h"
|
|---|
| 12 | #include "winbase.h"
|
|---|
| 13 | #include "wingdi.h"
|
|---|
| 14 | #include "winerror.h"
|
|---|
| 15 | #include "wine/obj_base.h"
|
|---|
| 16 | #include "wine/obj_oleaut.h"
|
|---|
| 17 | #include "strmif.h"
|
|---|
| 18 | #include "control.h"
|
|---|
| 19 | #include "uuids.h"
|
|---|
| 20 |
|
|---|
| 21 | #include "debugtools.h"
|
|---|
| 22 | DEFAULT_DEBUG_CHANNEL(quartz);
|
|---|
| 23 |
|
|---|
| 24 | #include "quartz_private.h"
|
|---|
| 25 | #include "fgraph.h"
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | static HRESULT WINAPI
|
|---|
| 30 | IPersist_fnQueryInterface(IPersist* iface,REFIID riid,void** ppobj)
|
|---|
| 31 | {
|
|---|
| 32 | CFilterGraph_THIS(iface,persist);
|
|---|
| 33 |
|
|---|
| 34 | TRACE("(%p)->()\n",This);
|
|---|
| 35 |
|
|---|
| 36 | return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | static ULONG WINAPI
|
|---|
| 40 | IPersist_fnAddRef(IPersist* iface)
|
|---|
| 41 | {
|
|---|
| 42 | CFilterGraph_THIS(iface,persist);
|
|---|
| 43 |
|
|---|
| 44 | TRACE("(%p)->()\n",This);
|
|---|
| 45 |
|
|---|
| 46 | return IUnknown_AddRef(This->unk.punkControl);
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | static ULONG WINAPI
|
|---|
| 50 | IPersist_fnRelease(IPersist* iface)
|
|---|
| 51 | {
|
|---|
| 52 | CFilterGraph_THIS(iface,persist);
|
|---|
| 53 |
|
|---|
| 54 | TRACE("(%p)->()\n",This);
|
|---|
| 55 |
|
|---|
| 56 | return IUnknown_Release(This->unk.punkControl);
|
|---|
| 57 | }
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 | static HRESULT WINAPI
|
|---|
| 61 | IPersist_fnGetClassID(IPersist* iface,CLSID* pclsid)
|
|---|
| 62 | {
|
|---|
| 63 | CFilterGraph_THIS(iface,persist);
|
|---|
| 64 |
|
|---|
| 65 | TRACE("(%p)->()\n",This);
|
|---|
| 66 |
|
|---|
| 67 | if ( pclsid == NULL )
|
|---|
| 68 | return E_POINTER;
|
|---|
| 69 | memcpy( pclsid, &CLSID_FilterGraph, sizeof(CLSID) );
|
|---|
| 70 |
|
|---|
| 71 | return E_NOTIMPL;
|
|---|
| 72 | }
|
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 | static ICOM_VTABLE(IPersist) ipersist =
|
|---|
| 76 | {
|
|---|
| 77 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|---|
| 78 | /* IUnknown fields */
|
|---|
| 79 | IPersist_fnQueryInterface,
|
|---|
| 80 | IPersist_fnAddRef,
|
|---|
| 81 | IPersist_fnRelease,
|
|---|
| 82 | /* IPersist fields */
|
|---|
| 83 | IPersist_fnGetClassID,
|
|---|
| 84 | };
|
|---|
| 85 |
|
|---|
| 86 | HRESULT CFilterGraph_InitIPersist( CFilterGraph* pfg )
|
|---|
| 87 | {
|
|---|
| 88 | TRACE("(%p)\n",pfg);
|
|---|
| 89 | ICOM_VTBL(&pfg->persist) = &ipersist;
|
|---|
| 90 |
|
|---|
| 91 | return NOERROR;
|
|---|
| 92 | }
|
|---|
| 93 |
|
|---|
| 94 | void CFilterGraph_UninitIPersist( CFilterGraph* pfg )
|
|---|
| 95 | {
|
|---|
| 96 | TRACE("(%p)\n",pfg);
|
|---|
| 97 | }
|
|---|