Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_interfaces.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 sample_interfaces_mojom; 5 library sample_interfaces_mojom;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection';
8 9
9 import 'package:mojo/bindings.dart' as bindings; 10 import 'package:mojo/bindings.dart' as bindings;
10 import 'package:mojo/core.dart' as core; 11 import 'package:mojo/core.dart' as core;
12 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
13 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
11 const int kLong = 4405; 14 const int kLong = 4405;
12 15
13 class Enum extends bindings.MojoEnum { 16 class Enum extends bindings.MojoEnum {
14 static const Enum value = const Enum._(0); 17 static const Enum value = const Enum._(0);
15 18
16 const Enum._(int v) : super(v); 19 const Enum._(int v) : super(v);
17 20
18 static const Map<String, Enum> valuesMap = const { 21 static const Map<String, Enum> valuesMap = const {
19 "value": value, 22 "value": value,
20 }; 23 };
(...skipping 19 matching lines...) Expand all
40 throw new bindings.MojoCodecError( 43 throw new bindings.MojoCodecError(
41 'Bad value $v for enum Enum.'); 44 'Bad value $v for enum Enum.');
42 } 45 }
43 return result; 46 return result;
44 } 47 }
45 48
46 String toString() { 49 String toString() {
47 switch(this) { 50 switch(this) {
48 case value: 51 case value:
49 return 'Enum.value'; 52 return 'Enum.value';
53 default:
54 return null;
50 } 55 }
51 } 56 }
52 57
53 int toJson() => mojoEnumValue; 58 int toJson() => mojoEnumValue;
54 } 59 }
55 60
61 mojom_types.MojomEnum _sampleInterfacesEnum() {
62 return new mojom_types.MojomEnum()
63 ..declData = (new mojom_types.DeclarationData()
64 ..shortName = 'Enum'
65 ..fullIdentifier = 'sample.Enum')
66 ..values = <mojom_types.EnumValue>[
67 new mojom_types.EnumValue()
68 ..declData = (new mojom_types.DeclarationData()
69 ..shortName = 'Value')
70 ..enumTypeKey = 'sample_interfaces_Enum__'
71 ..intValue = 0,];
72 }
73
56 74
57 75
58 class _ProviderEchoStringParams extends bindings.Struct { 76 class _ProviderEchoStringParams extends bindings.Struct {
59 static const List<bindings.StructDataHeader> kVersions = const [ 77 static const List<bindings.StructDataHeader> kVersions = const [
60 const bindings.StructDataHeader(16, 0) 78 const bindings.StructDataHeader(16, 0)
61 ]; 79 ];
62 String a = null; 80 String a = null;
63 81
64 _ProviderEchoStringParams() : super(kVersions.last.size); 82 _ProviderEchoStringParams() : super(kVersions.last.size);
65 83
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 "a: $a" ")"; 132 "a: $a" ")";
115 } 133 }
116 134
117 Map toJson() { 135 Map toJson() {
118 Map map = new Map(); 136 Map map = new Map();
119 map["a"] = a; 137 map["a"] = a;
120 return map; 138 return map;
121 } 139 }
122 } 140 }
123 141
142 mojom_types.MojomStruct _sampleInterfacesProviderEchoStringParams() {
143 return new mojom_types.MojomStruct()
144 ..declData = (new mojom_types.DeclarationData()
145 ..shortName = 'ProviderEchoStringParams'
146 ..fullIdentifier = 'sample.Provider_EchoString_Params')
147 ..fields = <mojom_types.StructField>[
148 new mojom_types.StructField()
149 ..declData = (new mojom_types.DeclarationData()
150 ..shortName = 'A')
151 ..type = (new mojom_types.Type()
152 ..stringType = (new mojom_types.StringType())),];
153 }
154
124 155
125 class ProviderEchoStringResponseParams extends bindings.Struct { 156 class ProviderEchoStringResponseParams extends bindings.Struct {
126 static const List<bindings.StructDataHeader> kVersions = const [ 157 static const List<bindings.StructDataHeader> kVersions = const [
127 const bindings.StructDataHeader(16, 0) 158 const bindings.StructDataHeader(16, 0)
128 ]; 159 ];
129 String a = null; 160 String a = null;
130 161
131 ProviderEchoStringResponseParams() : super(kVersions.last.size); 162 ProviderEchoStringResponseParams() : super(kVersions.last.size);
132 163
133 static ProviderEchoStringResponseParams deserialize(bindings.Message message) { 164 static ProviderEchoStringResponseParams deserialize(bindings.Message message) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 "a: $a" ")"; 212 "a: $a" ")";
182 } 213 }
183 214
184 Map toJson() { 215 Map toJson() {
185 Map map = new Map(); 216 Map map = new Map();
186 map["a"] = a; 217 map["a"] = a;
187 return map; 218 return map;
188 } 219 }
189 } 220 }
190 221
222 mojom_types.MojomStruct _sampleInterfacesProviderEchoStringResponseParams() {
223 return new mojom_types.MojomStruct()
224 ..declData = (new mojom_types.DeclarationData()
225 ..shortName = 'ProviderEchoStringResponseParams'
226 ..fullIdentifier = 'sample.Provider_EchoString_ResponseParams')
227 ..fields = <mojom_types.StructField>[
228 new mojom_types.StructField()
229 ..declData = (new mojom_types.DeclarationData()
230 ..shortName = 'A')
231 ..type = (new mojom_types.Type()
232 ..stringType = (new mojom_types.StringType())),];
233 }
234
191 235
192 class _ProviderEchoStringsParams extends bindings.Struct { 236 class _ProviderEchoStringsParams extends bindings.Struct {
193 static const List<bindings.StructDataHeader> kVersions = const [ 237 static const List<bindings.StructDataHeader> kVersions = const [
194 const bindings.StructDataHeader(24, 0) 238 const bindings.StructDataHeader(24, 0)
195 ]; 239 ];
196 String a = null; 240 String a = null;
197 String b = null; 241 String b = null;
198 242
199 _ProviderEchoStringsParams() : super(kVersions.last.size); 243 _ProviderEchoStringsParams() : super(kVersions.last.size);
200 244
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 301 }
258 302
259 Map toJson() { 303 Map toJson() {
260 Map map = new Map(); 304 Map map = new Map();
261 map["a"] = a; 305 map["a"] = a;
262 map["b"] = b; 306 map["b"] = b;
263 return map; 307 return map;
264 } 308 }
265 } 309 }
266 310
311 mojom_types.MojomStruct _sampleInterfacesProviderEchoStringsParams() {
312 return new mojom_types.MojomStruct()
313 ..declData = (new mojom_types.DeclarationData()
314 ..shortName = 'ProviderEchoStringsParams'
315 ..fullIdentifier = 'sample.Provider_EchoStrings_Params')
316 ..fields = <mojom_types.StructField>[
317 new mojom_types.StructField()
318 ..declData = (new mojom_types.DeclarationData()
319 ..shortName = 'A')
320 ..type = (new mojom_types.Type()
321 ..stringType = (new mojom_types.StringType())),
322 new mojom_types.StructField()
323 ..declData = (new mojom_types.DeclarationData()
324 ..shortName = 'B')
325 ..type = (new mojom_types.Type()
326 ..stringType = (new mojom_types.StringType())),];
327 }
328
267 329
268 class ProviderEchoStringsResponseParams extends bindings.Struct { 330 class ProviderEchoStringsResponseParams extends bindings.Struct {
269 static const List<bindings.StructDataHeader> kVersions = const [ 331 static const List<bindings.StructDataHeader> kVersions = const [
270 const bindings.StructDataHeader(24, 0) 332 const bindings.StructDataHeader(24, 0)
271 ]; 333 ];
272 String a = null; 334 String a = null;
273 String b = null; 335 String b = null;
274 336
275 ProviderEchoStringsResponseParams() : super(kVersions.last.size); 337 ProviderEchoStringsResponseParams() : super(kVersions.last.size);
276 338
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 395 }
334 396
335 Map toJson() { 397 Map toJson() {
336 Map map = new Map(); 398 Map map = new Map();
337 map["a"] = a; 399 map["a"] = a;
338 map["b"] = b; 400 map["b"] = b;
339 return map; 401 return map;
340 } 402 }
341 } 403 }
342 404
405 mojom_types.MojomStruct _sampleInterfacesProviderEchoStringsResponseParams() {
406 return new mojom_types.MojomStruct()
407 ..declData = (new mojom_types.DeclarationData()
408 ..shortName = 'ProviderEchoStringsResponseParams'
409 ..fullIdentifier = 'sample.Provider_EchoStrings_ResponseParams')
410 ..fields = <mojom_types.StructField>[
411 new mojom_types.StructField()
412 ..declData = (new mojom_types.DeclarationData()
413 ..shortName = 'A')
414 ..type = (new mojom_types.Type()
415 ..stringType = (new mojom_types.StringType())),
416 new mojom_types.StructField()
417 ..declData = (new mojom_types.DeclarationData()
418 ..shortName = 'B')
419 ..type = (new mojom_types.Type()
420 ..stringType = (new mojom_types.StringType())),];
421 }
422
343 423
344 class _ProviderEchoMessagePipeHandleParams extends bindings.Struct { 424 class _ProviderEchoMessagePipeHandleParams extends bindings.Struct {
345 static const List<bindings.StructDataHeader> kVersions = const [ 425 static const List<bindings.StructDataHeader> kVersions = const [
346 const bindings.StructDataHeader(16, 0) 426 const bindings.StructDataHeader(16, 0)
347 ]; 427 ];
348 core.MojoMessagePipeEndpoint a = null; 428 core.MojoMessagePipeEndpoint a = null;
349 429
350 _ProviderEchoMessagePipeHandleParams() : super(kVersions.last.size); 430 _ProviderEchoMessagePipeHandleParams() : super(kVersions.last.size);
351 431
352 static _ProviderEchoMessagePipeHandleParams deserialize(bindings.Message messa ge) { 432 static _ProviderEchoMessagePipeHandleParams deserialize(bindings.Message messa ge) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 return "_ProviderEchoMessagePipeHandleParams(" 479 return "_ProviderEchoMessagePipeHandleParams("
400 "a: $a" ")"; 480 "a: $a" ")";
401 } 481 }
402 482
403 Map toJson() { 483 Map toJson() {
404 throw new bindings.MojoCodecError( 484 throw new bindings.MojoCodecError(
405 'Object containing handles cannot be encoded to JSON.'); 485 'Object containing handles cannot be encoded to JSON.');
406 } 486 }
407 } 487 }
408 488
489 mojom_types.MojomStruct _sampleInterfacesProviderEchoMessagePipeHandleParams() {
490 return new mojom_types.MojomStruct()
491 ..declData = (new mojom_types.DeclarationData()
492 ..shortName = 'ProviderEchoMessagePipeHandleParams'
493 ..fullIdentifier = 'sample.Provider_EchoMessagePipeHandle_Params')
494 ..fields = <mojom_types.StructField>[
495 new mojom_types.StructField()
496 ..declData = (new mojom_types.DeclarationData()
497 ..shortName = 'A')
498 ..type = (new mojom_types.Type()
499 ..handleType = (new mojom_types.HandleType()
500 ..kind = mojom_types.HandleTypeKind.messagePipe)),];
501 }
502
409 503
410 class ProviderEchoMessagePipeHandleResponseParams extends bindings.Struct { 504 class ProviderEchoMessagePipeHandleResponseParams extends bindings.Struct {
411 static const List<bindings.StructDataHeader> kVersions = const [ 505 static const List<bindings.StructDataHeader> kVersions = const [
412 const bindings.StructDataHeader(16, 0) 506 const bindings.StructDataHeader(16, 0)
413 ]; 507 ];
414 core.MojoMessagePipeEndpoint a = null; 508 core.MojoMessagePipeEndpoint a = null;
415 509
416 ProviderEchoMessagePipeHandleResponseParams() : super(kVersions.last.size); 510 ProviderEchoMessagePipeHandleResponseParams() : super(kVersions.last.size);
417 511
418 static ProviderEchoMessagePipeHandleResponseParams deserialize(bindings.Messag e message) { 512 static ProviderEchoMessagePipeHandleResponseParams deserialize(bindings.Messag e message) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 return "ProviderEchoMessagePipeHandleResponseParams(" 559 return "ProviderEchoMessagePipeHandleResponseParams("
466 "a: $a" ")"; 560 "a: $a" ")";
467 } 561 }
468 562
469 Map toJson() { 563 Map toJson() {
470 throw new bindings.MojoCodecError( 564 throw new bindings.MojoCodecError(
471 'Object containing handles cannot be encoded to JSON.'); 565 'Object containing handles cannot be encoded to JSON.');
472 } 566 }
473 } 567 }
474 568
569 mojom_types.MojomStruct _sampleInterfacesProviderEchoMessagePipeHandleResponsePa rams() {
570 return new mojom_types.MojomStruct()
571 ..declData = (new mojom_types.DeclarationData()
572 ..shortName = 'ProviderEchoMessagePipeHandleResponseParams'
573 ..fullIdentifier = 'sample.Provider_EchoMessagePipeHandle_ResponseParams')
574 ..fields = <mojom_types.StructField>[
575 new mojom_types.StructField()
576 ..declData = (new mojom_types.DeclarationData()
577 ..shortName = 'A')
578 ..type = (new mojom_types.Type()
579 ..handleType = (new mojom_types.HandleType()
580 ..kind = mojom_types.HandleTypeKind.messagePipe)),];
581 }
582
475 583
476 class _ProviderEchoEnumParams extends bindings.Struct { 584 class _ProviderEchoEnumParams extends bindings.Struct {
477 static const List<bindings.StructDataHeader> kVersions = const [ 585 static const List<bindings.StructDataHeader> kVersions = const [
478 const bindings.StructDataHeader(16, 0) 586 const bindings.StructDataHeader(16, 0)
479 ]; 587 ];
480 Enum a = null; 588 Enum a = null;
481 589
482 _ProviderEchoEnumParams() : super(kVersions.last.size); 590 _ProviderEchoEnumParams() : super(kVersions.last.size);
483 591
484 static _ProviderEchoEnumParams deserialize(bindings.Message message) { 592 static _ProviderEchoEnumParams deserialize(bindings.Message message) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 "a: $a" ")"; 644 "a: $a" ")";
537 } 645 }
538 646
539 Map toJson() { 647 Map toJson() {
540 Map map = new Map(); 648 Map map = new Map();
541 map["a"] = a; 649 map["a"] = a;
542 return map; 650 return map;
543 } 651 }
544 } 652 }
545 653
654 mojom_types.MojomStruct _sampleInterfacesProviderEchoEnumParams() {
655 return new mojom_types.MojomStruct()
656 ..declData = (new mojom_types.DeclarationData()
657 ..shortName = 'ProviderEchoEnumParams'
658 ..fullIdentifier = 'sample.Provider_EchoEnum_Params')
659 ..fields = <mojom_types.StructField>[
660 new mojom_types.StructField()
661 ..declData = (new mojom_types.DeclarationData()
662 ..shortName = 'A')
663 ..type = (new mojom_types.Type()
664 ..typeReference = (new mojom_types.TypeReference()
665 ..identifier = 'sample_interfaces_Enum__'
666 ..typeKey = 'sample_interfaces_Enum__'
667 )),];
668 }
669
546 670
547 class ProviderEchoEnumResponseParams extends bindings.Struct { 671 class ProviderEchoEnumResponseParams extends bindings.Struct {
548 static const List<bindings.StructDataHeader> kVersions = const [ 672 static const List<bindings.StructDataHeader> kVersions = const [
549 const bindings.StructDataHeader(16, 0) 673 const bindings.StructDataHeader(16, 0)
550 ]; 674 ];
551 Enum a = null; 675 Enum a = null;
552 676
553 ProviderEchoEnumResponseParams() : super(kVersions.last.size); 677 ProviderEchoEnumResponseParams() : super(kVersions.last.size);
554 678
555 static ProviderEchoEnumResponseParams deserialize(bindings.Message message) { 679 static ProviderEchoEnumResponseParams deserialize(bindings.Message message) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 "a: $a" ")"; 731 "a: $a" ")";
608 } 732 }
609 733
610 Map toJson() { 734 Map toJson() {
611 Map map = new Map(); 735 Map map = new Map();
612 map["a"] = a; 736 map["a"] = a;
613 return map; 737 return map;
614 } 738 }
615 } 739 }
616 740
741 mojom_types.MojomStruct _sampleInterfacesProviderEchoEnumResponseParams() {
742 return new mojom_types.MojomStruct()
743 ..declData = (new mojom_types.DeclarationData()
744 ..shortName = 'ProviderEchoEnumResponseParams'
745 ..fullIdentifier = 'sample.Provider_EchoEnum_ResponseParams')
746 ..fields = <mojom_types.StructField>[
747 new mojom_types.StructField()
748 ..declData = (new mojom_types.DeclarationData()
749 ..shortName = 'A')
750 ..type = (new mojom_types.Type()
751 ..typeReference = (new mojom_types.TypeReference()
752 ..identifier = 'sample_interfaces_Enum__'
753 ..typeKey = 'sample_interfaces_Enum__'
754 )),];
755 }
756
617 757
618 class _ProviderEchoIntParams extends bindings.Struct { 758 class _ProviderEchoIntParams extends bindings.Struct {
619 static const List<bindings.StructDataHeader> kVersions = const [ 759 static const List<bindings.StructDataHeader> kVersions = const [
620 const bindings.StructDataHeader(16, 0) 760 const bindings.StructDataHeader(16, 0)
621 ]; 761 ];
622 int a = 0; 762 int a = 0;
623 763
624 _ProviderEchoIntParams() : super(kVersions.last.size); 764 _ProviderEchoIntParams() : super(kVersions.last.size);
625 765
626 static _ProviderEchoIntParams deserialize(bindings.Message message) { 766 static _ProviderEchoIntParams deserialize(bindings.Message message) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 "a: $a" ")"; 814 "a: $a" ")";
675 } 815 }
676 816
677 Map toJson() { 817 Map toJson() {
678 Map map = new Map(); 818 Map map = new Map();
679 map["a"] = a; 819 map["a"] = a;
680 return map; 820 return map;
681 } 821 }
682 } 822 }
683 823
824 mojom_types.MojomStruct _sampleInterfacesProviderEchoIntParams() {
825 return new mojom_types.MojomStruct()
826 ..declData = (new mojom_types.DeclarationData()
827 ..shortName = 'ProviderEchoIntParams'
828 ..fullIdentifier = 'sample.Provider_EchoInt_Params')
829 ..fields = <mojom_types.StructField>[
830 new mojom_types.StructField()
831 ..declData = (new mojom_types.DeclarationData()
832 ..shortName = 'A')
833 ..type = (new mojom_types.Type()
834 ..simpleType = mojom_types.SimpleType.int32),];
835 }
836
684 837
685 class ProviderEchoIntResponseParams extends bindings.Struct { 838 class ProviderEchoIntResponseParams extends bindings.Struct {
686 static const List<bindings.StructDataHeader> kVersions = const [ 839 static const List<bindings.StructDataHeader> kVersions = const [
687 const bindings.StructDataHeader(16, 0) 840 const bindings.StructDataHeader(16, 0)
688 ]; 841 ];
689 int a = 0; 842 int a = 0;
690 843
691 ProviderEchoIntResponseParams() : super(kVersions.last.size); 844 ProviderEchoIntResponseParams() : super(kVersions.last.size);
692 845
693 static ProviderEchoIntResponseParams deserialize(bindings.Message message) { 846 static ProviderEchoIntResponseParams deserialize(bindings.Message message) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 "a: $a" ")"; 894 "a: $a" ")";
742 } 895 }
743 896
744 Map toJson() { 897 Map toJson() {
745 Map map = new Map(); 898 Map map = new Map();
746 map["a"] = a; 899 map["a"] = a;
747 return map; 900 return map;
748 } 901 }
749 } 902 }
750 903
904 mojom_types.MojomStruct _sampleInterfacesProviderEchoIntResponseParams() {
905 return new mojom_types.MojomStruct()
906 ..declData = (new mojom_types.DeclarationData()
907 ..shortName = 'ProviderEchoIntResponseParams'
908 ..fullIdentifier = 'sample.Provider_EchoInt_ResponseParams')
909 ..fields = <mojom_types.StructField>[
910 new mojom_types.StructField()
911 ..declData = (new mojom_types.DeclarationData()
912 ..shortName = 'A')
913 ..type = (new mojom_types.Type()
914 ..simpleType = mojom_types.SimpleType.int32),];
915 }
916
751 917
752 class _IntegerAccessorGetIntegerParams extends bindings.Struct { 918 class _IntegerAccessorGetIntegerParams extends bindings.Struct {
753 static const List<bindings.StructDataHeader> kVersions = const [ 919 static const List<bindings.StructDataHeader> kVersions = const [
754 const bindings.StructDataHeader(8, 0) 920 const bindings.StructDataHeader(8, 0)
755 ]; 921 ];
756 922
757 _IntegerAccessorGetIntegerParams() : super(kVersions.last.size); 923 _IntegerAccessorGetIntegerParams() : super(kVersions.last.size);
758 924
759 static _IntegerAccessorGetIntegerParams deserialize(bindings.Message message) { 925 static _IntegerAccessorGetIntegerParams deserialize(bindings.Message message) {
760 var decoder = new bindings.Decoder(message); 926 var decoder = new bindings.Decoder(message);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 String toString() { 965 String toString() {
800 return "_IntegerAccessorGetIntegerParams("")"; 966 return "_IntegerAccessorGetIntegerParams("")";
801 } 967 }
802 968
803 Map toJson() { 969 Map toJson() {
804 Map map = new Map(); 970 Map map = new Map();
805 return map; 971 return map;
806 } 972 }
807 } 973 }
808 974
975 mojom_types.MojomStruct _sampleInterfacesIntegerAccessorGetIntegerParams() {
976 return new mojom_types.MojomStruct()
977 ..declData = (new mojom_types.DeclarationData()
978 ..shortName = 'IntegerAccessorGetIntegerParams'
979 ..fullIdentifier = 'sample.IntegerAccessor_GetInteger_Params')
980 ..fields = <mojom_types.StructField>[];
981 }
982
809 983
810 class IntegerAccessorGetIntegerResponseParams extends bindings.Struct { 984 class IntegerAccessorGetIntegerResponseParams extends bindings.Struct {
811 static const List<bindings.StructDataHeader> kVersions = const [ 985 static const List<bindings.StructDataHeader> kVersions = const [
812 const bindings.StructDataHeader(16, 0), 986 const bindings.StructDataHeader(16, 0),
813 const bindings.StructDataHeader(24, 2) 987 const bindings.StructDataHeader(24, 2)
814 ]; 988 ];
815 int data = 0; 989 int data = 0;
816 Enum type = null; 990 Enum type = null;
817 991
818 IntegerAccessorGetIntegerResponseParams() : super(kVersions.last.size); 992 IntegerAccessorGetIntegerResponseParams() : super(kVersions.last.size);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 } 1054 }
881 1055
882 Map toJson() { 1056 Map toJson() {
883 Map map = new Map(); 1057 Map map = new Map();
884 map["data"] = data; 1058 map["data"] = data;
885 map["type"] = type; 1059 map["type"] = type;
886 return map; 1060 return map;
887 } 1061 }
888 } 1062 }
889 1063
1064 mojom_types.MojomStruct _sampleInterfacesIntegerAccessorGetIntegerResponseParams () {
1065 return new mojom_types.MojomStruct()
1066 ..declData = (new mojom_types.DeclarationData()
1067 ..shortName = 'IntegerAccessorGetIntegerResponseParams'
1068 ..fullIdentifier = 'sample.IntegerAccessor_GetInteger_ResponseParams')
1069 ..fields = <mojom_types.StructField>[
1070 new mojom_types.StructField()
1071 ..declData = (new mojom_types.DeclarationData()
1072 ..shortName = 'Data')
1073 ..type = (new mojom_types.Type()
1074 ..simpleType = mojom_types.SimpleType.int64),
1075 new mojom_types.StructField()
1076 ..declData = (new mojom_types.DeclarationData()
1077 ..shortName = 'Type')
1078 ..type = (new mojom_types.Type()
1079 ..typeReference = (new mojom_types.TypeReference()
1080 ..identifier = 'sample_interfaces_Enum__'
1081 ..typeKey = 'sample_interfaces_Enum__'
1082 )),];
1083 }
1084
890 1085
891 class _IntegerAccessorSetIntegerParams extends bindings.Struct { 1086 class _IntegerAccessorSetIntegerParams extends bindings.Struct {
892 static const List<bindings.StructDataHeader> kVersions = const [ 1087 static const List<bindings.StructDataHeader> kVersions = const [
893 const bindings.StructDataHeader(16, 0), 1088 const bindings.StructDataHeader(16, 0),
894 const bindings.StructDataHeader(24, 3) 1089 const bindings.StructDataHeader(24, 3)
895 ]; 1090 ];
896 int data = 0; 1091 int data = 0;
897 Enum type = null; 1092 Enum type = null;
898 1093
899 _IntegerAccessorSetIntegerParams() : super(kVersions.last.size); 1094 _IntegerAccessorSetIntegerParams() : super(kVersions.last.size);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 } 1156 }
962 1157
963 Map toJson() { 1158 Map toJson() {
964 Map map = new Map(); 1159 Map map = new Map();
965 map["data"] = data; 1160 map["data"] = data;
966 map["type"] = type; 1161 map["type"] = type;
967 return map; 1162 return map;
968 } 1163 }
969 } 1164 }
970 1165
1166 mojom_types.MojomStruct _sampleInterfacesIntegerAccessorSetIntegerParams() {
1167 return new mojom_types.MojomStruct()
1168 ..declData = (new mojom_types.DeclarationData()
1169 ..shortName = 'IntegerAccessorSetIntegerParams'
1170 ..fullIdentifier = 'sample.IntegerAccessor_SetInteger_Params')
1171 ..fields = <mojom_types.StructField>[
1172 new mojom_types.StructField()
1173 ..declData = (new mojom_types.DeclarationData()
1174 ..shortName = 'Data')
1175 ..type = (new mojom_types.Type()
1176 ..simpleType = mojom_types.SimpleType.int64),
1177 new mojom_types.StructField()
1178 ..declData = (new mojom_types.DeclarationData()
1179 ..shortName = 'Type')
1180 ..type = (new mojom_types.Type()
1181 ..typeReference = (new mojom_types.TypeReference()
1182 ..identifier = 'sample_interfaces_Enum__'
1183 ..typeKey = 'sample_interfaces_Enum__'
1184 )),];
1185 }
1186
971 1187
972 class _SampleInterfaceSampleMethod0Params extends bindings.Struct { 1188 class _SampleInterfaceSampleMethod0Params extends bindings.Struct {
973 static const List<bindings.StructDataHeader> kVersions = const [ 1189 static const List<bindings.StructDataHeader> kVersions = const [
974 const bindings.StructDataHeader(8, 0) 1190 const bindings.StructDataHeader(8, 0)
975 ]; 1191 ];
976 1192
977 _SampleInterfaceSampleMethod0Params() : super(kVersions.last.size); 1193 _SampleInterfaceSampleMethod0Params() : super(kVersions.last.size);
978 1194
979 static _SampleInterfaceSampleMethod0Params deserialize(bindings.Message messag e) { 1195 static _SampleInterfaceSampleMethod0Params deserialize(bindings.Message messag e) {
980 var decoder = new bindings.Decoder(message); 1196 var decoder = new bindings.Decoder(message);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 String toString() { 1235 String toString() {
1020 return "_SampleInterfaceSampleMethod0Params("")"; 1236 return "_SampleInterfaceSampleMethod0Params("")";
1021 } 1237 }
1022 1238
1023 Map toJson() { 1239 Map toJson() {
1024 Map map = new Map(); 1240 Map map = new Map();
1025 return map; 1241 return map;
1026 } 1242 }
1027 } 1243 }
1028 1244
1245 mojom_types.MojomStruct _sampleInterfacesSampleInterfaceSampleMethod0Params() {
1246 return new mojom_types.MojomStruct()
1247 ..declData = (new mojom_types.DeclarationData()
1248 ..shortName = 'SampleInterfaceSampleMethod0Params'
1249 ..fullIdentifier = 'sample.SampleInterface_SampleMethod0_Params')
1250 ..fields = <mojom_types.StructField>[];
1251 }
1252
1029 1253
1030 class _SampleInterfaceSampleMethod1Params extends bindings.Struct { 1254 class _SampleInterfaceSampleMethod1Params extends bindings.Struct {
1031 static const List<bindings.StructDataHeader> kVersions = const [ 1255 static const List<bindings.StructDataHeader> kVersions = const [
1032 const bindings.StructDataHeader(24, 0) 1256 const bindings.StructDataHeader(24, 0)
1033 ]; 1257 ];
1034 int in1 = 0; 1258 int in1 = 0;
1035 String in2 = null; 1259 String in2 = null;
1036 1260
1037 _SampleInterfaceSampleMethod1Params() : super(kVersions.last.size); 1261 _SampleInterfaceSampleMethod1Params() : super(kVersions.last.size);
1038 1262
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 } 1319 }
1096 1320
1097 Map toJson() { 1321 Map toJson() {
1098 Map map = new Map(); 1322 Map map = new Map();
1099 map["in1"] = in1; 1323 map["in1"] = in1;
1100 map["in2"] = in2; 1324 map["in2"] = in2;
1101 return map; 1325 return map;
1102 } 1326 }
1103 } 1327 }
1104 1328
1329 mojom_types.MojomStruct _sampleInterfacesSampleInterfaceSampleMethod1Params() {
1330 return new mojom_types.MojomStruct()
1331 ..declData = (new mojom_types.DeclarationData()
1332 ..shortName = 'SampleInterfaceSampleMethod1Params'
1333 ..fullIdentifier = 'sample.SampleInterface_SampleMethod1_Params')
1334 ..fields = <mojom_types.StructField>[
1335 new mojom_types.StructField()
1336 ..declData = (new mojom_types.DeclarationData()
1337 ..shortName = 'In1')
1338 ..type = (new mojom_types.Type()
1339 ..simpleType = mojom_types.SimpleType.int32),
1340 new mojom_types.StructField()
1341 ..declData = (new mojom_types.DeclarationData()
1342 ..shortName = 'In2')
1343 ..type = (new mojom_types.Type()
1344 ..stringType = (new mojom_types.StringType()
1345 ..nullable = true
1346 )),];
1347 }
1348
1105 1349
1106 class SampleInterfaceSampleMethod1ResponseParams extends bindings.Struct { 1350 class SampleInterfaceSampleMethod1ResponseParams extends bindings.Struct {
1107 static const List<bindings.StructDataHeader> kVersions = const [ 1351 static const List<bindings.StructDataHeader> kVersions = const [
1108 const bindings.StructDataHeader(24, 0) 1352 const bindings.StructDataHeader(24, 0)
1109 ]; 1353 ];
1110 String out1 = null; 1354 String out1 = null;
1111 Enum out2 = null; 1355 Enum out2 = null;
1112 1356
1113 SampleInterfaceSampleMethod1ResponseParams() : super(kVersions.last.size); 1357 SampleInterfaceSampleMethod1ResponseParams() : super(kVersions.last.size);
1114 1358
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 } 1419 }
1176 1420
1177 Map toJson() { 1421 Map toJson() {
1178 Map map = new Map(); 1422 Map map = new Map();
1179 map["out1"] = out1; 1423 map["out1"] = out1;
1180 map["out2"] = out2; 1424 map["out2"] = out2;
1181 return map; 1425 return map;
1182 } 1426 }
1183 } 1427 }
1184 1428
1429 mojom_types.MojomStruct _sampleInterfacesSampleInterfaceSampleMethod1ResponsePar ams() {
1430 return new mojom_types.MojomStruct()
1431 ..declData = (new mojom_types.DeclarationData()
1432 ..shortName = 'SampleInterfaceSampleMethod1ResponseParams'
1433 ..fullIdentifier = 'sample.SampleInterface_SampleMethod1_ResponseParams')
1434 ..fields = <mojom_types.StructField>[
1435 new mojom_types.StructField()
1436 ..declData = (new mojom_types.DeclarationData()
1437 ..shortName = 'Out1')
1438 ..type = (new mojom_types.Type()
1439 ..stringType = (new mojom_types.StringType()
1440 ..nullable = true
1441 )),
1442 new mojom_types.StructField()
1443 ..declData = (new mojom_types.DeclarationData()
1444 ..shortName = 'Out2')
1445 ..type = (new mojom_types.Type()
1446 ..typeReference = (new mojom_types.TypeReference()
1447 ..identifier = 'sample_interfaces_Enum__'
1448 ..typeKey = 'sample_interfaces_Enum__'
1449 )),];
1450 }
1451
1185 1452
1186 class _SampleInterfaceSampleMethod2Params extends bindings.Struct { 1453 class _SampleInterfaceSampleMethod2Params extends bindings.Struct {
1187 static const List<bindings.StructDataHeader> kVersions = const [ 1454 static const List<bindings.StructDataHeader> kVersions = const [
1188 const bindings.StructDataHeader(8, 0) 1455 const bindings.StructDataHeader(8, 0)
1189 ]; 1456 ];
1190 1457
1191 _SampleInterfaceSampleMethod2Params() : super(kVersions.last.size); 1458 _SampleInterfaceSampleMethod2Params() : super(kVersions.last.size);
1192 1459
1193 static _SampleInterfaceSampleMethod2Params deserialize(bindings.Message messag e) { 1460 static _SampleInterfaceSampleMethod2Params deserialize(bindings.Message messag e) {
1194 var decoder = new bindings.Decoder(message); 1461 var decoder = new bindings.Decoder(message);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 String toString() { 1500 String toString() {
1234 return "_SampleInterfaceSampleMethod2Params("")"; 1501 return "_SampleInterfaceSampleMethod2Params("")";
1235 } 1502 }
1236 1503
1237 Map toJson() { 1504 Map toJson() {
1238 Map map = new Map(); 1505 Map map = new Map();
1239 return map; 1506 return map;
1240 } 1507 }
1241 } 1508 }
1242 1509
1510 mojom_types.MojomStruct _sampleInterfacesSampleInterfaceSampleMethod2Params() {
1511 return new mojom_types.MojomStruct()
1512 ..declData = (new mojom_types.DeclarationData()
1513 ..shortName = 'SampleInterfaceSampleMethod2Params'
1514 ..fullIdentifier = 'sample.SampleInterface_SampleMethod2_Params')
1515 ..fields = <mojom_types.StructField>[];
1516 }
1517
1518
1243 const int _Provider_echoStringName = 0; 1519 const int _Provider_echoStringName = 0;
1244 const int _Provider_echoStringsName = 1; 1520 const int _Provider_echoStringsName = 1;
1245 const int _Provider_echoMessagePipeHandleName = 2; 1521 const int _Provider_echoMessagePipeHandleName = 2;
1246 const int _Provider_echoEnumName = 3; 1522 const int _Provider_echoEnumName = 3;
1247 const int _Provider_echoIntName = 4; 1523 const int _Provider_echoIntName = 4;
1248 1524
1525 mojom_types.MojomInterface _sampleInterfacesProvider() {
1526 return new mojom_types.MojomInterface()
1527 ..declData = (new mojom_types.DeclarationData()
1528 ..shortName = 'Provider'
1529 ..fullIdentifier = 'sample.Provider')
1530 ..interfaceName = 'Provider'
1531 ..methods = <int, mojom_types.MojomMethod>{
1532 _Provider_echoStringName: new mojom_types.MojomMethod()
1533 ..declData = (new mojom_types.DeclarationData()
1534 ..shortName = 'EchoString')
1535 ..ordinal = _Provider_echoStringName
1536 ..responseParams = _sampleInterfacesProviderEchoStringResponseParams()
1537 ..parameters = _sampleInterfacesProviderEchoStringParams(),
1538 _Provider_echoStringsName: new mojom_types.MojomMethod()
1539 ..declData = (new mojom_types.DeclarationData()
1540 ..shortName = 'EchoStrings')
1541 ..ordinal = _Provider_echoStringsName
1542 ..responseParams = _sampleInterfacesProviderEchoStringsResponseParams()
1543 ..parameters = _sampleInterfacesProviderEchoStringsParams(),
1544 _Provider_echoMessagePipeHandleName: new mojom_types.MojomMethod()
1545 ..declData = (new mojom_types.DeclarationData()
1546 ..shortName = 'EchoMessagePipeHandle')
1547 ..ordinal = _Provider_echoMessagePipeHandleName
1548 ..responseParams = _sampleInterfacesProviderEchoMessagePipeHandleRespons eParams()
1549 ..parameters = _sampleInterfacesProviderEchoMessagePipeHandleParams(),
1550 _Provider_echoEnumName: new mojom_types.MojomMethod()
1551 ..declData = (new mojom_types.DeclarationData()
1552 ..shortName = 'EchoEnum')
1553 ..ordinal = _Provider_echoEnumName
1554 ..responseParams = _sampleInterfacesProviderEchoEnumResponseParams()
1555 ..parameters = _sampleInterfacesProviderEchoEnumParams(),
1556 _Provider_echoIntName: new mojom_types.MojomMethod()
1557 ..declData = (new mojom_types.DeclarationData()
1558 ..shortName = 'EchoInt')
1559 ..ordinal = _Provider_echoIntName
1560 ..responseParams = _sampleInterfacesProviderEchoIntResponseParams()
1561 ..parameters = _sampleInterfacesProviderEchoIntParams(),
1562 };
1563 }
1564
1565 class _ProviderServiceDescription implements service_describer.ServiceDescriptio n {
1566 dynamic getTopLevelInterface([Function responseFactory]) =>
1567 _sampleInterfacesProvider();
1568
1569 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
1570 getAllMojomTypeDefinitions()[typeKey];
1571
1572 dynamic getAllTypeDefinitions([Function responseFactory]) =>
1573 getAllMojomTypeDefinitions();
1574 }
1575
1249 abstract class Provider { 1576 abstract class Provider {
1250 static const String serviceName = null; 1577 static const String serviceName = null;
1251 dynamic echoString(String a,[Function responseFactory = null]); 1578 dynamic echoString(String a,[Function responseFactory = null]);
1252 dynamic echoStrings(String a,String b,[Function responseFactory = null]); 1579 dynamic echoStrings(String a,String b,[Function responseFactory = null]);
1253 dynamic echoMessagePipeHandle(core.MojoMessagePipeEndpoint a,[Function respons eFactory = null]); 1580 dynamic echoMessagePipeHandle(core.MojoMessagePipeEndpoint a,[Function respons eFactory = null]);
1254 dynamic echoEnum(Enum a,[Function responseFactory = null]); 1581 dynamic echoEnum(Enum a,[Function responseFactory = null]);
1255 dynamic echoInt(int a,[Function responseFactory = null]); 1582 dynamic echoInt(int a,[Function responseFactory = null]);
1256 } 1583 }
1257 1584
1258 1585
1259 class _ProviderProxyImpl extends bindings.Proxy { 1586 class _ProviderProxyImpl extends bindings.Proxy {
1260 _ProviderProxyImpl.fromEndpoint( 1587 _ProviderProxyImpl.fromEndpoint(
1261 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 1588 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
1262 1589
1263 _ProviderProxyImpl.fromHandle(core.MojoHandle handle) : 1590 _ProviderProxyImpl.fromHandle(core.MojoHandle handle) :
1264 super.fromHandle(handle); 1591 super.fromHandle(handle);
1265 1592
1266 _ProviderProxyImpl.unbound() : super.unbound(); 1593 _ProviderProxyImpl.unbound() : super.unbound();
1267 1594
1268 static _ProviderProxyImpl newFromEndpoint( 1595 static _ProviderProxyImpl newFromEndpoint(
1269 core.MojoMessagePipeEndpoint endpoint) { 1596 core.MojoMessagePipeEndpoint endpoint) {
1270 assert(endpoint.setDescription("For _ProviderProxyImpl")); 1597 assert(endpoint.setDescription("For _ProviderProxyImpl"));
1271 return new _ProviderProxyImpl.fromEndpoint(endpoint); 1598 return new _ProviderProxyImpl.fromEndpoint(endpoint);
1272 } 1599 }
1273 1600
1601 service_describer.ServiceDescription get serviceDescription =>
1602 new _ProviderServiceDescription();
1603
1274 void handleResponse(bindings.ServiceMessage message) { 1604 void handleResponse(bindings.ServiceMessage message) {
1275 switch (message.header.type) { 1605 switch (message.header.type) {
1276 case _Provider_echoStringName: 1606 case _Provider_echoStringName:
1277 var r = ProviderEchoStringResponseParams.deserialize( 1607 var r = ProviderEchoStringResponseParams.deserialize(
1278 message.payload); 1608 message.payload);
1279 if (!message.header.hasRequestId) { 1609 if (!message.header.hasRequestId) {
1280 proxyError("Expected a message with a valid request Id."); 1610 proxyError("Expected a message with a valid request Id.");
1281 return; 1611 return;
1282 } 1612 }
1283 Completer c = completerMap[message.header.requestId]; 1613 Completer c = completerMap[message.header.requestId];
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 assert(_impl == null); 2005 assert(_impl == null);
1676 _impl = d; 2006 _impl = d;
1677 } 2007 }
1678 2008
1679 String toString() { 2009 String toString() {
1680 var superString = super.toString(); 2010 var superString = super.toString();
1681 return "ProviderStub($superString)"; 2011 return "ProviderStub($superString)";
1682 } 2012 }
1683 2013
1684 int get version => 0; 2014 int get version => 0;
2015
2016 service_describer.ServiceDescription get serviceDescription =>
2017 new _ProviderServiceDescription();
1685 } 2018 }
1686 2019
1687 const int _IntegerAccessor_getIntegerName = 0; 2020 const int _IntegerAccessor_getIntegerName = 0;
1688 const int _IntegerAccessor_setIntegerName = 1; 2021 const int _IntegerAccessor_setIntegerName = 1;
1689 2022
2023 mojom_types.MojomInterface _sampleInterfacesIntegerAccessor() {
2024 return new mojom_types.MojomInterface()
2025 ..declData = (new mojom_types.DeclarationData()
2026 ..shortName = 'IntegerAccessor'
2027 ..fullIdentifier = 'sample.IntegerAccessor')
2028 ..interfaceName = 'IntegerAccessor'
2029 ..methods = <int, mojom_types.MojomMethod>{
2030 _IntegerAccessor_getIntegerName: new mojom_types.MojomMethod()
2031 ..declData = (new mojom_types.DeclarationData()
2032 ..shortName = 'GetInteger')
2033 ..ordinal = _IntegerAccessor_getIntegerName
2034 ..responseParams = _sampleInterfacesIntegerAccessorGetIntegerResponsePar ams()
2035 ..parameters = _sampleInterfacesIntegerAccessorGetIntegerParams(),
2036 _IntegerAccessor_setIntegerName: new mojom_types.MojomMethod()
2037 ..declData = (new mojom_types.DeclarationData()
2038 ..shortName = 'SetInteger')
2039 ..ordinal = _IntegerAccessor_setIntegerName
2040 ..parameters = _sampleInterfacesIntegerAccessorSetIntegerParams(),
2041 };
2042 }
2043
2044 class _IntegerAccessorServiceDescription implements service_describer.ServiceDes cription {
2045 dynamic getTopLevelInterface([Function responseFactory]) =>
2046 _sampleInterfacesIntegerAccessor();
2047
2048 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
2049 getAllMojomTypeDefinitions()[typeKey];
2050
2051 dynamic getAllTypeDefinitions([Function responseFactory]) =>
2052 getAllMojomTypeDefinitions();
2053 }
2054
1690 abstract class IntegerAccessor { 2055 abstract class IntegerAccessor {
1691 static const String serviceName = null; 2056 static const String serviceName = null;
1692 dynamic getInteger([Function responseFactory = null]); 2057 dynamic getInteger([Function responseFactory = null]);
1693 void setInteger(int data, Enum type); 2058 void setInteger(int data, Enum type);
1694 } 2059 }
1695 2060
1696 2061
1697 class _IntegerAccessorProxyImpl extends bindings.Proxy { 2062 class _IntegerAccessorProxyImpl extends bindings.Proxy {
1698 _IntegerAccessorProxyImpl.fromEndpoint( 2063 _IntegerAccessorProxyImpl.fromEndpoint(
1699 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 2064 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
1700 2065
1701 _IntegerAccessorProxyImpl.fromHandle(core.MojoHandle handle) : 2066 _IntegerAccessorProxyImpl.fromHandle(core.MojoHandle handle) :
1702 super.fromHandle(handle); 2067 super.fromHandle(handle);
1703 2068
1704 _IntegerAccessorProxyImpl.unbound() : super.unbound(); 2069 _IntegerAccessorProxyImpl.unbound() : super.unbound();
1705 2070
1706 static _IntegerAccessorProxyImpl newFromEndpoint( 2071 static _IntegerAccessorProxyImpl newFromEndpoint(
1707 core.MojoMessagePipeEndpoint endpoint) { 2072 core.MojoMessagePipeEndpoint endpoint) {
1708 assert(endpoint.setDescription("For _IntegerAccessorProxyImpl")); 2073 assert(endpoint.setDescription("For _IntegerAccessorProxyImpl"));
1709 return new _IntegerAccessorProxyImpl.fromEndpoint(endpoint); 2074 return new _IntegerAccessorProxyImpl.fromEndpoint(endpoint);
1710 } 2075 }
1711 2076
2077 service_describer.ServiceDescription get serviceDescription =>
2078 new _IntegerAccessorServiceDescription();
2079
1712 void handleResponse(bindings.ServiceMessage message) { 2080 void handleResponse(bindings.ServiceMessage message) {
1713 switch (message.header.type) { 2081 switch (message.header.type) {
1714 case _IntegerAccessor_getIntegerName: 2082 case _IntegerAccessor_getIntegerName:
1715 var r = IntegerAccessorGetIntegerResponseParams.deserialize( 2083 var r = IntegerAccessorGetIntegerResponseParams.deserialize(
1716 message.payload); 2084 message.payload);
1717 if (!message.header.hasRequestId) { 2085 if (!message.header.hasRequestId) {
1718 proxyError("Expected a message with a valid request Id."); 2086 proxyError("Expected a message with a valid request Id.");
1719 return; 2087 return;
1720 } 2088 }
1721 Completer c = completerMap[message.header.requestId]; 2089 Completer c = completerMap[message.header.requestId];
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 assert(_impl == null); 2270 assert(_impl == null);
1903 _impl = d; 2271 _impl = d;
1904 } 2272 }
1905 2273
1906 String toString() { 2274 String toString() {
1907 var superString = super.toString(); 2275 var superString = super.toString();
1908 return "IntegerAccessorStub($superString)"; 2276 return "IntegerAccessorStub($superString)";
1909 } 2277 }
1910 2278
1911 int get version => 3; 2279 int get version => 3;
2280
2281 service_describer.ServiceDescription get serviceDescription =>
2282 new _IntegerAccessorServiceDescription();
1912 } 2283 }
1913 2284
1914 const int _SampleInterface_sampleMethod0Name = 0; 2285 const int _SampleInterface_sampleMethod0Name = 0;
1915 const int _SampleInterface_sampleMethod1Name = 1; 2286 const int _SampleInterface_sampleMethod1Name = 1;
1916 const int _SampleInterface_sampleMethod2Name = 2; 2287 const int _SampleInterface_sampleMethod2Name = 2;
1917 2288
2289 mojom_types.MojomInterface _sampleInterfacesSampleInterface() {
2290 return new mojom_types.MojomInterface()
2291 ..declData = (new mojom_types.DeclarationData()
2292 ..shortName = 'SampleInterface'
2293 ..fullIdentifier = 'sample.SampleInterface')
2294 ..interfaceName = 'SampleInterface'
2295 ..methods = <int, mojom_types.MojomMethod>{
2296 _SampleInterface_sampleMethod0Name: new mojom_types.MojomMethod()
2297 ..declData = (new mojom_types.DeclarationData()
2298 ..shortName = 'SampleMethod0')
2299 ..ordinal = _SampleInterface_sampleMethod0Name
2300 ..parameters = _sampleInterfacesSampleInterfaceSampleMethod0Params(),
2301 _SampleInterface_sampleMethod1Name: new mojom_types.MojomMethod()
2302 ..declData = (new mojom_types.DeclarationData()
2303 ..shortName = 'SampleMethod1')
2304 ..ordinal = _SampleInterface_sampleMethod1Name
2305 ..responseParams = _sampleInterfacesSampleInterfaceSampleMethod1Response Params()
2306 ..parameters = _sampleInterfacesSampleInterfaceSampleMethod1Params(),
2307 _SampleInterface_sampleMethod2Name: new mojom_types.MojomMethod()
2308 ..declData = (new mojom_types.DeclarationData()
2309 ..shortName = 'SampleMethod2')
2310 ..ordinal = _SampleInterface_sampleMethod2Name
2311 ..parameters = _sampleInterfacesSampleInterfaceSampleMethod2Params(),
2312 };
2313 }
2314
2315 class _SampleInterfaceServiceDescription implements service_describer.ServiceDes cription {
2316 dynamic getTopLevelInterface([Function responseFactory]) =>
2317 _sampleInterfacesSampleInterface();
2318
2319 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
2320 getAllMojomTypeDefinitions()[typeKey];
2321
2322 dynamic getAllTypeDefinitions([Function responseFactory]) =>
2323 getAllMojomTypeDefinitions();
2324 }
2325
1918 abstract class SampleInterface { 2326 abstract class SampleInterface {
1919 static const String serviceName = null; 2327 static const String serviceName = null;
1920 void sampleMethod0(); 2328 void sampleMethod0();
1921 dynamic sampleMethod1(int in1,String in2,[Function responseFactory = null]); 2329 dynamic sampleMethod1(int in1,String in2,[Function responseFactory = null]);
1922 void sampleMethod2(); 2330 void sampleMethod2();
1923 } 2331 }
1924 2332
1925 2333
1926 class _SampleInterfaceProxyImpl extends bindings.Proxy { 2334 class _SampleInterfaceProxyImpl extends bindings.Proxy {
1927 _SampleInterfaceProxyImpl.fromEndpoint( 2335 _SampleInterfaceProxyImpl.fromEndpoint(
1928 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 2336 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
1929 2337
1930 _SampleInterfaceProxyImpl.fromHandle(core.MojoHandle handle) : 2338 _SampleInterfaceProxyImpl.fromHandle(core.MojoHandle handle) :
1931 super.fromHandle(handle); 2339 super.fromHandle(handle);
1932 2340
1933 _SampleInterfaceProxyImpl.unbound() : super.unbound(); 2341 _SampleInterfaceProxyImpl.unbound() : super.unbound();
1934 2342
1935 static _SampleInterfaceProxyImpl newFromEndpoint( 2343 static _SampleInterfaceProxyImpl newFromEndpoint(
1936 core.MojoMessagePipeEndpoint endpoint) { 2344 core.MojoMessagePipeEndpoint endpoint) {
1937 assert(endpoint.setDescription("For _SampleInterfaceProxyImpl")); 2345 assert(endpoint.setDescription("For _SampleInterfaceProxyImpl"));
1938 return new _SampleInterfaceProxyImpl.fromEndpoint(endpoint); 2346 return new _SampleInterfaceProxyImpl.fromEndpoint(endpoint);
1939 } 2347 }
1940 2348
2349 service_describer.ServiceDescription get serviceDescription =>
2350 new _SampleInterfaceServiceDescription();
2351
1941 void handleResponse(bindings.ServiceMessage message) { 2352 void handleResponse(bindings.ServiceMessage message) {
1942 switch (message.header.type) { 2353 switch (message.header.type) {
1943 case _SampleInterface_sampleMethod1Name: 2354 case _SampleInterface_sampleMethod1Name:
1944 var r = SampleInterfaceSampleMethod1ResponseParams.deserialize( 2355 var r = SampleInterfaceSampleMethod1ResponseParams.deserialize(
1945 message.payload); 2356 message.payload);
1946 if (!message.header.hasRequestId) { 2357 if (!message.header.hasRequestId) {
1947 proxyError("Expected a message with a valid request Id."); 2358 proxyError("Expected a message with a valid request Id.");
1948 return; 2359 return;
1949 } 2360 }
1950 Completer c = completerMap[message.header.requestId]; 2361 Completer c = completerMap[message.header.requestId];
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 assert(_impl == null); 2555 assert(_impl == null);
2145 _impl = d; 2556 _impl = d;
2146 } 2557 }
2147 2558
2148 String toString() { 2559 String toString() {
2149 var superString = super.toString(); 2560 var superString = super.toString();
2150 return "SampleInterfaceStub($superString)"; 2561 return "SampleInterfaceStub($superString)";
2151 } 2562 }
2152 2563
2153 int get version => 0; 2564 int get version => 0;
2565
2566 service_describer.ServiceDescription get serviceDescription =>
2567 new _SampleInterfaceServiceDescription();
2154 } 2568 }
2155 2569
2156 2570
2571 Map<String, mojom_types.UserDefinedType> _initDescriptions() {
2572 var map = new HashMap<String, mojom_types.UserDefinedType>();
2573 map["sample_interfaces_Enum__"] =
2574 new mojom_types.UserDefinedType()
2575 ..enumType = _sampleInterfacesEnum();
2576 map["sample_interfaces_Provider_EchoString_Params__"] =
2577 new mojom_types.UserDefinedType()
2578 ..structType = _sampleInterfacesProviderEchoStringParams();
2579 map["sample_interfaces_Provider_EchoString_ResponseParams__"] =
2580 new mojom_types.UserDefinedType()
2581 ..structType = _sampleInterfacesProviderEchoStringResponseParams();
2582 map["sample_interfaces_Provider_EchoStrings_Params__"] =
2583 new mojom_types.UserDefinedType()
2584 ..structType = _sampleInterfacesProviderEchoStringsParams();
2585 map["sample_interfaces_Provider_EchoStrings_ResponseParams__"] =
2586 new mojom_types.UserDefinedType()
2587 ..structType = _sampleInterfacesProviderEchoStringsResponseParams();
2588 map["sample_interfaces_Provider_EchoMessagePipeHandle_Params__"] =
2589 new mojom_types.UserDefinedType()
2590 ..structType = _sampleInterfacesProviderEchoMessagePipeHandleParams();
2591 map["sample_interfaces_Provider_EchoMessagePipeHandle_ResponseParams__"] =
2592 new mojom_types.UserDefinedType()
2593 ..structType = _sampleInterfacesProviderEchoMessagePipeHandleResponseParam s();
2594 map["sample_interfaces_Provider_EchoEnum_Params__"] =
2595 new mojom_types.UserDefinedType()
2596 ..structType = _sampleInterfacesProviderEchoEnumParams();
2597 map["sample_interfaces_Provider_EchoEnum_ResponseParams__"] =
2598 new mojom_types.UserDefinedType()
2599 ..structType = _sampleInterfacesProviderEchoEnumResponseParams();
2600 map["sample_interfaces_Provider_EchoInt_Params__"] =
2601 new mojom_types.UserDefinedType()
2602 ..structType = _sampleInterfacesProviderEchoIntParams();
2603 map["sample_interfaces_Provider_EchoInt_ResponseParams__"] =
2604 new mojom_types.UserDefinedType()
2605 ..structType = _sampleInterfacesProviderEchoIntResponseParams();
2606 map["sample_interfaces_IntegerAccessor_GetInteger_Params__"] =
2607 new mojom_types.UserDefinedType()
2608 ..structType = _sampleInterfacesIntegerAccessorGetIntegerParams();
2609 map["sample_interfaces_IntegerAccessor_GetInteger_ResponseParams__"] =
2610 new mojom_types.UserDefinedType()
2611 ..structType = _sampleInterfacesIntegerAccessorGetIntegerResponseParams();
2612 map["sample_interfaces_IntegerAccessor_SetInteger_Params__"] =
2613 new mojom_types.UserDefinedType()
2614 ..structType = _sampleInterfacesIntegerAccessorSetIntegerParams();
2615 map["sample_interfaces_SampleInterface_SampleMethod0_Params__"] =
2616 new mojom_types.UserDefinedType()
2617 ..structType = _sampleInterfacesSampleInterfaceSampleMethod0Params();
2618 map["sample_interfaces_SampleInterface_SampleMethod1_Params__"] =
2619 new mojom_types.UserDefinedType()
2620 ..structType = _sampleInterfacesSampleInterfaceSampleMethod1Params();
2621 map["sample_interfaces_SampleInterface_SampleMethod1_ResponseParams__"] =
2622 new mojom_types.UserDefinedType()
2623 ..structType = _sampleInterfacesSampleInterfaceSampleMethod1ResponseParams ();
2624 map["sample_interfaces_SampleInterface_SampleMethod2_Params__"] =
2625 new mojom_types.UserDefinedType()
2626 ..structType = _sampleInterfacesSampleInterfaceSampleMethod2Params();
2627 map["sample_interfaces_Provider__"] =
2628 new mojom_types.UserDefinedType()
2629 ..interfaceType = _sampleInterfacesProvider();
2630 map["sample_interfaces_IntegerAccessor__"] =
2631 new mojom_types.UserDefinedType()
2632 ..interfaceType = _sampleInterfacesIntegerAccessor();
2633 map["sample_interfaces_SampleInterface__"] =
2634 new mojom_types.UserDefinedType()
2635 ..interfaceType = _sampleInterfacesSampleInterface();
2636 return map;
2637 }
2638
2639 var _mojomDesc;
2640 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
2641 if (_mojomDesc == null) {
2642 _mojomDesc = _initDescriptions();
2643 }
2644 return _mojomDesc;
2645 }
2646
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698