windows.devices.bluetooth: Add stub DLL.
[wine.git] / dlls / windows.devices.bluetooth / bluetoothadapter.c
bloba165031293ae7cf0912984bba3766821d82245d7
1 /* WinRT Windows.Devices.Bluetooth BluetoothAdapter 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(bluetooth);
25 struct bluetoothadapter
27 IActivationFactory IActivationFactory_iface;
28 LONG ref;
31 static inline struct bluetoothadapter *impl_from_IActivationFactory( IActivationFactory *iface )
33 return CONTAINING_RECORD( iface, struct bluetoothadapter, IActivationFactory_iface );
36 static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID iid, void **out )
38 struct bluetoothadapter *impl = impl_from_IActivationFactory( iface );
40 TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out );
42 if (IsEqualGUID( iid, &IID_IUnknown ) ||
43 IsEqualGUID( iid, &IID_IInspectable ) ||
44 IsEqualGUID( iid, &IID_IAgileObject ) ||
45 IsEqualGUID( iid, &IID_IActivationFactory ))
47 *out = &impl->IActivationFactory_iface;
48 IInspectable_AddRef( *out );
49 return S_OK;
52 FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
53 *out = NULL;
54 return E_NOINTERFACE;
57 static ULONG WINAPI factory_AddRef( IActivationFactory *iface )
59 struct bluetoothadapter *impl = impl_from_IActivationFactory( iface );
60 ULONG ref = InterlockedIncrement( &impl->ref );
61 TRACE( "iface %p increasing refcount to %lu.\n", iface, ref );
62 return ref;
65 static ULONG WINAPI factory_Release( IActivationFactory *iface )
67 struct bluetoothadapter *impl = impl_from_IActivationFactory( iface );
68 ULONG ref = InterlockedDecrement( &impl->ref );
69 TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref );
70 return ref;
73 static HRESULT WINAPI factory_GetIids( IActivationFactory *iface, ULONG *iid_count, IID **iids )
75 FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids );
76 return E_NOTIMPL;
79 static HRESULT WINAPI factory_GetRuntimeClassName( IActivationFactory *iface, HSTRING *class_name )
81 FIXME( "iface %p, class_name %p stub!\n", iface, class_name );
82 return E_NOTIMPL;
85 static HRESULT WINAPI factory_GetTrustLevel( IActivationFactory *iface, TrustLevel *trust_level )
87 FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level );
88 return E_NOTIMPL;
91 static HRESULT WINAPI factory_ActivateInstance( IActivationFactory *iface, IInspectable **instance )
93 FIXME( "iface %p, instance %p stub!\n", iface, instance );
94 return E_NOTIMPL;
97 static const struct IActivationFactoryVtbl factory_vtbl =
99 factory_QueryInterface,
100 factory_AddRef,
101 factory_Release,
102 /* IInspectable methods */
103 factory_GetIids,
104 factory_GetRuntimeClassName,
105 factory_GetTrustLevel,
106 /* IActivationFactory methods */
107 factory_ActivateInstance,
110 static struct bluetoothadapter bluetoothadapter_statics =
112 {&factory_vtbl},
116 IActivationFactory *bluetoothadapter_factory = &bluetoothadapter_statics.IActivationFactory_iface;