Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- .../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..f12d9bab74d 100644 --- a/dlls/windows.media.speech.dll/windows.media.speech_main.c +++ b/dlls/windows.media.speech.dll/windows.media.speech_main.c @@ -10,7 +10,10 @@ #include "initguid.h" #include "activation.h"
+#define WIDL_using_Windows_Foundation +#define WIDL_using_Windows_Foundation_Collections #include "windows.foundation.h" +#define WIDL_using_Windows_Media_SpeechSynthesis #include "windows.media.speechsynthesis.h"
WINE_DEFAULT_DEBUG_CHANNEL(speech); @@ -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 };