dmstyle: Rewrite style pref chunk parsing.
[wine.git] / dlls / hvsimanagementapi / host.c
blobc4d8b5b34dbea7d2c5ad260186ca0ae22af47a03
1 /* WinRT Windows.Security.Isolation IsolatedWindowsEnvironmentHost 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(hvsi);
25 struct isolated_host_statics
27 IActivationFactory IActivationFactory_iface;
28 IIsolatedWindowsEnvironmentHostStatics IIsolatedWindowsEnvironmentHostStatics_iface;
29 LONG ref;
32 static inline struct isolated_host_statics *impl_from_IActivationFactory( IActivationFactory *iface )
34 return CONTAINING_RECORD( iface, struct isolated_host_statics, IActivationFactory_iface );
37 static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID iid, void **out )
39 struct isolated_host_statics *impl = impl_from_IActivationFactory( iface );
41 TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out );
43 if (IsEqualGUID( iid, &IID_IUnknown ) ||
44 IsEqualGUID( iid, &IID_IInspectable ) ||
45 IsEqualGUID( iid, &IID_IAgileObject ) ||
46 IsEqualGUID( iid, &IID_IActivationFactory ))
48 *out = &impl->IActivationFactory_iface;
49 IInspectable_AddRef( *out );
50 return S_OK;
53 if (IsEqualGUID( iid, &IID_IIsolatedWindowsEnvironmentHostStatics ))
55 *out = &impl->IIsolatedWindowsEnvironmentHostStatics_iface;
56 IInspectable_AddRef( *out );
57 return S_OK;
60 FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
61 *out = NULL;
62 return E_NOINTERFACE;
65 static ULONG WINAPI factory_AddRef( IActivationFactory *iface )
67 struct isolated_host_statics *impl = impl_from_IActivationFactory( iface );
68 ULONG ref = InterlockedIncrement( &impl->ref );
69 TRACE( "iface %p increasing refcount to %lu.\n", iface, ref );
70 return ref;
73 static ULONG WINAPI factory_Release( IActivationFactory *iface )
75 struct isolated_host_statics *impl = impl_from_IActivationFactory( iface );
76 ULONG ref = InterlockedDecrement( &impl->ref );
77 TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref );
78 return ref;
81 static HRESULT WINAPI factory_GetIids( IActivationFactory *iface, ULONG *iid_count, IID **iids )
83 FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids );
84 return E_NOTIMPL;
87 static HRESULT WINAPI factory_GetRuntimeClassName( IActivationFactory *iface, HSTRING *class_name )
89 FIXME( "iface %p, class_name %p stub!\n", iface, class_name );
90 return E_NOTIMPL;
93 static HRESULT WINAPI factory_GetTrustLevel( IActivationFactory *iface, TrustLevel *trust_level )
95 FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level );
96 return E_NOTIMPL;
99 static HRESULT WINAPI factory_ActivateInstance( IActivationFactory *iface, IInspectable **instance )
101 FIXME( "iface %p, instance %p stub!\n", iface, instance );
102 return E_NOTIMPL;
105 static const struct IActivationFactoryVtbl factory_vtbl =
107 factory_QueryInterface,
108 factory_AddRef,
109 factory_Release,
110 /* IInspectable methods */
111 factory_GetIids,
112 factory_GetRuntimeClassName,
113 factory_GetTrustLevel,
114 /* IActivationFactory methods */
115 factory_ActivateInstance,
118 DEFINE_IINSPECTABLE( isolated_host_statics, IIsolatedWindowsEnvironmentHostStatics, struct isolated_host_statics, IActivationFactory_iface )
120 static HRESULT WINAPI isolated_host_statics_get_IsReady( IIsolatedWindowsEnvironmentHostStatics *iface, boolean *value )
122 TRACE( "iface %p, value %p\n", iface, value );
124 *value = FALSE;
125 return S_OK;
128 static HRESULT WINAPI isolated_host_statics_get_HostErrors( IIsolatedWindowsEnvironmentHostStatics *iface,
129 IVectorView_IsolatedWindowsEnvironmentHostError **value )
131 FIXME( "iface %p, value %p stub!\n", iface, value );
132 return E_NOTIMPL;
135 static const struct IIsolatedWindowsEnvironmentHostStaticsVtbl isolated_host_statics_vtbl =
137 isolated_host_statics_QueryInterface,
138 isolated_host_statics_AddRef,
139 isolated_host_statics_Release,
140 /* IInspectable methods */
141 isolated_host_statics_GetIids,
142 isolated_host_statics_GetRuntimeClassName,
143 isolated_host_statics_GetTrustLevel,
144 /* IIsolatedWindowsEnvironmentHostStatics methods */
145 isolated_host_statics_get_IsReady,
146 isolated_host_statics_get_HostErrors,
149 static struct isolated_host_statics isolated_host_statics =
151 {&factory_vtbl},
152 {&isolated_host_statics_vtbl},
156 IActivationFactory *isolated_host_factory = &isolated_host_statics.IActivationFactory_iface;