mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
157 lines
5.3 KiB
Diff
157 lines
5.3 KiB
Diff
From 7a0957631d225f7eee1bf4c6409f72eab76b3f92 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
|
Date: Fri, 9 Oct 2020 13:53:55 +0200
|
|
Subject: [PATCH 2/4] windows.media.speech: Implement IInstalledVoicesStatic
|
|
stub.
|
|
|
|
---
|
|
.../windows.media.speech_main.c | 104 ++++++++++++++++++
|
|
1 file changed, 104 insertions(+)
|
|
|
|
diff --git a/dlls/windows.media.speech.dll/windows.media.speech_main.c b/dlls/windows.media.speech.dll/windows.media.speech_main.c
|
|
index c7c14deef78..cb686ccc0b5 100644
|
|
--- a/dlls/windows.media.speech.dll/windows.media.speech_main.c
|
|
+++ b/dlls/windows.media.speech.dll/windows.media.speech_main.c
|
|
@@ -10,6 +10,9 @@
|
|
#include "initguid.h"
|
|
#include "activation.h"
|
|
|
|
+#define WIDL_USING_IVECTORVIEW_1_WINDOWS_MEDIA_SPEECHSYNTHESIS_VOICEINFORMATION
|
|
+#define WIDL_USING_WINDOWS_MEDIA_SPEECHSYNTHESIS_IINSTALLEDVOICESSTATIC
|
|
+#define WIDL_USING_WINDOWS_MEDIA_SPEECHSYNTHESIS_IVOICEINFORMATION
|
|
#include "windows.foundation.h"
|
|
#include "windows.media.speechsynthesis.h"
|
|
|
|
@@ -27,6 +30,7 @@ static const char *debugstr_hstring(HSTRING hstr)
|
|
struct windows_media_speech
|
|
{
|
|
IActivationFactory IActivationFactory_iface;
|
|
+ IInstalledVoicesStatic IInstalledVoicesStatic_iface;
|
|
LONG ref;
|
|
};
|
|
|
|
@@ -35,6 +39,98 @@ static inline struct windows_media_speech *impl_from_IActivationFactory(IActivat
|
|
return CONTAINING_RECORD(iface, struct windows_media_speech, IActivationFactory_iface);
|
|
}
|
|
|
|
+static inline struct windows_media_speech *impl_from_IInstalledVoicesStatic(IInstalledVoicesStatic *iface)
|
|
+{
|
|
+ return CONTAINING_RECORD(iface, struct windows_media_speech, IInstalledVoicesStatic_iface);
|
|
+}
|
|
+
|
|
+static HRESULT STDMETHODCALLTYPE installed_voices_static_QueryInterface(
|
|
+ IInstalledVoicesStatic *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_IAgileObject) ||
|
|
+ IsEqualGUID(iid, &IID_IInspectable) ||
|
|
+ IsEqualGUID(iid, &IID_IInstalledVoicesStatic))
|
|
+ {
|
|
+ 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 installed_voices_static_AddRef(
|
|
+ IInstalledVoicesStatic *iface)
|
|
+{
|
|
+ struct windows_media_speech *impl = impl_from_IInstalledVoicesStatic(iface);
|
|
+ ULONG ref = InterlockedIncrement(&impl->ref);
|
|
+ TRACE("iface %p, ref %u.\n", iface, ref);
|
|
+ return ref;
|
|
+}
|
|
+
|
|
+static ULONG STDMETHODCALLTYPE installed_voices_static_Release(
|
|
+ IInstalledVoicesStatic *iface)
|
|
+{
|
|
+ struct windows_media_speech *impl = impl_from_IInstalledVoicesStatic(iface);
|
|
+ ULONG ref = InterlockedDecrement(&impl->ref);
|
|
+ TRACE("iface %p, ref %u.\n", iface, ref);
|
|
+ return ref;
|
|
+}
|
|
+
|
|
+static HRESULT STDMETHODCALLTYPE installed_voices_static_GetIids(
|
|
+ IInstalledVoicesStatic *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 installed_voices_static_GetRuntimeClassName(
|
|
+ IInstalledVoicesStatic *iface, HSTRING *class_name)
|
|
+{
|
|
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
|
|
+ return E_NOTIMPL;
|
|
+}
|
|
+
|
|
+static HRESULT STDMETHODCALLTYPE installed_voices_static_GetTrustLevel(
|
|
+ IInstalledVoicesStatic *iface, TrustLevel *trust_level)
|
|
+{
|
|
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
|
|
+ return E_NOTIMPL;
|
|
+}
|
|
+
|
|
+static HRESULT STDMETHODCALLTYPE installed_voices_static_get_AllVoices(
|
|
+ IInstalledVoicesStatic *iface, IVectorView_VoiceInformation **value)
|
|
+{
|
|
+ FIXME("iface %p, value %p stub!\n", iface, value);
|
|
+ return E_NOTIMPL;
|
|
+}
|
|
+
|
|
+static HRESULT STDMETHODCALLTYPE installed_voices_static_get_DefaultVoice(
|
|
+ IInstalledVoicesStatic *iface, IVoiceInformation **value)
|
|
+{
|
|
+ FIXME("iface %p, value %p stub!\n", iface, value);
|
|
+ return E_NOTIMPL;
|
|
+}
|
|
+
|
|
+static const struct IInstalledVoicesStaticVtbl installed_voices_static_vtbl =
|
|
+{
|
|
+ installed_voices_static_QueryInterface,
|
|
+ installed_voices_static_AddRef,
|
|
+ installed_voices_static_Release,
|
|
+ /* IInspectable methods */
|
|
+ installed_voices_static_GetIids,
|
|
+ installed_voices_static_GetRuntimeClassName,
|
|
+ installed_voices_static_GetTrustLevel,
|
|
+ /* IInstalledVoicesStatic methods */
|
|
+ installed_voices_static_get_AllVoices,
|
|
+ installed_voices_static_get_DefaultVoice,
|
|
+};
|
|
+
|
|
static HRESULT STDMETHODCALLTYPE windows_media_speech_QueryInterface(
|
|
IActivationFactory *iface, REFIID iid, void **out)
|
|
{
|
|
@@ -50,6 +146,13 @@ static HRESULT STDMETHODCALLTYPE windows_media_speech_QueryInterface(
|
|
return S_OK;
|
|
}
|
|
|
|
+ if (IsEqualGUID(iid, &IID_IInstalledVoicesStatic))
|
|
+ {
|
|
+ IUnknown_AddRef(iface);
|
|
+ *out = &impl->IInstalledVoicesStatic_iface;
|
|
+ return S_OK;
|
|
+ }
|
|
+
|
|
FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
|
|
*out = NULL;
|
|
return E_NOINTERFACE;
|
|
@@ -117,6 +220,7 @@ static const struct IActivationFactoryVtbl activation_factory_vtbl =
|
|
static struct windows_media_speech windows_media_speech =
|
|
{
|
|
{&activation_factory_vtbl},
|
|
+ {&installed_voices_static_vtbl},
|
|
0
|
|
};
|
|
|
|
--
|
|
2.28.0
|
|
|