[PATCH v2 5/5] include: Add windows.media.speechrecognition.idl.

Bernhard Kölbl besentv at gmail.com
Mon Jan 31 06:51:49 CST 2022


And add ISpeechRecognitionConstraint together with
it's dependencies.

Signed-off-by: Bernhard Kölbl <besentv at gmail.com>
---
v2: Only add ISpeechRecognitionConstraint + dependencies.
---
 include/Makefile.in                         |  1 +
 include/windows.media.speechrecognition.idl | 88 +++++++++++++++++++++
 2 files changed, 89 insertions(+)
 create mode 100644 include/windows.media.speechrecognition.idl

diff --git a/include/Makefile.in b/include/Makefile.in
index 7fcf5f0ba7b..613c0bd0b37 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -783,6 +783,7 @@ SOURCES = \
 	windows.h \
 	windows.media.devices.idl \
 	windows.media.idl \
+	windows.media.speechrecognition.idl \
 	windows.media.speechsynthesis.idl \
 	windows.storage.streams.idl \
 	windows.system.idl \
diff --git a/include/windows.media.speechrecognition.idl b/include/windows.media.speechrecognition.idl
new file mode 100644
index 00000000000..65c9d5ef8da
--- /dev/null
+++ b/include/windows.media.speechrecognition.idl
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2022 Bernhard Kölbl
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifdef __WIDL__
+#pragma winrt ns_prefix
+#endif
+
+import "inspectable.idl";
+import "asyncinfo.idl";
+import "eventtoken.idl";
+import "windowscontracts.idl";
+import "windows.foundation.idl";
+import "windows.globalization.idl";
+/*import "windows.phone.idl";*/
+/*import "windows.storage.idl";*/
+
+namespace Windows {
+    namespace Media {
+        namespace SpeechRecognition {
+            typedef enum SpeechRecognitionConstraintProbability SpeechRecognitionConstraintProbability;
+            typedef enum SpeechRecognitionConstraintType SpeechRecognitionConstraintType;
+            interface ISpeechRecognitionConstraint;
+        }
+    }
+}
+
+namespace Windows {
+    namespace Media {
+        namespace SpeechRecognition {
+            declare {
+            }
+        }
+    }
+}
+
+namespace Windows {
+    namespace Media {
+        namespace SpeechRecognition {
+
+            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
+            enum SpeechRecognitionConstraintProbability
+            {
+                Default = 0,
+                Min = 1,
+                Max = 2,
+            };
+
+            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
+            enum SpeechRecognitionConstraintType
+            {
+                Topic = 0,
+                List = 1,
+                Grammar = 2,
+                VoiceCommandDefinition = 3,
+            };
+
+            [
+                contract(Windows.Foundation.UniversalApiContract, 1.0),
+                uuid(79ac1628-4d68-43c4-8911-40dc4101b55b)
+            ]
+            interface ISpeechRecognitionConstraint : IInspectable
+            {
+                [propget] HRESULT IsEnabled([out, retval] boolean *value);
+                [propput] HRESULT IsEnabled([in] boolean value);
+                [propget] HRESULT Tag([out, retval] HSTRING *value);
+                [propput] HRESULT Tag([in] HSTRING value);
+                [propget] HRESULT Type([out, retval] Windows.Media.SpeechRecognition.SpeechRecognitionConstraintType *value);
+                [propget] HRESULT Probability([out, retval] Windows.Media.SpeechRecognition.SpeechRecognitionConstraintProbability *value);
+                [propput] HRESULT Probability([in] Windows.Media.SpeechRecognition.SpeechRecognitionConstraintProbability value);
+            }
+        }
+    }
+}
-- 
2.34.1




More information about the wine-devel mailing list