| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 library speech_recognizer_mojom; | 5 library speech_recognizer_mojom; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
| 8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
| 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 default: | 104 default: |
| 105 return null; | 105 return null; |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 int toJson() => mojoEnumValue; | 109 int toJson() => mojoEnumValue; |
| 110 } | 110 } |
| 111 | 111 |
| 112 | 112 |
| 113 | 113 |
| 114 | |
| 115 | |
| 116 class UtteranceCandidate extends bindings.Struct { | 114 class UtteranceCandidate extends bindings.Struct { |
| 117 static const List<bindings.StructDataHeader> kVersions = const [ | 115 static const List<bindings.StructDataHeader> kVersions = const [ |
| 118 const bindings.StructDataHeader(24, 0) | 116 const bindings.StructDataHeader(24, 0) |
| 119 ]; | 117 ]; |
| 120 String text = null; | 118 String text = null; |
| 121 double confidenceScore = 0.0; | 119 double confidenceScore = 0.0; |
| 122 | 120 |
| 123 UtteranceCandidate() : super(kVersions.last.size); | 121 UtteranceCandidate() : super(kVersions.last.size); |
| 124 | 122 |
| 125 static UtteranceCandidate deserialize(bindings.Message message) { | 123 static UtteranceCandidate deserialize(bindings.Message message) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 190 |
| 193 Map toJson() { | 191 Map toJson() { |
| 194 Map map = new Map(); | 192 Map map = new Map(); |
| 195 map["text"] = text; | 193 map["text"] = text; |
| 196 map["confidenceScore"] = confidenceScore; | 194 map["confidenceScore"] = confidenceScore; |
| 197 return map; | 195 return map; |
| 198 } | 196 } |
| 199 } | 197 } |
| 200 | 198 |
| 201 | 199 |
| 202 | |
| 203 | |
| 204 class _SpeechRecognizerServiceListenParams extends bindings.Struct { | 200 class _SpeechRecognizerServiceListenParams extends bindings.Struct { |
| 205 static const List<bindings.StructDataHeader> kVersions = const [ | 201 static const List<bindings.StructDataHeader> kVersions = const [ |
| 206 const bindings.StructDataHeader(8, 0) | 202 const bindings.StructDataHeader(8, 0) |
| 207 ]; | 203 ]; |
| 208 | 204 |
| 209 _SpeechRecognizerServiceListenParams() : super(kVersions.last.size); | 205 _SpeechRecognizerServiceListenParams() : super(kVersions.last.size); |
| 210 | 206 |
| 211 static _SpeechRecognizerServiceListenParams deserialize(bindings.Message messa
ge) { | 207 static _SpeechRecognizerServiceListenParams deserialize(bindings.Message messa
ge) { |
| 212 var decoder = new bindings.Decoder(message); | 208 var decoder = new bindings.Decoder(message); |
| 213 var result = decode(decoder); | 209 var result = decode(decoder); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 return "_SpeechRecognizerServiceListenParams("")"; | 248 return "_SpeechRecognizerServiceListenParams("")"; |
| 253 } | 249 } |
| 254 | 250 |
| 255 Map toJson() { | 251 Map toJson() { |
| 256 Map map = new Map(); | 252 Map map = new Map(); |
| 257 return map; | 253 return map; |
| 258 } | 254 } |
| 259 } | 255 } |
| 260 | 256 |
| 261 | 257 |
| 262 | |
| 263 | |
| 264 class SpeechRecognizerServiceListenResponseParams extends bindings.Struct { | 258 class SpeechRecognizerServiceListenResponseParams extends bindings.Struct { |
| 265 static const List<bindings.StructDataHeader> kVersions = const [ | 259 static const List<bindings.StructDataHeader> kVersions = const [ |
| 266 const bindings.StructDataHeader(24, 0) | 260 const bindings.StructDataHeader(24, 0) |
| 267 ]; | 261 ]; |
| 268 ResultOrError resultOrError = null; | 262 ResultOrError resultOrError = null; |
| 269 | 263 |
| 270 SpeechRecognizerServiceListenResponseParams() : super(kVersions.last.size); | 264 SpeechRecognizerServiceListenResponseParams() : super(kVersions.last.size); |
| 271 | 265 |
| 272 static SpeechRecognizerServiceListenResponseParams deserialize(bindings.Messag
e message) { | 266 static SpeechRecognizerServiceListenResponseParams deserialize(bindings.Messag
e message) { |
| 273 var decoder = new bindings.Decoder(message); | 267 var decoder = new bindings.Decoder(message); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 } | 324 } |
| 331 | 325 |
| 332 Map toJson() { | 326 Map toJson() { |
| 333 Map map = new Map(); | 327 Map map = new Map(); |
| 334 map["resultOrError"] = resultOrError; | 328 map["resultOrError"] = resultOrError; |
| 335 return map; | 329 return map; |
| 336 } | 330 } |
| 337 } | 331 } |
| 338 | 332 |
| 339 | 333 |
| 340 | |
| 341 | |
| 342 class _SpeechRecognizerServiceStopListeningParams extends bindings.Struct { | 334 class _SpeechRecognizerServiceStopListeningParams extends bindings.Struct { |
| 343 static const List<bindings.StructDataHeader> kVersions = const [ | 335 static const List<bindings.StructDataHeader> kVersions = const [ |
| 344 const bindings.StructDataHeader(8, 0) | 336 const bindings.StructDataHeader(8, 0) |
| 345 ]; | 337 ]; |
| 346 | 338 |
| 347 _SpeechRecognizerServiceStopListeningParams() : super(kVersions.last.size); | 339 _SpeechRecognizerServiceStopListeningParams() : super(kVersions.last.size); |
| 348 | 340 |
| 349 static _SpeechRecognizerServiceStopListeningParams deserialize(bindings.Messag
e message) { | 341 static _SpeechRecognizerServiceStopListeningParams deserialize(bindings.Messag
e message) { |
| 350 var decoder = new bindings.Decoder(message); | 342 var decoder = new bindings.Decoder(message); |
| 351 var result = decode(decoder); | 343 var result = decode(decoder); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 383 } |
| 392 | 384 |
| 393 Map toJson() { | 385 Map toJson() { |
| 394 Map map = new Map(); | 386 Map map = new Map(); |
| 395 return map; | 387 return map; |
| 396 } | 388 } |
| 397 } | 389 } |
| 398 | 390 |
| 399 | 391 |
| 400 | 392 |
| 401 | |
| 402 | |
| 403 enum ResultOrErrorTag { | 393 enum ResultOrErrorTag { |
| 404 errorCode, | 394 errorCode, |
| 405 results, | 395 results, |
| 406 unknown | 396 unknown |
| 407 } | 397 } |
| 408 | 398 |
| 409 class ResultOrError extends bindings.Union { | 399 class ResultOrError extends bindings.Union { |
| 410 static final _tag_to_int = const { | 400 static final _tag_to_int = const { |
| 411 ResultOrErrorTag.errorCode: 0, | 401 ResultOrErrorTag.errorCode: 0, |
| 412 ResultOrErrorTag.results: 1, | 402 ResultOrErrorTag.results: 1, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 case ResultOrErrorTag.results: | 504 case ResultOrErrorTag.results: |
| 515 result += "results"; | 505 result += "results"; |
| 516 break; | 506 break; |
| 517 default: | 507 default: |
| 518 result += "unknown"; | 508 result += "unknown"; |
| 519 } | 509 } |
| 520 result += ": $_data)"; | 510 result += ": $_data)"; |
| 521 return result; | 511 return result; |
| 522 } | 512 } |
| 523 } | 513 } |
| 524 | |
| 525 | |
| 526 | |
| 527 const int _SpeechRecognizerService_listenName = 0; | 514 const int _SpeechRecognizerService_listenName = 0; |
| 528 const int _SpeechRecognizerService_stopListeningName = 1; | 515 const int _SpeechRecognizerService_stopListeningName = 1; |
| 529 | 516 |
| 530 | |
| 531 | |
| 532 class _SpeechRecognizerServiceServiceDescription implements service_describer.Se
rviceDescription { | 517 class _SpeechRecognizerServiceServiceDescription implements service_describer.Se
rviceDescription { |
| 533 dynamic getTopLevelInterface([Function responseFactory]) => | 518 dynamic getTopLevelInterface([Function responseFactory]) => |
| 534 responseFactory(null); | 519 responseFactory(null); |
| 535 | 520 |
| 536 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 521 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 537 responseFactory(null); | 522 responseFactory(null); |
| 538 | 523 |
| 539 dynamic getAllTypeDefinitions([Function responseFactory]) => | 524 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 540 responseFactory(null); | 525 responseFactory(null); |
| 541 } | 526 } |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 static service_describer.ServiceDescription get serviceDescription { | 748 static service_describer.ServiceDescription get serviceDescription { |
| 764 if (_cachedServiceDescription == null) { | 749 if (_cachedServiceDescription == null) { |
| 765 _cachedServiceDescription = new _SpeechRecognizerServiceServiceDescription
(); | 750 _cachedServiceDescription = new _SpeechRecognizerServiceServiceDescription
(); |
| 766 } | 751 } |
| 767 return _cachedServiceDescription; | 752 return _cachedServiceDescription; |
| 768 } | 753 } |
| 769 } | 754 } |
| 770 | 755 |
| 771 | 756 |
| 772 | 757 |
| OLD | NEW |