gdi32: Fix leak in GdiDeleteSpoolFileHandle.
[wine.git] / dlls / windows.perception.stub / holographicspace.c
blob8a12147f4a88e555c0d6661ed30290c06b93fb86
1 /* WinRT Windows.Perception.Stub HolographicSpace Implementation
3 * Copyright (C) 2023 Mohamad Al-Jaf
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include "private.h"
21 #include "wine/debug.h"
23 WINE_DEFAULT_DEBUG_CHANNEL(perception);
25 struct holographicspace
27 IActivationFactory IActivationFactory_iface;
28 IHolographicSpaceStatics2 IHolographicSpaceStatics2_iface;
29 IHolographicSpaceStatics3 IHolographicSpaceStatics3_iface;
30 LONG ref;
33 static inline struct holographicspace *impl_from_IActivationFactory( IActivationFactory *iface )
35 return CONTAINING_RECORD( iface, struct holographicspace, IActivationFactory_iface );
38 static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID iid, void **out )
40 struct holographicspace *impl = impl_from_IActivationFactory( iface );
42 TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out );
44 if (IsEqualGUID( iid, &IID_IUnknown ) ||
45 IsEqualGUID( iid, &IID_IInspectable ) ||
46 IsEqualGUID( iid, &IID_IAgileObject ) ||
47 IsEqualGUID( iid, &IID_IActivationFactory ))
49 *out = &impl->IActivationFactory_iface;
50 IInspectable_AddRef( *out );
51 return S_OK;
54 if (IsEqualGUID( iid, &IID_IHolographicSpaceStatics2 ))
56 *out = &impl->IHolographicSpaceStatics2_iface;
57 IInspectable_AddRef( *out );
58 return S_OK;
61 if (IsEqualGUID( iid, &IID_IHolographicSpaceStatics3 ))
63 *out = &impl->IHolographicSpaceStatics3_iface;
64 IInspectable_AddRef( *out );
65 return S_OK;
68 FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
69 *out = NULL;
70 return E_NOINTERFACE;
73 static ULONG WINAPI factory_AddRef( IActivationFactory *iface )
75 struct holographicspace *impl = impl_from_IActivationFactory( iface );
76 ULONG ref = InterlockedIncrement( &impl->ref );
77 TRACE( "iface %p increasing refcount to %lu.\n", iface, ref );
78 return ref;
81 static ULONG WINAPI factory_Release( IActivationFactory *iface )
83 struct holographicspace *impl = impl_from_IActivationFactory( iface );
84 ULONG ref = InterlockedDecrement( &impl->ref );
85 TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref );
86 return ref;
89 static HRESULT WINAPI factory_GetIids( IActivationFactory *iface, ULONG *iid_count, IID **iids )
91 FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids );
92 return E_NOTIMPL;
95 static HRESULT WINAPI factory_GetRuntimeClassName( IActivationFactory *iface, HSTRING *class_name )
97 FIXME( "iface %p, class_name %p stub!\n", iface, class_name );
98 return E_NOTIMPL;
101 static HRESULT WINAPI factory_GetTrustLevel( IActivationFactory *iface, TrustLevel *trust_level )
103 FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level );
104 return E_NOTIMPL;
107 static HRESULT WINAPI factory_ActivateInstance( IActivationFactory *iface, IInspectable **instance )
109 FIXME( "iface %p, instance %p stub!\n", iface, instance );
110 return E_NOTIMPL;
113 static const struct IActivationFactoryVtbl factory_vtbl =
115 factory_QueryInterface,
116 factory_AddRef,
117 factory_Release,
118 /* IInspectable methods */
119 factory_GetIids,
120 factory_GetRuntimeClassName,
121 factory_GetTrustLevel,
122 /* IActivationFactory methods */
123 factory_ActivateInstance,
126 DEFINE_IINSPECTABLE( holographicspace_statics2, IHolographicSpaceStatics2, struct holographicspace, IActivationFactory_iface )
128 static HRESULT WINAPI holographicspace_statics2_get_IsSupported( IHolographicSpaceStatics2 *iface, boolean *value )
130 TRACE( "iface %p, value %p\n", iface, value );
132 *value = FALSE;
133 return S_OK;
136 static HRESULT WINAPI holographicspace_statics2_get_IsAvailable( IHolographicSpaceStatics2 *iface, boolean *value )
138 TRACE( "iface %p, value %p\n", iface, value );
140 *value = FALSE;
141 return S_OK;
144 static HRESULT WINAPI holographicspace_statics2_add_IsAvailableChanged( IHolographicSpaceStatics2 *iface, IEventHandler_IInspectable *handler,
145 EventRegistrationToken *token )
147 FIXME( "iface %p, handler %p, token %p stub!\n", iface, handler, token );
148 return E_NOTIMPL;
151 static HRESULT WINAPI holographicspace_statics2_remove_IsAvailableChanged( IHolographicSpaceStatics2 *iface, EventRegistrationToken token )
153 FIXME( "iface %p, token %#I64x stub!\n", iface, token.value );
154 return E_NOTIMPL;
157 static const struct IHolographicSpaceStatics2Vtbl holographicspace_statics2_vtbl =
159 holographicspace_statics2_QueryInterface,
160 holographicspace_statics2_AddRef,
161 holographicspace_statics2_Release,
162 /* IInspectable methods */
163 holographicspace_statics2_GetIids,
164 holographicspace_statics2_GetRuntimeClassName,
165 holographicspace_statics2_GetTrustLevel,
166 /* IHolographicSpaceStatics2 methods */
167 holographicspace_statics2_get_IsSupported,
168 holographicspace_statics2_get_IsAvailable,
169 holographicspace_statics2_add_IsAvailableChanged,
170 holographicspace_statics2_remove_IsAvailableChanged,
173 DEFINE_IINSPECTABLE( holographicspace_statics3, IHolographicSpaceStatics3, struct holographicspace, IActivationFactory_iface )
175 static HRESULT WINAPI holographicspace_statics3_get_IsConfigured( IHolographicSpaceStatics3 *iface, boolean *value )
177 TRACE( "iface %p, value %p\n", iface, value );
179 *value = FALSE;
180 return S_OK;
183 static const struct IHolographicSpaceStatics3Vtbl holographicspace_statics3_vtbl =
185 holographicspace_statics3_QueryInterface,
186 holographicspace_statics3_AddRef,
187 holographicspace_statics3_Release,
188 /* IInspectable methods */
189 holographicspace_statics3_GetIids,
190 holographicspace_statics3_GetRuntimeClassName,
191 holographicspace_statics3_GetTrustLevel,
192 /* IHolographicSpaceStatics3 methods */
193 holographicspace_statics3_get_IsConfigured,
196 static struct holographicspace holographicspace_statics =
198 {&factory_vtbl},
199 {&holographicspace_statics2_vtbl},
200 {&holographicspace_statics3_vtbl},
204 IActivationFactory *holographicspace_factory = &holographicspace_statics.IActivationFactory_iface;