Commit 006bc33c authored by Mohamad Al-Jaf's avatar Mohamad Al-Jaf Committed by Alexandre Julliard

windows.perception.stub: Add ISpatialSurfaceObserverStatics2 stub interface.

parent b7d55543
......@@ -27,6 +27,7 @@ struct observer
{
IActivationFactory IActivationFactory_iface;
ISpatialSurfaceObserverStatics ISpatialSurfaceObserverStatics_iface;
ISpatialSurfaceObserverStatics2 ISpatialSurfaceObserverStatics2_iface;
LONG ref;
};
......@@ -58,6 +59,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
return S_OK;
}
if (IsEqualGUID( iid, &IID_ISpatialSurfaceObserverStatics2 ))
{
*out = &impl->ISpatialSurfaceObserverStatics2_iface;
IInspectable_AddRef( *out );
return S_OK;
}
FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
*out = NULL;
return E_NOINTERFACE;
......@@ -137,10 +145,32 @@ static const struct ISpatialSurfaceObserverStaticsVtbl observer_statics_vtbl =
observer_statics_RequestAccessAsync,
};
DEFINE_IINSPECTABLE( observer_statics2, ISpatialSurfaceObserverStatics2, struct observer, IActivationFactory_iface )
static HRESULT WINAPI observer_statics2_IsSupported( ISpatialSurfaceObserverStatics2 *iface, boolean *value )
{
FIXME( "iface %p, value %p stub!\n", iface, value );
return E_NOTIMPL;
}
static const struct ISpatialSurfaceObserverStatics2Vtbl observer_statics2_vtbl =
{
observer_statics2_QueryInterface,
observer_statics2_AddRef,
observer_statics2_Release,
/* IInspectable methods */
observer_statics2_GetIids,
observer_statics2_GetRuntimeClassName,
observer_statics2_GetTrustLevel,
/* ISpatialSurfaceObserverStatics2 methods */
observer_statics2_IsSupported,
};
static struct observer observer_statics =
{
{&factory_vtbl},
{&observer_statics_vtbl},
{&observer_statics2_vtbl},
1,
};
......
......@@ -48,6 +48,7 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid )
static void test_ObserverStatics(void)
{
static const WCHAR *observer_statics_name = L"Windows.Perception.Spatial.Surfaces.SpatialSurfaceObserver";
ISpatialSurfaceObserverStatics2 *observer_statics2;
IActivationFactory *factory;
HSTRING str;
HRESULT hr;
......@@ -70,6 +71,11 @@ static void test_ObserverStatics(void)
check_interface( factory, &IID_IAgileObject );
check_interface( factory, &IID_ISpatialSurfaceObserverStatics );
hr = IActivationFactory_QueryInterface( factory, &IID_ISpatialSurfaceObserverStatics2, (void **)&observer_statics2 );
ok( hr == S_OK, "got hr %#lx.\n", hr );
ref = ISpatialSurfaceObserverStatics2_Release( observer_statics2 );
ok( ref == 2, "got ref %ld.\n", ref );
ref = IActivationFactory_Release( factory );
ok( ref == 1, "got ref %ld.\n", ref );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment