11 Commits

Author SHA1 Message Date
4758b65159 build: Update project version 2025-06-17 01:16:22 +08:00
de3196d38a fix: Revise the tag of a log point 2025-06-17 01:16:11 +08:00
c2311fb7a4 feat: Add new event sources 2025-06-17 01:15:25 +08:00
7562be2c09 ci: Update plugins 2025-06-17 01:12:55 +08:00
a8f46113d4 build: Update project version 2025-06-06 19:33:15 +08:00
99736f114d style: Code cleanup 2025-06-06 19:32:42 +08:00
4d1a008106 feat: Add logs 2025-06-06 19:32:31 +08:00
9318cbca4e feat: Add new event sources 2025-06-06 19:31:27 +08:00
a162f345c4 ci: Update plugins 2025-06-06 19:30:21 +08:00
1af4afc7c6 build: Update project version 2025-05-07 22:56:45 +08:00
a3efe939e8 fix: Fix TTS COM exception in IL2CPP 2025-05-07 22:56:32 +08:00
206 changed files with 5002 additions and 132 deletions

View File

@@ -1,19 +1,60 @@
using Cryville.Common.Font;
using Cryville.Common.Logging;
using Cryville.Common.Unity.UI;
using Cryville.Culture;
using System;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using UnityEngine;
using Logger = Cryville.Common.Logging.Logger;
namespace Cryville.EEW.Unity {
class App {
public static string AppDataPath { get; private set; }
public static Logger MainLogger { get; private set; }
static FileStream _logFileStream;
static StreamLoggerListener _logWriter;
static bool _init;
public static void Init() {
if (_init) return;
_init = true;
AppDataPath = Application.persistentDataPath;
var logPath = Directory.CreateDirectory(Path.Combine(AppDataPath, "logs"));
_logFileStream = new FileStream(
Path.Combine(
logPath.FullName,
string.Format(
CultureInfo.InvariantCulture,
"{0}.log",
DateTimeOffset.UtcNow.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture)
)
),
FileMode.Create, FileAccess.Write, FileShare.Read
);
_logWriter = new StreamLoggerListener(_logFileStream) { AutoFlush = true };
MainLogger = new Logger();
var listener = new InstantLoggerListener();
listener.Log += MainLogger.Log;
MainLogger.AddListener(_logWriter);
Application.logMessageReceivedThreaded += OnInternalLog;
MainLogger.Log(1, "App", null, "App Version: {0}", Application.version);
MainLogger.Log(1, "App", null, "Unity Version: {0}", Application.unityVersion);
MainLogger.Log(1, "App", null, "Operating System: {0}, Unity = {1}, Family = {2}", Environment.OSVersion, SystemInfo.operatingSystem, SystemInfo.operatingSystemFamily);
MainLogger.Log(1, "App", null, "Platform: Build = {0}, Unity = {1}", PlatformConfig.Name, Application.platform);
MainLogger.Log(1, "App", null, "Culture: {0}, UI = {1}, Unity = {2}", SharedCultures.CurrentCulture, SharedCultures.CurrentUICulture, Application.systemLanguage);
MainLogger.Log(1, "App", null, "Device: Model = {0}, Type = {1}", SystemInfo.deviceModel, SystemInfo.deviceType);
MainLogger.Log(1, "App", null, "Graphics: Name = {0}, Type = {1}, Vendor = {2}, Version = {3}", SystemInfo.graphicsDeviceName, SystemInfo.graphicsDeviceType, SystemInfo.graphicsDeviceVendor, SystemInfo.graphicsDeviceVersion);
MainLogger.Log(1, "App", null, "Processor: Count = {0}, Frequency = {1}MHz, Type = {2}", SystemInfo.processorCount, SystemInfo.processorFrequency, SystemInfo.processorType);
MainLogger.Log(1, "App", null, "Initializing font manager");
foreach (var res in Resources.LoadAll<TextAsset>("cldr/common/validity")) {
IdValidity.Load(LoadXmlDocument(res));
}
@@ -25,7 +66,10 @@ namespace Cryville.EEW.Unity {
};
TMPLocalizedText.DefaultShader = Resources.Load<Shader>(PlatformConfig.TextShader);
MainLogger.Log(1, "App", null, "Loading config");
SharedSettings.Instance.Init();
MainLogger.Log(1, "App", null, "Initialized");
}
static readonly Encoding _encoding = new UTF8Encoding(false, true);
@@ -40,5 +84,16 @@ namespace Cryville.EEW.Unity {
using var reader = XmlReader.Create(stream, _xmlSettings);
return XDocument.Load(reader);
}
static void OnInternalLog(string condition, string stackTrace, LogType type) {
var l = type switch {
LogType.Log => 1,
LogType.Assert => 2,
LogType.Warning => 3,
LogType.Error or LogType.Exception => 4,
_ => 1,
};
MainLogger.Log(l, "Internal", null, "{0}\n{1}", condition, stackTrace);
}
}
}

View File

@@ -1,3 +1,3 @@
using System.Reflection;
[assembly: AssemblyVersion("0.0.5")]
[assembly: AssemblyVersion("0.0.8")]

View File

@@ -55,23 +55,25 @@ namespace Cryville.EEW.Unity {
[JsonDerivedType(typeof(BMKGOpenDataEventSourceConfig), "BMKGOpenData")]
[JsonDerivedType(typeof(CWAOpenDataEventSourceConfig), "CWAOpenData")]
[JsonDerivedType(typeof(EMSCRealTimeEventSourceConfig), "EMSCRealTime")]
[JsonDerivedType(typeof(GeoNetEventSourceConfig), "GeoNet")]
[JsonDerivedType(typeof(GlobalQuakeServerEventSourceConfig), "GlobalQuakeServer")]
[JsonDerivedType(typeof(GlobalQuakeServer15EventSourceConfig), "GlobalQuakeServer15")]
[JsonDerivedType(typeof(JMAAtomEventSourceConfig), "JMAAtom")]
[JsonDerivedType(typeof(NOAAEventSourceConfig), "NOAA")]
[JsonDerivedType(typeof(UpdateCheckerEventSourceConfig), "UpdateChecker")]
[JsonDerivedType(typeof(USGSQuakeMLEventSourceConfig), "USGSQuakeML")]
[JsonDerivedType(typeof(USGSEventSourceConfig), "USGSQuakeML")]
[JsonDerivedType(typeof(WolfxEventSourceConfig), "Wolfx")]
abstract record EventSourceConfig();
record BMKGOpenDataEventSourceConfig([property: JsonRequired] string[] Subtypes) : EventSourceConfig;
record CWAOpenDataEventSourceConfig([property: JsonRequired] string Subtype, [property: JsonRequired] string Token) : EventSourceConfig;
record EMSCRealTimeEventSourceConfig() : EventSourceConfig;
record GeoNetEventSourceConfig(int MinimumMMI = 3, bool DoGetFullHistory = false, bool DoGetStrongMotionInfo = true) : EventSourceConfig;
record GlobalQuakeServerEventSourceConfig([property: JsonRequired] string Host, int Port = 38000) : EventSourceConfig;
record GlobalQuakeServer15EventSourceConfig(string Host, int Port = 38000) : GlobalQuakeServerEventSourceConfig(Host, Port);
record JMAAtomEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
record NOAAEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
record UpdateCheckerEventSourceConfig : EventSourceConfig;
record USGSQuakeMLEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
record USGSEventSourceConfig([property: JsonRequired] string Subtype, bool UseGeoJSONFeeds, string[] Products) : EventSourceConfig;
record WolfxEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false, bool UseRawCENCLocationName = false) : EventSourceConfig;
[JsonSerializable(typeof(Config))]

View File

@@ -3,6 +3,7 @@
"rootNamespace": "",
"references": [
"GUID:b92f9c7ac10b1c04e86fc48210f62ab1",
"GUID:1e0937e40dadba24a97b7342c4559580",
"GUID:e5b7e7f40a80a814ba706299d68f9213",
"GUID:da293eebbcb9a4947a212534c52d1a32"
],

View File

@@ -2,12 +2,14 @@ using Cryville.EEW.BMKGOpenData.Map;
using Cryville.EEW.Core;
using Cryville.EEW.CWAOpenData.Map;
using Cryville.EEW.EMSC.Map;
using Cryville.EEW.GeoNet.Map;
using Cryville.EEW.GlobalQuake.Map;
using Cryville.EEW.JMAAtom.Map;
using Cryville.EEW.Map;
using Cryville.EEW.NOAA.Map;
using Cryville.EEW.QuakeML.Map;
using Cryville.EEW.Report;
using Cryville.EEW.USGS.Map;
using Cryville.EEW.Wolfx.Map;
using System.Collections.Generic;
using System.Drawing;
@@ -135,12 +137,16 @@ namespace Cryville.EEW.Unity.Map {
new CWATsunamiMapGenerator(),
new EMSCRealTimeEventMapGenerator(),
new FujianEEWMapGenerator(),
new GeoNetQuakeHistoryMapGenerator(),
new GeoNetQuakeMapGenerator(),
new GeoNetStrongMapGenerator(),
new GlobalQuakeMapViewGenerator(),
new JMAAtomMapGenerator(),
new JMAEEWMapGenerator(),
new NOAAMapGenerator(),
new QuakeMLEventMapGenerator(),
new SichuanEEWMapGenerator(),
new USGSContoursMapGenerator(),
});
public UnityMapElement Build(object e, out CultureInfo culture, out int order) {
culture = CultureInfo.InvariantCulture;

View File

@@ -40,7 +40,7 @@ namespace Cryville.EEW.Unity.Map {
_req.SendWebRequest();
}
catch (Exception ex) {
Debug.LogException(ex);
App.MainLogger.Log(4, "Map", null, "An error occurred when loading map tile {0}: {1}", _localFile, ex);
}
_isReady = false;
}
@@ -51,7 +51,7 @@ namespace Cryville.EEW.Unity.Map {
_sprite = Sprite.Create(_tex, new Rect(0, 0, _tex.width, _tex.height), Vector2.zero, _tex.height, 0, SpriteMeshType.FullRect, Vector4.zero, false);
}
else {
Debug.LogError(_texHandler.error);
App.MainLogger.Log(4, "Map", null, "An error occurred when loading map tile {0}: {1}", _localFile, _texHandler.error);
_localFile.Delete();
}
_req.Dispose();

View File

@@ -13,6 +13,7 @@ namespace Cryville.EEW.Unity {
};
protected override Stream Open(string path) {
App.MainLogger.Log(0, "Audio", null, "Opening audio file {0}", path);
path = Path.Combine(Application.streamingAssetsPath, "Sounds", path + ".ogg");
if (!File.Exists(path)) return null;
return new FileStream(path, FileMode.Open, FileAccess.Read);

View File

@@ -6,9 +6,10 @@ using System.Threading.Tasks;
namespace Cryville.EEW.Unity {
class TTSWorker : Core.Audio.TTSWorker {
readonly SpVoiceClass _voice;
readonly ISpVoice _voice;
public TTSWorker() : base(CreateSoundPlayer()) {
App.MainLogger.Log(1, "Audio", null, "Initializing TTS worker");
try {
_voice = new SpVoiceClass();
}
@@ -16,10 +17,12 @@ namespace Cryville.EEW.Unity {
}
static SoundPlayer CreateSoundPlayer() {
App.MainLogger.Log(1, "Audio", null, "Creating sound player");
try {
return new SoundPlayer();
}
catch (InvalidOperationException) {
catch (InvalidOperationException ex) {
App.MainLogger.Log(3, "Audio", null, "An error occurred when creating sound player: {0}", ex);
return null;
}
}
@@ -34,14 +37,17 @@ namespace Cryville.EEW.Unity {
if (_voice == null) return Task.CompletedTask;
_voice.Speak(
string.Format(CultureInfo.InvariantCulture, "<LANG LANGID=\"{0:x}\">{1}</LANG>", culture.LCID, content),
SpeechVoiceSpeakFlags.SVSFlagsAsync | SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak
(uint)(SpeechVoiceSpeakFlags.SVSFlagsAsync | SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak),
out _
);
App.MainLogger.Log(0, "Audio", null, "TTS ({0}): {1}", culture, content);
return Task.CompletedTask;
}
protected override void StopCurrent() {
if (_voice == null) return;
_voice.Skip("SENTENCE", int.MaxValue);
App.MainLogger.Log(0, "Audio", null, "TTS stopping current");
_voice.Skip("SENTENCE", int.MaxValue, out _);
}
}
}

View File

@@ -5,6 +5,8 @@ using Cryville.EEW.CWAOpenData;
using Cryville.EEW.CWAOpenData.Model;
using Cryville.EEW.CWAOpenData.TTS;
using Cryville.EEW.EMSC;
using Cryville.EEW.GeoNet;
using Cryville.EEW.GeoNet.TTS;
using Cryville.EEW.GlobalQuake;
using Cryville.EEW.JMAAtom;
using Cryville.EEW.JMAAtom.TTS;
@@ -58,6 +60,7 @@ namespace Cryville.EEW.Unity {
}
void Start() {
App.MainLogger.Log(1, "App", null, "Initializing localized resources manager");
LocalizedResources.Init(new LocalizedResourcesManager());
RegisterViewModelGenerators(_worker);
RegisterTTSMessageGenerators(_worker);
@@ -71,6 +74,7 @@ namespace Cryville.EEW.Unity {
_worker.Reported += OnReported;
_grouper.GroupUpdated += OnGroupUpdated;
_grouper.GroupRemoved += OnGroupRemoved;
App.MainLogger.Log(1, "App", null, "Worker ready");
Task.Run(() => GatewayVerify(_cancellationTokenSource.Token)).ContinueWith(task => {
if (task.IsFaulted) {
OnReported(this, new() { Title = task.Exception.Message });
@@ -100,12 +104,18 @@ namespace Cryville.EEW.Unity {
worker.RegisterViewModelGenerator(new CWATsunamiRVMGenerator());
worker.RegisterViewModelGenerator(new EMSCRealTimeEventRVMGenerator());
worker.RegisterViewModelGenerator(new FujianEEWRVMGenerator());
worker.RegisterViewModelGenerator(new GeoNetQuakeHistoryRVMGenerator());
worker.RegisterViewModelGenerator(new GeoNetQuakeRVMGenerator());
worker.RegisterViewModelGenerator(new GeoNetStrongRVMGenerator());
worker.RegisterViewModelGenerator(new GlobalQuakeRVMGenerator());
worker.RegisterViewModelGenerator(new JMAAtomRVMGenerator());
worker.RegisterViewModelGenerator(new JMAEEWRVMGenerator());
worker.RegisterViewModelGenerator(new NOAAAtomRVMGenerator());
worker.RegisterViewModelGenerator(new QuakeMLEventRVMGenerator());
var quakemlEventRVMGenerator = new QuakeMLEventRVMGenerator();
quakemlEventRVMGenerator.AddExtension(new USGSQuakeMLExtension());
worker.RegisterViewModelGenerator(quakemlEventRVMGenerator);
worker.RegisterViewModelGenerator(new SichuanEEWRVMGenerator());
worker.RegisterViewModelGenerator(new USGSContoursRVMGenerator());
worker.RegisterViewModelGenerator(new VersionRVMGenerator());
}
CENCEarthquakeTTSMessageGenerator _cencEarthquakeTTSMessageGenerator;
@@ -117,6 +127,9 @@ namespace Cryville.EEW.Unity {
worker.RegisterTTSMessageGenerator(new CWAEEWTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new CWATsunamiTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new FujianEEWTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new GeoNetQuakeHistoryTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new GeoNetQuakeTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new GeoNetStrongTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new JMAAtomTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new JMAEEWTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new NOAATTSMessageGenerator());
@@ -125,6 +138,7 @@ namespace Cryville.EEW.Unity {
bool _verified;
void BuildWorkers() {
App.MainLogger.Log(1, "App", null, "Building workers");
#if UNITY_EDITOR
_worker.AddWorker(new WolfxWorker(new Uri("ws://localhost:9995/wolfx")));
_worker.AddWorker(new JMAAtomWorker(new Uri("http://localhost:9095/eqvol.xml")));
@@ -139,25 +153,29 @@ namespace Cryville.EEW.Unity {
#else
foreach (var source in SharedSettings.Instance.EventSources) {
_worker.AddWorker(source switch {
BMKGOpenDataEventSourceConfig bmkgOpenData => BuildBMKGOpenDataWorkerUris(new BMKGOpenDataWorker(new("https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json")), bmkgOpenData),
BMKGOpenDataEventSourceConfig bmkgOpenData => BuildBMKGOpenDataWorkerUris(new(new("https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json")), bmkgOpenData),
CWAOpenDataEventSourceConfig cwaOpenData => cwaOpenData.Subtype switch {
"E-A0014-001" => new CWAReportWorker<Tsunami>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0014-001"), cwaOpenData.Token, 1440, 17280),
"E-A0015-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001"), cwaOpenData.Token),
"E-A0016-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0016-001"), cwaOpenData.Token),
"E-A0014-001" => new CWAReportWorker<Tsunami>(new("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0014-001"), cwaOpenData.Token, 1440, 17280),
"E-A0015-001" => new CWAReportWorker<Earthquake>(new("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001"), cwaOpenData.Token),
"E-A0016-001" => new CWAReportWorker<Earthquake>(new("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0016-001"), cwaOpenData.Token),
_ => throw new InvalidOperationException("Unknown CWA open data sub-type."),
},
EMSCRealTimeEventSourceConfig => new EMSCRealTimeWorker(new("wss://www.seismicportal.eu/standing_order/websocket")),
GeoNetEventSourceConfig geoNet => BuildGeoNetWorker(new(new("https://api.geonet.org.nz/quake"), new("https://api.geonet.org.nz/quake/history/index"), new("https://api.geonet.org.nz/intensity/strong/processed/index")), geoNet),
GlobalQuakeServer15EventSourceConfig gq => new GlobalQuakeWorker15(gq.Host, gq.Port),
GlobalQuakeServerEventSourceConfig gq => new GlobalQuakeWorker(gq.Host, gq.Port),
JMAAtomEventSourceConfig jmaAtom => BuildJMAAtomWorkerFilter(new JMAAtomWorker(new("https://www.data.jma.go.jp/developer/xml/feed/eqvol.xml")), jmaAtom),
JMAAtomEventSourceConfig jmaAtom => BuildJMAAtomWorkerFilter(new(new("https://www.data.jma.go.jp/developer/xml/feed/eqvol.xml")), jmaAtom),
NOAAEventSourceConfig noaaAtom => noaaAtom.Subtype switch {
"PAAQ" => new NOAAAtomWorker(new("https://www.tsunami.gov/events/xml/PAAQAtom.xml"), new("https://www.tsunami.gov/"), new("/php/esri.php?e=t", UriKind.Relative), "PAAQ"),
"PHEB" => new NOAAAtomWorker(new("https://www.tsunami.gov/events/xml/PHEBAtom.xml"), new("https://www.tsunami.gov/"), new("/php/esri.php?e=t", UriKind.Relative), "PHEB"),
_ => throw new InvalidOperationException("Unknown NOAA sub-type."),
},
UpdateCheckerEventSourceConfig => new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"),
USGSQuakeMLEventSourceConfig usgsQuakeML => BuildUSGSQuakeMLWorkerUri(new USGSQuakeMLWorker(new Uri("https://earthquake.usgs.gov/earthquakes/feed/v1.0/quakeml.php")), usgsQuakeML),
WolfxEventSourceConfig wolfx => BuildWolfxWorkerFilter(new WolfxWorker(new Uri("wss://ws-api.wolfx.jp/all_eew")), wolfx),
USGSEventSourceConfig usgs => BuildUSGSWorker(usgs.UseGeoJSONFeeds
? new USGSGeoJSONWorker(new Uri("https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php"))
: new USGSQuakeMLWorker(new Uri("https://earthquake.usgs.gov/earthquakes/feed/v1.0/quakeml.php"))
, usgs),
WolfxEventSourceConfig wolfx => BuildWolfxWorkerFilter(new WolfxWorker(new("wss://ws-api.wolfx.jp/all_eew")), wolfx),
_ => throw new InvalidOperationException("Unknown event source type."),
});
}
@@ -190,8 +208,22 @@ namespace Cryville.EEW.Unity {
worker.SetDataUris(config.Subtypes.Select(i => new Uri(string.Format(CultureInfo.InvariantCulture, "https://data.bmkg.go.id/DataMKG/TEWS/{0}.json", i))));
return worker;
}
static USGSQuakeMLWorker BuildUSGSQuakeMLWorkerUri(USGSQuakeMLWorker worker, USGSQuakeMLEventSourceConfig config) {
worker.SetFeedRelativeUri(new(string.Format(CultureInfo.InvariantCulture, "/earthquakes/feed/v1.0/summary/{0}.quakeml", config.Subtype), UriKind.Relative));
static GeoNetWorker BuildGeoNetWorker(GeoNetWorker worker, GeoNetEventSourceConfig pref) {
worker.MinimumMMI = pref.MinimumMMI;
worker.DoGetFullHistory = pref.DoGetFullHistory;
worker.DoGetStrongMotionInfo = pref.DoGetStrongMotionInfo;
return worker;
}
static USGSWorker BuildUSGSWorker(USGSWorker worker, USGSEventSourceConfig config) {
worker.SetFeedRelativeUri(new(string.Format(CultureInfo.InvariantCulture, "/earthquakes/feed/v1.0/summary/{0}{1}", config.Subtype, config.UseGeoJSONFeeds ? ".geojson" : ".quakeml"), UriKind.Relative));
if (worker is USGSGeoJSONWorker geojsonWorker) {
geojsonWorker.SetFilter(
config.Products
.Select(i => i.Split('/', 2))
.GroupBy(i => i[0])
.ToDictionary(g => g.Key, g => g.Select(i => i[1]))
);
}
return worker;
}
@@ -200,7 +232,7 @@ namespace Cryville.EEW.Unity {
ReportViewModel _latestHistoryReport;
void OnReported(object sender, ReportViewModel e) {
if (e.Model is Exception && e.Model is not SourceWorkerNetworkException)
Debug.LogError(e);
App.MainLogger.Log(4, "App", null, "Received an error from {0}: {1}", sender.GetType(), e.Model);
_grouper.Report(e);
_ongoingReportManager.Report(e);
_uiActionQueue.Enqueue(() => {

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 7aa0c56ccfdaf9443b58f26bf40eed01
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,185 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Cryville.Common.Logging</name>
</assembly>
<members>
<member name="T:Cryville.Common.Logging.Logger">
<summary>
A logger.
</summary>
</member>
<member name="M:Cryville.Common.Logging.Logger.AddListener(Cryville.Common.Logging.LoggerListener)">
<summary>
Attaches a listener to the logger.
</summary>
<param name="listener">The logger listener.</param>
</member>
<member name="M:Cryville.Common.Logging.Logger.RemoveListener(Cryville.Common.Logging.LoggerListener)">
<summary>
Detaches a listener from the logger.
</summary>
<param name="listener">The logger listener.</param>
</member>
<member name="M:Cryville.Common.Logging.Logger.Log(System.Int32,System.String,System.String,System.Object[])">
<summary>
Logs to the logger.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="format">The format string.</param>
<param name="args">The arguments for formatting.</param>
</member>
<member name="M:Cryville.Common.Logging.Logger.Log(System.Int32,System.String,System.IFormatProvider,System.String,System.Object[])">
<summary>
Logs to the logger.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="provider">The format provider.</param>
<param name="format">The format string.</param>
<param name="args">The arguments for formatting.</param>
</member>
<member name="M:Cryville.Common.Logging.Logger.Log(System.Int32,System.String,System.String)">
<summary>
Logs to the logger.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="message">The message.</param>
</member>
<member name="M:Cryville.Common.Logging.Logger.Log(System.Int32,System.String,System.Char[])">
<summary>
Logs to the logger.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="message">An array of <see cref="T:System.Char" /> containing the message.</param>
</member>
<member name="M:Cryville.Common.Logging.Logger.Log(System.Int32,System.String,System.Char[],System.Int32,System.Int32)">
<summary>
Logs to the logger.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="message">An array of <see cref="T:System.Char" /> containing the message.</param>
<param name="index">A zero-based index of the first character of the message within <paramref name="message" />.</param>
<param name="length">The length of the message.</param>
</member>
<member name="M:Cryville.Common.Logging.Logger.Log(System.Int32,System.String,System.Char*,System.Int32)">
<summary>
Logs to the logger.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="message">A pointer to the first character of the message.</param>
<param name="length">The length of the message.</param>
</member>
<member name="T:Cryville.Common.Logging.LoggerListener">
<summary>
A logger listener.
</summary>
</member>
<member name="M:Cryville.Common.Logging.LoggerListener.Dispose(System.Boolean)">
<summary>
Closes the logger listener and cleans up all the resources.
</summary>
<param name="disposing">Whether to clean up managed resources.</param>
</member>
<member name="M:Cryville.Common.Logging.LoggerListener.Dispose">
<summary>
Closes the logger listener.
</summary>
</member>
<member name="M:Cryville.Common.Logging.LoggerListener.OnLog(System.Int32,System.String,System.String)">
<summary>
Handles an incoming log.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="message">The message.</param>
</member>
<member name="M:Cryville.Common.Logging.LoggerListener.OnLog(System.Int32,System.String,System.Char[],System.Int32,System.Int32)">
<summary>
Handles an incoming log.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="message">An array of <see cref="T:System.Char" /> containing the message.</param>
<param name="index">A zero-based index of the first character of the message within <paramref name="message" />.</param>
<param name="length">The length of the message.</param>
</member>
<member name="M:Cryville.Common.Logging.LoggerListener.OnLog(System.Int32,System.String,System.Char*,System.Int32)">
<summary>
Handles an incoming log.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="message">A pointer to the first character of the message.</param>
<param name="length">The length of the message.</param>
</member>
<member name="T:Cryville.Common.Logging.InstantLoggerListener">
<summary>
A <see cref="T:Cryville.Common.Logging.LoggerListener" /> that calls a callback function on log.
</summary>
</member>
<member name="E:Cryville.Common.Logging.InstantLoggerListener.Log">
<summary>
Occurs when a log is logged to the logger.
</summary>
</member>
<member name="M:Cryville.Common.Logging.InstantLoggerListener.OnLog(System.Int32,System.String,System.String)">
<inheritdoc />
</member>
<member name="T:Cryville.Common.Logging.BufferedLoggerListener">
<summary>
A <see cref="T:Cryville.Common.Logging.LoggerListener" /> that buffers the logs for enumeration.
</summary>
</member>
<member name="M:Cryville.Common.Logging.BufferedLoggerListener.OnLog(System.Int32,System.String,System.String)">
<inheritdoc />
</member>
<member name="M:Cryville.Common.Logging.BufferedLoggerListener.Enumerate(Cryville.Common.Logging.LogHandler)">
<summary>
Enumerates the buffered logs.
</summary>
<param name="callback">The callback function to receive the logs.</param>
</member>
<member name="T:Cryville.Common.Logging.StreamLoggerListener">
<summary>
A <see cref="T:Cryville.Common.Logging.LoggerListener" /> that writes logs into a stream.
</summary>
<param name="stream">The stream.</param>
<param name="encoding">The encoding.</param>
</member>
<member name="M:Cryville.Common.Logging.StreamLoggerListener.#ctor(System.IO.Stream,System.Text.Encoding)">
<summary>
A <see cref="T:Cryville.Common.Logging.LoggerListener" /> that writes logs into a stream.
</summary>
<param name="stream">The stream.</param>
<param name="encoding">The encoding.</param>
</member>
<member name="M:Cryville.Common.Logging.StreamLoggerListener.#ctor(System.IO.Stream)">
<summary>
Creates an instance of the <see cref="T:Cryville.Common.Logging.StreamLoggerListener" /> class.
</summary>
<param name="stream">The stream.</param>
</member>
<member name="P:Cryville.Common.Logging.StreamLoggerListener.AutoFlush">
<summary>
Whether to flush the stream every time a log is written.
</summary>
</member>
<member name="M:Cryville.Common.Logging.StreamLoggerListener.OnLog(System.Int32,System.String,System.String)">
<inheritdoc />
</member>
<member name="T:Cryville.Common.Logging.LogHandler">
<summary>
Represents the method that will handle a log.
</summary>
<param name="level">The severity level.</param>
<param name="category">The category.</param>
<param name="message">The message.</param>
</member>
</members>
</doc>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 72ded0675457e0348809193a9c1092b5
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 9add703a85e306e41a5f1f424b9e5980
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 1fa7d6d104052f447b49fc53f65d55cd
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 590f9955e3e1e36458e2f7b807a05188
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 123d46d01924a434fbe65219e8baba1e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

View File

@@ -76,6 +76,20 @@
The shared instance of the <see cref="T:Cryville.EEW.Heartbeat" /> class.
</summary>
</member>
<member name="T:Cryville.EEW.HttpExtensions">
<summary>
Provides a set of <see langword="static" /> methods related to HTTP.
</summary>
</member>
<member name="M:Cryville.EEW.HttpExtensions.EnsureNonErrorStatusCode(System.Net.Http.HttpResponseMessage)">
<summary>
Throws an exception if the HTTP response has a client error status code (400~499) or a server error status code (500~599).
</summary>
<param name="response">The response message.</param>
<returns>The response message if there is no error.</returns>
<exception cref="T:System.InvalidOperationException">The response has a client error status code (400~499).</exception>
<exception cref="T:System.Net.Http.HttpRequestException">The response has a server error status code (500~599).</exception>
</member>
<member name="T:Cryville.EEW.HttpPullWorker">
<summary>
A source worker that pulls events with HTTP GET requests.
@@ -117,6 +131,34 @@
<returns>The task.</returns>
<exception cref="T:System.InvalidOperationException">The server responses with an unhandled status code.</exception>
</member>
<member name="M:Cryville.EEW.HttpPullWorker.HandleRawResponse(System.Net.Http.HttpResponseMessage,System.Threading.CancellationToken)">
<summary>
Handles a raw response message.
</summary>
<param name="response">The response message.</param>
<param name="cancellationToken">A cancellation token.</param>
<returns>A task.</returns>
</member>
<member name="M:Cryville.EEW.HttpPullWorker.TryGetAsync(System.Uri,System.Threading.CancellationToken,System.Boolean,System.Int32)">
<summary>
Try to send a GET request to the specified URI.
</summary>
<param name="uri">The URI.</param>
<param name="cancellationToken">The cancellation token.</param>
<param name="retryOnErrorStatusCode">Whether to retry if the server responses with an error status code.</param>
<param name="retries">Times to retry before the request fails.</param>
<returns>The response message, or <see langword="null" /> if the request fails.</returns>
</member>
<member name="M:Cryville.EEW.HttpPullWorker.TrySendAsync(System.Func{System.Net.Http.HttpRequestMessage},System.Threading.CancellationToken,System.Boolean,System.Int32)">
<summary>
Try to send a request to the specified URI.
</summary>
<param name="msgFactory">A function that creates the request message.</param>
<param name="cancellationToken">The cancellation token.</param>
<param name="retryOnErrorStatusCode">Whether to retry if the server responses with an error status code.</param>
<param name="retries">Times to retry before the request fails.</param>
<returns>The response message, or <see langword="null" /> if the request fails.</returns>
</member>
<member name="M:Cryville.EEW.HttpPullWorker.GetUri">
<summary>
Gets the URI of the next request, usually based on <see cref="P:Cryville.EEW.HttpPullWorker.BaseUri" />.
@@ -128,7 +170,7 @@
</member>
<member name="M:Cryville.EEW.HttpPullWorker.AfterHandled(System.Threading.CancellationToken)">
<summary>
Called when a response is handled successfully, or when the server reponses with No Content (204) or Not Modified (304).
Called when a response is handled successfully, or when the server responses with a non-error status code (100~399).
</summary>
</member>
<member name="M:Cryville.EEW.HttpPullWorker.Handle(System.IO.Stream,System.Net.Http.Headers.HttpResponseHeaders,System.Threading.CancellationToken)">
@@ -549,6 +591,61 @@
<member name="P:Cryville.EEW.Models.GeoJSON.Feature.Properties">
<summary>The properties of the feature.</summary>
</member>
<member name="T:Cryville.EEW.Models.GeoJSON.Feature`1">
<summary>
Represents a spatially bounded thing.
</summary>
<typeparam name="T">The type of the properties.</typeparam>
<param name="Id">A JSON string or number representing the commonly used identifier of the feature.</param>
<param name="Geometry">The geometry of the feature.</param>
<param name="Properties">The properties of the feature.</param>
<param name="BoundingBox">The bounding box.</param>
</member>
<member name="M:Cryville.EEW.Models.GeoJSON.Feature`1.#ctor(System.Text.Json.JsonElement,Cryville.EEW.Models.GeoJSON.Geometry,`0,System.Double[])">
<summary>
Represents a spatially bounded thing.
</summary>
<typeparam name="T">The type of the properties.</typeparam>
<param name="Id">A JSON string or number representing the commonly used identifier of the feature.</param>
<param name="Geometry">The geometry of the feature.</param>
<param name="Properties">The properties of the feature.</param>
<param name="BoundingBox">The bounding box.</param>
</member>
<member name="P:Cryville.EEW.Models.GeoJSON.Feature`1.Id">
<summary>A JSON string or number representing the commonly used identifier of the feature.</summary>
</member>
<member name="P:Cryville.EEW.Models.GeoJSON.Feature`1.Geometry">
<summary>The geometry of the feature.</summary>
</member>
<member name="P:Cryville.EEW.Models.GeoJSON.Feature`1.Properties">
<summary>The properties of the feature.</summary>
</member>
<member name="T:Cryville.EEW.Models.GeoJSON.IFeature`1">
<summary>
Represents a spatially bounded thing.
</summary>
<typeparam name="T">The type of the properties.</typeparam>
</member>
<member name="P:Cryville.EEW.Models.GeoJSON.IFeature`1.Id">
<summary>
A JSON string or number representing the commonly used identifier of the feature.
</summary>
</member>
<member name="P:Cryville.EEW.Models.GeoJSON.IFeature`1.Geometry">
<summary>
The geometry of the feature.
</summary>
</member>
<member name="P:Cryville.EEW.Models.GeoJSON.IFeature`1.Properties">
<summary>
The properties of the feature.
</summary>
</member>
<member name="P:Cryville.EEW.Models.GeoJSON.IFeature`1.BoundingBox">
<summary>
The bounding box.
</summary>
</member>
<member name="T:Cryville.EEW.Models.GeoJSON.FeatureCollection">
<summary>
Represents a feature collection.
@@ -566,6 +663,25 @@
<member name="P:Cryville.EEW.Models.GeoJSON.FeatureCollection.Features">
<summary>The features.</summary>
</member>
<member name="T:Cryville.EEW.Models.GeoJSON.FeatureCollection`1">
<summary>
Represents a feature collection.
</summary>
<typeparam name="T">The type of the properties of the features.</typeparam>
<param name="Features">The features.</param>
<param name="BoundingBox">The bounding box.</param>
</member>
<member name="M:Cryville.EEW.Models.GeoJSON.FeatureCollection`1.#ctor(Cryville.EEW.Models.GeoJSON.Feature{`0}[],System.Double[])">
<summary>
Represents a feature collection.
</summary>
<typeparam name="T">The type of the properties of the features.</typeparam>
<param name="Features">The features.</param>
<param name="BoundingBox">The bounding box.</param>
</member>
<member name="P:Cryville.EEW.Models.GeoJSON.FeatureCollection`1.Features">
<summary>The features.</summary>
</member>
<member name="T:Cryville.EEW.Models.GeoJSON.GeoJSONObject">
<summary>
A Geometry, Feature, or collection of Features.
@@ -983,6 +1099,37 @@
<member name="M:Cryville.EEW.NonstandardDateTimeJsonConverter.Write(System.Text.Json.Utf8JsonWriter,System.DateTime,System.Text.Json.JsonSerializerOptions)">
<inheritdoc />
</member>
<member name="T:Cryville.EEW.ProgressiveDelay">
<summary>
A helper class that produces progressive delay.
</summary>
</member>
<member name="P:Cryville.EEW.ProgressiveDelay.CurrentDelay">
<summary>
The delay to next tick.
</summary>
</member>
<member name="M:Cryville.EEW.ProgressiveDelay.#ctor(System.Double,System.Double,System.Double)">
<summary>
Creates an instance of the <see cref="T:Cryville.EEW.ProgressiveDelay" /> class.
</summary>
<param name="baseDelay">The minimum delay.</param>
<param name="maxDelay">The maximum delay.</param>
<param name="delayMultiplier">The multiplier between adjacent delay values.</param>
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="baseDelay" /> is negative or zero. -or- <paramref name="maxDelay" /> is negative or zero. -or- <paramref name="delayMultiplier" /> is less than or equal to 1.</exception>
</member>
<member name="M:Cryville.EEW.ProgressiveDelay.Step(System.Double)">
<summary>
Decrements the current delay and ticks if the delay has run over.
</summary>
<param name="amount">The amount of delay to decrement.</param>
<returns>Whether to tick.</returns>
</member>
<member name="M:Cryville.EEW.ProgressiveDelay.Reset">
<summary>
Resets to the base delay.
</summary>
</member>
<member name="T:Cryville.EEW.Report.EmptyRVMGeneratorContext">
<summary>
An empty <see cref="T:Cryville.EEW.Report.IRVMGeneratorContext" />.
@@ -1018,7 +1165,7 @@
</summary>
<param name="Latitude">The latitude of the hypocenter.</param>
<param name="Longitude">The longitude of the hypocenter.</param>
<param name="DateTime">The origin date time.</param>
<param name="DateTime">The origin date time in UTC.</param>
<param name="Magnitude">The magnitude.</param>
</member>
<member name="M:Cryville.EEW.Report.HypocenterGroupKey.#ctor(System.Double,System.Double,System.DateTime,System.Double)">
@@ -1027,7 +1174,7 @@
</summary>
<param name="Latitude">The latitude of the hypocenter.</param>
<param name="Longitude">The longitude of the hypocenter.</param>
<param name="DateTime">The origin date time.</param>
<param name="DateTime">The origin date time in UTC.</param>
<param name="Magnitude">The magnitude.</param>
</member>
<member name="P:Cryville.EEW.Report.HypocenterGroupKey.Latitude">
@@ -1037,7 +1184,7 @@
<summary>The longitude of the hypocenter.</summary>
</member>
<member name="P:Cryville.EEW.Report.HypocenterGroupKey.DateTime">
<summary>The origin date time.</summary>
<summary>The origin date time in UTC.</summary>
</member>
<member name="P:Cryville.EEW.Report.HypocenterGroupKey.Magnitude">
<summary>The magnitude.</summary>
@@ -1317,11 +1464,6 @@
<see cref="P:Cryville.EEW.Report.ReportViewModel.InvalidatedTime" /> converted to UTC.
</summary>
</member>
<member name="P:Cryville.EEW.Report.ReportViewModel.IssueTime">
<summary>
The time when the report is issued, in the time zone indicated by <see cref="P:Cryville.EEW.Report.ReportViewModel.TimeZone" />.
</summary>
</member>
<member name="P:Cryville.EEW.Report.ReportViewModel.UtcIssueTime">
<summary>
The time when the report is issued, in UTC.
@@ -1445,13 +1587,10 @@
The parent type.
</summary>
</member>
<member name="M:Cryville.EEW.Report.ReportViewModelPropertyType.#ctor(System.String,Cryville.EEW.Report.ReportViewModelPropertyType)">
<member name="P:Cryville.EEW.Report.ReportViewModelPropertyType.Root">
<summary>
Creates an instance of the <see cref="T:Cryville.EEW.Report.ReportViewModelPropertyType" /> class.
The root type.
</summary>
<param name="name">The name of the type.</param>
<param name="parent">The parent type.</param>
<exception cref="T:System.ArgumentException"><paramref name="name" /> contains the sub-type delimiter <c>:</c>.</exception>
</member>
<member name="M:Cryville.EEW.Report.ReportViewModelPropertyType.OfSubtype(System.String)">
<summary>
@@ -1463,6 +1602,14 @@
<member name="M:Cryville.EEW.Report.ReportViewModelPropertyType.ToString">
<inheritdoc/>
</member>
<member name="M:Cryville.EEW.Report.ReportViewModelPropertyType.Of(System.String,Cryville.EEW.Report.ReportViewModelPropertyType)">
<summary>
Gets an instance of the <see cref="T:Cryville.EEW.Report.ReportViewModelPropertyType" /> class.
</summary>
<param name="name">The name of the type.</param>
<param name="parent">The parent type.</param>
<exception cref="T:System.ArgumentException"><paramref name="name" /> contains the sub-type delimiter <c>:</c>.</exception>
</member>
<member name="M:Cryville.EEW.Report.ReportViewModelPropertyType.FromString(System.String)">
<summary>
Creates a report view model property type from a string.

View File

@@ -1,76 +0,0 @@
fileFormatVersion: 2
guid: 17df7db50754b8f459aa29934b507000
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 0
Exclude Win64: 0
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: x86_64
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 33ce0e71590119e4f803932e358b4593
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,102 @@
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
/// <summary>Marshals the COM <see langword="IEnumVARIANT" /> interface to the .NET Framework <see cref="T:System.Collections.IEnumerator" /> interface, and vice versa.</summary>
public class EnumeratorToEnumVariantMarshaler : ICustomMarshaler {
[ComImport]
[Guid("00020404-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
private interface IEnumVARIANT {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Next(int celt, [MarshalAs(UnmanagedType.Struct)] out object rgvar, out uint pceltFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Skip(uint celt);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Reset();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.Interface)]
IEnumVARIANT Clone();
}
private class VARIANTEnumerator : IEnumerator {
private IEnumVARIANT com_enum;
private object current;
public object Current => current;
public VARIANTEnumerator(IEnumVARIANT com_enum) {
this.com_enum = com_enum;
}
public bool MoveNext() {
uint pceltFetched = 0u;
com_enum.Next(1, out var rgvar, out pceltFetched);
if (pceltFetched == 0) {
return false;
}
current = rgvar;
return true;
}
public void Reset() {
com_enum.Reset();
}
}
private static EnumeratorToEnumVariantMarshaler instance;
/// <summary>Performs necessary cleanup of the managed data when it is no longer needed.</summary>
/// <param name="pManagedObj">The managed object to be destroyed.</param>
public void CleanUpManagedData(object pManagedObj) {
throw new NotImplementedException();
}
/// <summary>Performs necessary cleanup of the unmanaged data when it is no longer needed.</summary>
/// <param name="pNativeData">A pointer to the unmanaged data to be destroyed.</param>
public void CleanUpNativeData(IntPtr pNativeData) {
Marshal.Release(pNativeData);
}
/// <summary>Returns an instance of the custom marshaler.</summary>
/// <param name="pstrCookie">String "cookie" parameter that can be used by the custom marshaler.</param>
/// <returns>An instance of the custom marshaler.</returns>
public static ICustomMarshaler GetInstance(string pstrCookie) {
if (instance == null) {
instance = new EnumeratorToEnumVariantMarshaler();
}
return instance;
}
/// <summary>Returns the size in bytes of the unmanaged data to be marshaled.</summary>
/// <returns>-1 to indicate the type this marshaler handles is not a value type.</returns>
public int GetNativeDataSize() {
throw new NotImplementedException();
}
/// <summary>Marshals an object from managed code to unmanaged code.</summary>
/// <param name="pManagedObj">The managed object to be converted.</param>
/// <returns>A pointer to the unmanaged object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="pManagedObj" /> is <see langword="null" />.</exception>
public IntPtr MarshalManagedToNative(object pManagedObj) {
throw new NotImplementedException();
}
/// <summary>Marshals an object from unmanaged code to managed code.</summary>
/// <param name="pNativeData">A pointer to the unmanaged object to be converted.</param>
/// <returns>A managed object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="pNativeData" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidCastException">The unmanaged object that <paramref name="pNativeData" /> points to could not be converted.</exception>
public object MarshalNativeToManaged(IntPtr pNativeData) {
return new VARIANTEnumerator((IEnumVARIANT)Marshal.GetObjectForIUnknown(pNativeData));
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 57f24b2017eba4d4eb634cf86ae099af
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[InterfaceType(1)]
[Guid("06B64F9E-7FDA-11D2-B4F2-00C04F797396")]
[TypeLibType(512)]
public interface IEnumSpObjectTokens {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out ISpObjectToken pelt, out uint pceltFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Skip([In] uint celt);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Reset();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Clone([MarshalAs(UnmanagedType.Interface)] out SpMMAudioEnum ppEnum);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Item([In] uint Index, [MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetCount(out uint pCount);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b8d9b83debeb9c244a52757c270bd3ff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,47 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(512)]
[Guid("14056581-E16C-11D2-BB90-00C04F8EE6C0")]
[InterfaceType(1)]
public interface ISpDataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 53c599adb0888ca488c429446e094a6e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,41 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[InterfaceType(1)]
[Guid("BE7A9CCE-5F9E-11D2-960F-00C04F8EE628")]
[TypeLibType(512)]
public interface ISpEventSource : ISpNotifySource {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifySink([In][MarshalAs(UnmanagedType.Interface)] ISpNotifySink pNotifySink);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyWindowMessage([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWnd, [In] uint Msg, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyCallbackFunction([In] ref IntPtr pfnCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyCallbackInterface([In] ref IntPtr pSpCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyWin32Event();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void WaitForNotifyEvent([In] uint dwMilliseconds);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new IntPtr GetNotifyEventHandle();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetInterest([In] ulong ullEventInterest, [In] ulong ullQueuedInterest);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetEvents([In] uint ulCount, out SPEVENT pEventArray, out uint pulFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetInfo(out SPEVENTSOURCEINFO pInfo);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 956b9cc3f6ea4e848971f63146675fca
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(512)]
[Guid("259684DC-37C3-11D2-9603-00C04F8EE628")]
[InterfaceType(1)]
public interface ISpNotifySink {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Notify();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a8f6204837b45824b8513ceb242f9ec1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,32 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(512)]
[InterfaceType(1)]
[Guid("5EFF4AEF-8487-11D2-961C-00C04F8EE628")]
public interface ISpNotifySource {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifySink([In][MarshalAs(UnmanagedType.Interface)] ISpNotifySink pNotifySink);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifyWindowMessage([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWnd, [In] uint Msg, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifyCallbackFunction([In] ref IntPtr pfnCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifyCallbackInterface([In] ref IntPtr pSpCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifyWin32Event();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void WaitForNotifyEvent([In] uint dwMilliseconds);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
IntPtr GetNotifyEventHandle();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dc0e801e79d02c0419ef4ce756d894e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,77 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("14056589-E16C-11D2-BB90-00C04F8EE6C0")]
[TypeLibType(512)]
[InterfaceType(1)]
public interface ISpObjectToken : ISpDataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetId([MarshalAs(UnmanagedType.LPWStr)] string pszCategoryId, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTokenId, [In] int fCreateIfNotExist);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemTokenId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetCategory([MarshalAs(UnmanagedType.Interface)] out ISpObjectTokenCategory ppTokenCategory);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void CreateInstance([In][MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] uint dwClsContext, [In] ref Guid riid, out IntPtr ppvObject);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetStorageFileName([In] ref Guid clsidCaller, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszFileNameSpecifier, [In] uint nFolder, [MarshalAs(UnmanagedType.LPWStr)] out string ppszFilePath);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoveStorageFileName([In] ref Guid clsidCaller, [In][MarshalAs(UnmanagedType.LPWStr)] string pszKeyName, [In] int fDeleteFile);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Remove(ref Guid pclsidCaller);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void IsUISupported([In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, [In][MarshalAs(UnmanagedType.IUnknown)] object punkObject, out int pfSupported);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void DisplayUI([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWndParent, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTitle, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, [In][MarshalAs(UnmanagedType.IUnknown)] object punkObject);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void MatchesAttributes([In][MarshalAs(UnmanagedType.LPWStr)] string pszAttributes, out int pfMatches);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9dbe636fbecc6d246ac06f0111e1b644
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,65 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("2D3D3845-39AF-4850-BBF9-40B49780011D")]
[TypeLibType(512)]
[InterfaceType(1)]
public interface ISpObjectTokenCategory : ISpDataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetId([In][MarshalAs(UnmanagedType.LPWStr)] string pszCategoryId, [In] int fCreateIfNotExist);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemCategoryId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetDataKey([In] SPDATAKEYLOCATION spdkl, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppDataKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void EnumTokens([In][MarshalAs(UnmanagedType.LPWStr)] string pzsReqAttribs, [In][MarshalAs(UnmanagedType.LPWStr)] string pszOptAttribs, [MarshalAs(UnmanagedType.Interface)] out SpMMAudioEnum ppEnum);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetDefaultTokenId([In][MarshalAs(UnmanagedType.LPWStr)] string pszTokenId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetDefaultTokenId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemTokenId);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 15623e252a155a848a97cf37f60268e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(512)]
[InterfaceType(1)]
[Guid("B2745EFD-42CE-48CA-81F1-A96E02538A90")]
public interface ISpPhoneticAlphabetSelection {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void IsAlphabetUPS(out int pfIsUPS);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetAlphabetToUPS([In] int fForceUPS);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d029aee7bdb974547abcc71e4b1d5c0e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,49 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace SpeechLib {
[ComImport]
[ComConversionLoss]
[InterfaceType(1)]
[Guid("BED530BE-2606-4F4D-A1C0-54C5CDA5566F")]
[TypeLibType(512)]
public interface ISpStreamFormat : IStream {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoteRead(out byte pv, [In] uint cb, out uint pcbRead);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoteWrite([In] ref byte pv, [In] uint cb, out uint pcbWritten);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoteSeek([In] _LARGE_INTEGER dlibMove, [In] uint dwOrigin, out _ULARGE_INTEGER plibNewPosition);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetSize([In] _ULARGE_INTEGER libNewSize);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoteCopyTo([In][MarshalAs(UnmanagedType.Interface)] IStream pstm, [In] _ULARGE_INTEGER cb, out _ULARGE_INTEGER pcbRead, out _ULARGE_INTEGER pcbWritten);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Commit([In] uint grfCommitFlags);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Revert();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void LockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void UnlockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Stat(out tagSTATSTG pstatstg, [In] uint grfStatFlag);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Clone([MarshalAs(UnmanagedType.Interface)] out IStream ppstm);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetFormat([In] ref Guid pguidFormatId, [Out] IntPtr ppCoMemWaveFormatEx);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3757bf8ef8a3f324896a9d3712a52c0d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,117 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace SpeechLib {
[ComImport]
[InterfaceType(1)]
[Guid("6C44DF74-72B9-4992-A1EC-EF996E0422D4")]
[TypeLibType(512)]
public interface ISpVoice : ISpEventSource {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifySink([In][MarshalAs(UnmanagedType.Interface)] ISpNotifySink pNotifySink);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyWindowMessage([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWnd, [In] uint Msg, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyCallbackFunction([In] ref IntPtr pfnCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyCallbackInterface([In] ref IntPtr pSpCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyWin32Event();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void WaitForNotifyEvent([In] uint dwMilliseconds);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new IntPtr GetNotifyEventHandle();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetInterest([In] ulong ullEventInterest, [In] ulong ullQueuedInterest);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetEvents([In] uint ulCount, out SPEVENT pEventArray, out uint pulFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetInfo(out SPEVENTSOURCEINFO pInfo);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetOutput([In][MarshalAs(UnmanagedType.IUnknown)] object pUnkOutput, [In] int fAllowFormatChanges);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetOutputObjectToken([MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppObjectToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetOutputStream([MarshalAs(UnmanagedType.Interface)] out ISpStreamFormat ppStream);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Pause();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Resume();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetVoice([In][MarshalAs(UnmanagedType.Interface)] ISpObjectToken pToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetVoice([MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Speak([In][MarshalAs(UnmanagedType.LPWStr)] string pwcs, [In] uint dwFlags, out uint pulStreamNumber);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SpeakStream([In][MarshalAs(UnmanagedType.Interface)] IStream pStream, [In] uint dwFlags, out uint pulStreamNumber);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetStatus(out SPVOICESTATUS pStatus, [MarshalAs(UnmanagedType.LPWStr)] out string ppszLastBookmark);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Skip([In][MarshalAs(UnmanagedType.LPWStr)] string pItemType, [In] int lNumItems, out uint pulNumSkipped);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetPriority([In] SPVPRIORITY ePriority);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetPriority(out SPVPRIORITY pePriority);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetAlertBoundary([In] SPEVENTENUM eBoundary);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetAlertBoundary(out SPEVENTENUM peBoundary);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetRate([In] int RateAdjust);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetRate(out int pRateAdjust);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetVolume([In] ushort usVolume);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetVolume(out ushort pusVolume);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void WaitUntilDone([In] uint msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetSyncSpeakTimeout([In] uint msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetSyncSpeakTimeout(out uint pmsTimeout);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
IntPtr SpeakCompleteEvent();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void IsUISupported([In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, out int pfSupported);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void DisplayUI([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWndParent, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTitle, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 272a8c831aaf44a4d94da0a8f2f29199
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,47 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("E6E9C590-3E18-40E3-8299-061F98BDE7C7")]
public interface ISpeechAudioFormat {
[DispId(1)]
SpeechAudioFormatType Type {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
set;
}
[DispId(2)]
string Guid {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[TypeLibFunc(64)]
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.Interface)]
SpWaveFormatEx GetWaveFormatEx();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[TypeLibFunc(64)]
void SetWaveFormatEx([In][MarshalAs(UnmanagedType.Interface)] SpWaveFormatEx SpeechWaveFormatEx);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0121f963d2ad3124f93d8b901dea2ef2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("6450336F-7D49-4CED-8097-49D6DEE37294")]
public interface ISpeechBaseStream {
[DispId(1)]
SpAudioFormat Format {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
int Read([MarshalAs(UnmanagedType.Struct)] out object Buffer, [In] int NumberOfBytes);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
int Write([In][MarshalAs(UnmanagedType.Struct)] object Buffer);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.Struct)]
object Seek([In][MarshalAs(UnmanagedType.Struct)] object Position, [In] SpeechStreamSeekPositionType Origin = SpeechStreamSeekPositionType.SSSPTRelativeToStart);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b47a20305f9457d4a9178de9ed11508a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,64 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("CE17C09B-4EFA-44D5-A4C9-59D9585AB0CD")]
public interface ISpeechDataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
void SetBinaryValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName, [In][MarshalAs(UnmanagedType.Struct)] object Value);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.Struct)]
object GetBinaryValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
void SetStringValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName, [In][MarshalAs(UnmanagedType.BStr)] string Value);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.BStr)]
string GetStringValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
void SetLongValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName, [In] int Value);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
int GetLongValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechDataKey OpenKey([In][MarshalAs(UnmanagedType.BStr)] string SubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechDataKey CreateKey([In][MarshalAs(UnmanagedType.BStr)] string SubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
void DeleteKey([In][MarshalAs(UnmanagedType.BStr)] string SubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
void DeleteValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
[return: MarshalAs(UnmanagedType.BStr)]
string EnumKeys([In] int Index);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
[return: MarshalAs(UnmanagedType.BStr)]
string EnumValues([In] int Index);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 67d9e05beeee4594688ea5fff1341d30
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,85 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("C74A3ADC-B727-4500-A84A-B526721C8B8C")]
public interface ISpeechObjectToken {
[DispId(1)]
string Id {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(2)]
ISpeechDataKey DataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[DispId(3)]
SpObjectTokenCategory Category {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.BStr)]
string GetDescription([In] int Locale = 0);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[TypeLibFunc(64)]
void SetId([In][MarshalAs(UnmanagedType.BStr)] string Id, [In][MarshalAs(UnmanagedType.BStr)] string CategoryID = "", [In] bool CreateIfNotExist = false);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[return: MarshalAs(UnmanagedType.BStr)]
string GetAttribute([In][MarshalAs(UnmanagedType.BStr)] string AttributeName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.IUnknown)]
object CreateInstance([Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] SpeechTokenContext ClsContext = SpeechTokenContext.STCAll);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(8)]
void Remove([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(9)]
[return: MarshalAs(UnmanagedType.BStr)]
string GetStorageFileName([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID, [In][MarshalAs(UnmanagedType.BStr)] string KeyName, [In][MarshalAs(UnmanagedType.BStr)] string FileName, [In] SpeechTokenShellFolder Folder);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
[TypeLibFunc(64)]
void RemoveStorageFileName([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID, [In][MarshalAs(UnmanagedType.BStr)] string KeyName, [In] bool DeleteFile);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
[TypeLibFunc(64)]
bool IsUISupported([In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData, [Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object Object);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
[TypeLibFunc(64)]
void DisplayUI([In] int hWnd, [In][MarshalAs(UnmanagedType.BStr)] string Title, [In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData, [Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object Object);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(13)]
bool MatchesAttributes([In][MarshalAs(UnmanagedType.BStr)] string Attributes);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 84b08e94b540c8a40afbd504abc37d04
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,46 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("CA7EAC50-2D01-4145-86D4-5AE7D70F4469")]
[TypeLibType(4160)]
public interface ISpeechObjectTokenCategory {
[DispId(1)]
string Id {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(2)]
string Default {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
void SetId([In][MarshalAs(UnmanagedType.BStr)] string Id, [In] bool CreateIfNotExist = false);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechDataKey GetDataKey([In] SpeechDataKeyLocation Location = SpeechDataKeyLocation.SDKLDefaultLocation);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechObjectTokens EnumerateTokens([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a15899cbf650cfa42944fa16c069356b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[DefaultMember("Item")]
[TypeLibType(4160)]
[Guid("9285B776-2E7B-4BC0-B53E-580EB6FA967F")]
public interface ISpeechObjectTokens : IEnumerable {
[DispId(1)]
int Count {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(0)]
[return: MarshalAs(UnmanagedType.Interface)]
SpObjectToken Item([In] int Index);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(1)]
[DispId(-4)]
[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(EnumeratorToEnumVariantMarshaler))]
new IEnumerator GetEnumerator();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c5ce0623475562e41ac3b4d14e26e163
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,183 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("269316D8-57BD-11D2-9EEE-00C04F797396")]
[TypeLibType(4160)]
public interface ISpeechVoice {
[DispId(1)]
ISpeechVoiceStatus Status {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[DispId(2)]
SpObjectToken Voice {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(3)]
SpObjectToken AudioOutput {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(4)]
ISpeechBaseStream AudioOutputStream {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(5)]
int Rate {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[param: In]
set;
}
[DispId(6)]
int Volume {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[param: In]
set;
}
[DispId(7)]
bool AllowAudioOutputFormatChangesOnNextSet {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(7)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(7)]
[param: In]
set;
}
[DispId(8)]
SpeechVoiceEvents EventInterests {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
[param: In]
set;
}
[DispId(9)]
SpeechVoicePriority Priority {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
[param: In]
set;
}
[DispId(10)]
SpeechVoiceEvents AlertBoundary {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
[param: In]
set;
}
[DispId(11)]
int SynchronousSpeakTimeout {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
[param: In]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
int Speak([In][MarshalAs(UnmanagedType.BStr)] string Text, [In] SpeechVoiceSpeakFlags Flags = SpeechVoiceSpeakFlags.SVSFDefault);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(13)]
int SpeakStream([In][MarshalAs(UnmanagedType.Interface)] ISpeechBaseStream Stream, [In] SpeechVoiceSpeakFlags Flags = SpeechVoiceSpeakFlags.SVSFDefault);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(14)]
void Pause();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(15)]
void Resume();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(16)]
int Skip([In][MarshalAs(UnmanagedType.BStr)] string Type, [In] int NumItems);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(17)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechObjectTokens GetVoices([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(18)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechObjectTokens GetAudioOutputs([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(19)]
bool WaitUntilDone([In] int msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(20)]
nint SpeakCompleteEvent();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(21)]
bool IsUISupported([In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(22)]
void DisplayUI([In] int hWndParent, [In][MarshalAs(UnmanagedType.BStr)] string Title, [In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 15960ad47dd69ef478bdfa217dc3838c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,96 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("8BE47B07-57F6-11D2-9EEE-00C04F797396")]
[TypeLibType(4160)]
public interface ISpeechVoiceStatus {
[DispId(1)]
int CurrentStreamNumber {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
}
[DispId(2)]
int LastStreamNumberQueued {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
get;
}
[DispId(3)]
int LastHResult {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
get;
}
[DispId(4)]
SpeechRunState RunningState {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
get;
}
[DispId(5)]
int InputWordPosition {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
}
[DispId(6)]
int InputWordLength {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
}
[DispId(7)]
int InputSentencePosition {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
get;
}
[DispId(8)]
int InputSentenceLength {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
get;
}
[DispId(9)]
string LastBookmark {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(10)]
int LastBookmarkId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(10)]
get;
}
[DispId(11)]
short PhonemeId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
get;
}
[DispId(12)]
short VisemeId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
get;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 11c572347fde7834d928165b3d458190
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,89 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("7A1EF0D5-1581-4741-88E4-209A49F11A10")]
[TypeLibType(4160)]
public interface ISpeechWaveFormatEx {
[DispId(1)]
short FormatTag {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
set;
}
[DispId(2)]
short Channels {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
set;
}
[DispId(3)]
int SamplesPerSec {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[param: In]
set;
}
[DispId(4)]
int AvgBytesPerSec {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[param: In]
set;
}
[DispId(5)]
short BlockAlign {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[param: In]
set;
}
[DispId(6)]
short BitsPerSample {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[param: In]
set;
}
[DispId(7)]
object ExtraData {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.Struct)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[param: In]
[param: MarshalAs(UnmanagedType.Struct)]
set;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 16611605854765a4db58ea3fec7cb71e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
{
"name": "Interop.SpeechLib",
"rootNamespace": "",
"references": [],
"includePlatforms": [
"Editor",
"WindowsStandalone32",
"WindowsStandalone64"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": true
}

Some files were not shown because too many files have changed in this diff Show More