windows.media.speech: Add IIterable<HSTRING> stubs.

To both IVector<HSTRING> and IVectorView<HSTRING>.

Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bernhard Kölbl 2022-03-29 19:30:46 +02:00 committed by Alexandre Julliard
parent 016b0a1b04
commit c6b9d9bc4e
1 changed files with 73 additions and 0 deletions

View File

@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(speech);
struct vector_view_hstring
{
IVectorView_HSTRING IVectorView_HSTRING_iface;
IIterable_HSTRING IIterable_HSTRING_iface;
LONG ref;
UINT32 size;
@ -58,6 +59,12 @@ static HRESULT WINAPI vector_view_hstring_QueryInterface( IVectorView_HSTRING *i
return S_OK;
}
if (IsEqualGUID(iid, &IID_IIterable_HSTRING))
{
IInspectable_AddRef((*out = &impl->IIterable_HSTRING_iface));
return S_OK;
}
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
*out = NULL;
return E_NOINTERFACE;
@ -186,6 +193,35 @@ static const struct IVectorView_HSTRINGVtbl vector_view_hstring_vtbl =
vector_view_hstring_GetMany,
};
/*
*
* IIterable<HSTRING>
*
*/
DEFINE_IINSPECTABLE_(iterable_view_hstring, IIterable_HSTRING, struct vector_view_hstring, view_impl_from_IIterable_HSTRING,
IIterable_HSTRING_iface, &impl->IVectorView_HSTRING_iface)
static HRESULT WINAPI iterable_view_hstring_First( IIterable_HSTRING *iface, IIterator_HSTRING **value )
{
TRACE("iface %p, value %p stub!\n", iface, value);
return E_NOTIMPL;
}
static const struct IIterable_HSTRINGVtbl iterable_view_hstring_vtbl =
{
/* IUnknown methods */
iterable_view_hstring_QueryInterface,
iterable_view_hstring_AddRef,
iterable_view_hstring_Release,
/* IInspectable methods */
iterable_view_hstring_GetIids,
iterable_view_hstring_GetRuntimeClassName,
iterable_view_hstring_GetTrustLevel,
/* IIterable<HSTRING> methods */
iterable_view_hstring_First,
};
/*
*
* IVector<HSTRING>
@ -195,6 +231,7 @@ static const struct IVectorView_HSTRINGVtbl vector_view_hstring_vtbl =
struct vector_hstring
{
IVector_HSTRING IVector_HSTRING_iface;
IIterable_HSTRING IIterable_HSTRING_iface;
LONG ref;
UINT32 size;
@ -222,6 +259,12 @@ static HRESULT WINAPI vector_hstring_QueryInterface( IVector_HSTRING *iface, REF
return S_OK;
}
if (IsEqualGUID(iid, &IID_IIterable_HSTRING))
{
IInspectable_AddRef((*out = &impl->IIterable_HSTRING_iface));
return S_OK;
}
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
*out = NULL;
return E_NOINTERFACE;
@ -300,6 +343,7 @@ static HRESULT WINAPI vector_hstring_GetView( IVector_HSTRING *iface, IVectorVie
if (!(view = calloc(1, offsetof(struct vector_view_hstring, elements[impl->size])))) return E_OUTOFMEMORY;
view->IVectorView_HSTRING_iface.lpVtbl = &vector_view_hstring_vtbl;
view->IIterable_HSTRING_iface.lpVtbl = &iterable_view_hstring_vtbl;
view->ref = 1;
for (i = 0; i < impl->size; ++i)
@ -479,6 +523,34 @@ static const struct IVector_HSTRINGVtbl vector_hstring_vtbl =
vector_hstring_ReplaceAll,
};
/*
*
* IIterable<HSTRING>
*
*/
DEFINE_IINSPECTABLE(iterable_hstring, IIterable_HSTRING, struct vector_hstring, IVector_HSTRING_iface)
static HRESULT WINAPI iterable_hstring_First( IIterable_HSTRING *iface, IIterator_HSTRING **value )
{
FIXME("iface %p, value %p stub!\n", iface, value);
return E_NOTIMPL;
}
static const struct IIterable_HSTRINGVtbl iterable_hstring_vtbl =
{
/* IUnknown methods */
iterable_hstring_QueryInterface,
iterable_hstring_AddRef,
iterable_hstring_Release,
/* IInspectable methods */
iterable_hstring_GetIids,
iterable_hstring_GetRuntimeClassName,
iterable_hstring_GetTrustLevel,
/* IIterable<HSTRING> methods */
iterable_hstring_First,
};
HRESULT vector_hstring_create( IVector_HSTRING **out )
{
struct vector_hstring *impl;
@ -487,6 +559,7 @@ HRESULT vector_hstring_create( IVector_HSTRING **out )
if (!(impl = calloc(1, sizeof(*impl)))) return E_OUTOFMEMORY;
impl->IVector_HSTRING_iface.lpVtbl = &vector_hstring_vtbl;
impl->IIterable_HSTRING_iface.lpVtbl = &iterable_hstring_vtbl;
impl->ref = 1;
*out = &impl->IVector_HSTRING_iface;