[PATCH v2 3/4] windows.media.speech: Implement IInstalledVoicesStatic::AllVoices stub.
Rémi Bernon
rbernon at codeweavers.com
Fri Mar 5 02:53:49 CST 2021
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/windows.media.speech.dll/main.c | 113 ++++++++++++++++++++++++++-
1 file changed, 112 insertions(+), 1 deletion(-)
diff --git a/dlls/windows.media.speech.dll/main.c b/dlls/windows.media.speech.dll/main.c
index db57acac651..c5ca9528e35 100644
--- a/dlls/windows.media.speech.dll/main.c
+++ b/dlls/windows.media.speech.dll/main.c
@@ -50,6 +50,7 @@ struct windows_media_speech
{
IActivationFactory IActivationFactory_iface;
IInstalledVoicesStatic IInstalledVoicesStatic_iface;
+ IVectorView_VoiceInformation IVectorView_VoiceInformation_iface;
LONG ref;
};
@@ -63,6 +64,113 @@ static inline struct windows_media_speech *impl_from_IInstalledVoicesStatic(IIns
return CONTAINING_RECORD(iface, struct windows_media_speech, IInstalledVoicesStatic_iface);
}
+static inline struct windows_media_speech *impl_from_IVectorView_VoiceInformation(IVectorView_VoiceInformation *iface)
+{
+ return CONTAINING_RECORD(iface, struct windows_media_speech, IVectorView_VoiceInformation_iface);
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_voice_information_QueryInterface(
+ IVectorView_VoiceInformation *iface, REFIID iid, void **out)
+{
+ TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
+
+ if (IsEqualGUID(iid, &IID_IUnknown) ||
+ IsEqualGUID(iid, &IID_IInspectable) ||
+ IsEqualGUID(iid, &IID_IVectorView_VoiceInformation))
+ {
+ IUnknown_AddRef(iface);
+ *out = iface;
+ return S_OK;
+ }
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ *out = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG STDMETHODCALLTYPE vector_view_voice_information_AddRef(
+ IVectorView_VoiceInformation *iface)
+{
+ struct windows_media_speech *impl = impl_from_IVectorView_VoiceInformation(iface);
+ ULONG ref = InterlockedIncrement(&impl->ref);
+ TRACE("iface %p, ref %u.\n", iface, ref);
+ return ref;
+}
+
+static ULONG STDMETHODCALLTYPE vector_view_voice_information_Release(
+ IVectorView_VoiceInformation *iface)
+{
+ struct windows_media_speech *impl = impl_from_IVectorView_VoiceInformation(iface);
+ ULONG ref = InterlockedDecrement(&impl->ref);
+ TRACE("iface %p, ref %u.\n", iface, ref);
+ return ref;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetIids(
+ IVectorView_VoiceInformation *iface, ULONG *iid_count, IID **iids)
+{
+ FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetRuntimeClassName(
+ IVectorView_VoiceInformation *iface, HSTRING *class_name)
+{
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetTrustLevel(
+ IVectorView_VoiceInformation *iface, TrustLevel *trust_level)
+{
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetAt(
+ IVectorView_VoiceInformation *iface, ULONG index, IVoiceInformation **value)
+{
+ FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_voice_information_get_Size(
+ IVectorView_VoiceInformation *iface, ULONG *value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_voice_information_IndexOf(
+ IVectorView_VoiceInformation *iface, IVoiceInformation *element, ULONG *index, BOOLEAN *value)
+{
+ FIXME("iface %p, element %p, index %p, value %p stub!\n", iface, element, index, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetMany(
+ IVectorView_VoiceInformation *iface, ULONG start_index, IVoiceInformation **items, UINT *value)
+{
+ FIXME("iface %p, start_index %#x, items %p, value %p stub!\n", iface, start_index, items, value);
+ return E_NOTIMPL;
+}
+
+static const struct IVectorView_VoiceInformationVtbl vector_view_voice_information_vtbl =
+{
+ vector_view_voice_information_QueryInterface,
+ vector_view_voice_information_AddRef,
+ vector_view_voice_information_Release,
+ /* IInspectable methods */
+ vector_view_voice_information_GetIids,
+ vector_view_voice_information_GetRuntimeClassName,
+ vector_view_voice_information_GetTrustLevel,
+ /* IVectorView<VoiceInformation> methods */
+ vector_view_voice_information_GetAt,
+ vector_view_voice_information_get_Size,
+ vector_view_voice_information_IndexOf,
+ vector_view_voice_information_GetMany,
+};
+
static HRESULT STDMETHODCALLTYPE installed_voices_static_QueryInterface(
IInstalledVoicesStatic *iface, REFIID iid, void **out)
{
@@ -125,8 +233,10 @@ static HRESULT STDMETHODCALLTYPE installed_voices_static_GetTrustLevel(
static HRESULT STDMETHODCALLTYPE installed_voices_static_get_AllVoices(
IInstalledVoicesStatic *iface, IVectorView_VoiceInformation **value)
{
+ struct windows_media_speech *impl = impl_from_IInstalledVoicesStatic(iface);
FIXME("iface %p, value %p stub!\n", iface, value);
- return E_NOTIMPL;
+ *value = &impl->IVectorView_VoiceInformation_iface;
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE installed_voices_static_get_DefaultVoice(
@@ -240,6 +350,7 @@ static struct windows_media_speech windows_media_speech =
{
{&activation_factory_vtbl},
{&installed_voices_static_vtbl},
+ {&vector_view_voice_information_vtbl},
0
};
--
2.30.0
More information about the wine-devel
mailing list