1 /* WinRT Windows.Globalization implementation
3 * Copyright 2021 RĂ©mi Bernon for CodeWeavers
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
22 WINE_DEFAULT_DEBUG_CHANNEL(twinapi
);
24 struct analytics_info_factory
26 IActivationFactory IActivationFactory_iface
;
27 IAnalyticsInfoStatics IAnalyticsInfoStatics_iface
;
31 static inline struct analytics_info_factory
*impl_from_IActivationFactory( IActivationFactory
*iface
)
33 return CONTAINING_RECORD( iface
, struct analytics_info_factory
, IActivationFactory_iface
);
36 static HRESULT WINAPI
activation_factory_QueryInterface( IActivationFactory
*iface
, REFIID iid
, void **out
)
38 struct analytics_info_factory
*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 IActivationFactory_AddRef( (*out
= &impl
->IActivationFactory_iface
) );
51 if (IsEqualGUID( iid
, &IID_IAnalyticsInfoStatics
))
53 IAnalyticsInfoStatics_AddRef( (*out
= &impl
->IAnalyticsInfoStatics_iface
) );
57 FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid
) );
62 static ULONG WINAPI
activation_factory_AddRef( IActivationFactory
*iface
)
64 struct analytics_info_factory
*impl
= impl_from_IActivationFactory( iface
);
65 ULONG ref
= InterlockedIncrement( &impl
->ref
);
66 TRACE( "iface %p, ref %lu.\n", iface
, ref
);
70 static ULONG WINAPI
activation_factory_Release( IActivationFactory
*iface
)
72 struct analytics_info_factory
*impl
= impl_from_IActivationFactory( iface
);
73 ULONG ref
= InterlockedDecrement( &impl
->ref
);
74 TRACE( "iface %p, ref %lu.\n", iface
, ref
);
78 static HRESULT WINAPI
activation_factory_GetIids( IActivationFactory
*iface
, ULONG
*iid_count
, IID
**iids
)
80 FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface
, iid_count
, iids
);
84 static HRESULT WINAPI
activation_factory_GetRuntimeClassName( IActivationFactory
*iface
, HSTRING
*class_name
)
86 FIXME( "iface %p, class_name %p stub!\n", iface
, class_name
);
90 static HRESULT WINAPI
activation_factory_GetTrustLevel( IActivationFactory
*iface
, TrustLevel
*trust_level
)
92 FIXME( "iface %p, trust_level %p stub!\n", iface
, trust_level
);
96 static HRESULT WINAPI
activation_factory_ActivateInstance( IActivationFactory
*iface
, IInspectable
**out
)
98 FIXME( "iface %p, out %p stub!\n", iface
, out
);
102 static const struct IActivationFactoryVtbl activation_factory_vtbl
=
104 activation_factory_QueryInterface
,
105 activation_factory_AddRef
,
106 activation_factory_Release
,
107 /* IInspectable methods */
108 activation_factory_GetIids
,
109 activation_factory_GetRuntimeClassName
,
110 activation_factory_GetTrustLevel
,
111 /* IActivationFactory methods */
112 activation_factory_ActivateInstance
,
115 DEFINE_IINSPECTABLE( statics
, IAnalyticsInfoStatics
, struct analytics_info_factory
, IActivationFactory_iface
);
117 static HRESULT WINAPI
statics_get_VersionInfo( IAnalyticsInfoStatics
*iface
, IAnalyticsVersionInfo
**value
)
119 FIXME( "iface %p, value %p stub!\n", iface
, value
);
123 static HRESULT WINAPI
statics_get_DeviceForm( IAnalyticsInfoStatics
*iface
, HSTRING
*value
)
125 FIXME( "iface %p, value %p stub!\n", iface
, value
);
129 static const struct IAnalyticsInfoStaticsVtbl statics_vtbl
=
131 statics_QueryInterface
,
134 /* IInspectable methods */
136 statics_GetRuntimeClassName
,
137 statics_GetTrustLevel
,
138 /* IAnalyticsInfoStatics methods */
139 statics_get_VersionInfo
,
140 statics_get_DeviceForm
,
143 static struct analytics_info_factory factory
=
145 {&activation_factory_vtbl
},
150 IActivationFactory
*analytics_info_factory
= &factory
.IActivationFactory_iface
;