| OLD | NEW |
| 1 // WARNING: DO NOT EDIT. This file was generated by a program. | 1 // WARNING: DO NOT EDIT. This file was generated by a program. |
| 2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. | 2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. |
| 3 | 3 |
| 4 library regression_tests_mojom; | 4 library regression_tests_mojom; |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
| 10 import 'package:mojo/bindings.dart' as bindings; | 10 import 'package:mojo/bindings.dart' as bindings; |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 | 436 |
| 437 class Edge extends bindings.Struct { | 437 class Edge extends bindings.Struct { |
| 438 static const List<bindings.StructDataHeader> kVersions = const [ | 438 static const List<bindings.StructDataHeader> kVersions = const [ |
| 439 const bindings.StructDataHeader(16, 0) | 439 const bindings.StructDataHeader(16, 0) |
| 440 ]; | 440 ]; |
| 441 Vertex v = null; | 441 Vertex v = null; |
| 442 | 442 |
| 443 Edge() : super(kVersions.last.size); | 443 Edge() : super(kVersions.last.size); |
| 444 | 444 |
| 445 Edge.init( |
| 446 Vertex this.v |
| 447 ) : super(kVersions.last.size); |
| 448 |
| 445 static Edge deserialize(bindings.Message message) { | 449 static Edge deserialize(bindings.Message message) { |
| 446 var decoder = new bindings.Decoder(message); | 450 var decoder = new bindings.Decoder(message); |
| 447 var result = decode(decoder); | 451 var result = decode(decoder); |
| 448 if (decoder.excessHandles != null) { | 452 if (decoder.excessHandles != null) { |
| 449 decoder.excessHandles.forEach((h) => h.close()); | 453 decoder.excessHandles.forEach((h) => h.close()); |
| 450 } | 454 } |
| 451 return result; | 455 return result; |
| 452 } | 456 } |
| 453 | 457 |
| 454 static Edge decode(bindings.Decoder decoder0) { | 458 static Edge decode(bindings.Decoder decoder0) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 | 512 |
| 509 | 513 |
| 510 class Vertex extends bindings.Struct { | 514 class Vertex extends bindings.Struct { |
| 511 static const List<bindings.StructDataHeader> kVersions = const [ | 515 static const List<bindings.StructDataHeader> kVersions = const [ |
| 512 const bindings.StructDataHeader(16, 0) | 516 const bindings.StructDataHeader(16, 0) |
| 513 ]; | 517 ]; |
| 514 EmptyStruct e = null; | 518 EmptyStruct e = null; |
| 515 | 519 |
| 516 Vertex() : super(kVersions.last.size); | 520 Vertex() : super(kVersions.last.size); |
| 517 | 521 |
| 522 Vertex.init( |
| 523 EmptyStruct this.e |
| 524 ) : super(kVersions.last.size); |
| 525 |
| 518 static Vertex deserialize(bindings.Message message) { | 526 static Vertex deserialize(bindings.Message message) { |
| 519 var decoder = new bindings.Decoder(message); | 527 var decoder = new bindings.Decoder(message); |
| 520 var result = decode(decoder); | 528 var result = decode(decoder); |
| 521 if (decoder.excessHandles != null) { | 529 if (decoder.excessHandles != null) { |
| 522 decoder.excessHandles.forEach((h) => h.close()); | 530 decoder.excessHandles.forEach((h) => h.close()); |
| 523 } | 531 } |
| 524 return result; | 532 return result; |
| 525 } | 533 } |
| 526 | 534 |
| 527 static Vertex decode(bindings.Decoder decoder0) { | 535 static Vertex decode(bindings.Decoder decoder0) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 } | 588 } |
| 581 | 589 |
| 582 | 590 |
| 583 class EmptyStruct extends bindings.Struct { | 591 class EmptyStruct extends bindings.Struct { |
| 584 static const List<bindings.StructDataHeader> kVersions = const [ | 592 static const List<bindings.StructDataHeader> kVersions = const [ |
| 585 const bindings.StructDataHeader(8, 0) | 593 const bindings.StructDataHeader(8, 0) |
| 586 ]; | 594 ]; |
| 587 | 595 |
| 588 EmptyStruct() : super(kVersions.last.size); | 596 EmptyStruct() : super(kVersions.last.size); |
| 589 | 597 |
| 598 EmptyStruct.init( |
| 599 ) : super(kVersions.last.size); |
| 600 |
| 590 static EmptyStruct deserialize(bindings.Message message) { | 601 static EmptyStruct deserialize(bindings.Message message) { |
| 591 var decoder = new bindings.Decoder(message); | 602 var decoder = new bindings.Decoder(message); |
| 592 var result = decode(decoder); | 603 var result = decode(decoder); |
| 593 if (decoder.excessHandles != null) { | 604 if (decoder.excessHandles != null) { |
| 594 decoder.excessHandles.forEach((h) => h.close()); | 605 decoder.excessHandles.forEach((h) => h.close()); |
| 595 } | 606 } |
| 596 return result; | 607 return result; |
| 597 } | 608 } |
| 598 | 609 |
| 599 static EmptyStruct decode(bindings.Decoder decoder0) { | 610 static EmptyStruct decode(bindings.Decoder decoder0) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 | 650 |
| 640 | 651 |
| 641 class A extends bindings.Struct { | 652 class A extends bindings.Struct { |
| 642 static const List<bindings.StructDataHeader> kVersions = const [ | 653 static const List<bindings.StructDataHeader> kVersions = const [ |
| 643 const bindings.StructDataHeader(16, 0) | 654 const bindings.StructDataHeader(16, 0) |
| 644 ]; | 655 ]; |
| 645 B b = null; | 656 B b = null; |
| 646 | 657 |
| 647 A() : super(kVersions.last.size); | 658 A() : super(kVersions.last.size); |
| 648 | 659 |
| 660 A.init( |
| 661 B this.b |
| 662 ) : super(kVersions.last.size); |
| 663 |
| 649 static A deserialize(bindings.Message message) { | 664 static A deserialize(bindings.Message message) { |
| 650 var decoder = new bindings.Decoder(message); | 665 var decoder = new bindings.Decoder(message); |
| 651 var result = decode(decoder); | 666 var result = decode(decoder); |
| 652 if (decoder.excessHandles != null) { | 667 if (decoder.excessHandles != null) { |
| 653 decoder.excessHandles.forEach((h) => h.close()); | 668 decoder.excessHandles.forEach((h) => h.close()); |
| 654 } | 669 } |
| 655 return result; | 670 return result; |
| 656 } | 671 } |
| 657 | 672 |
| 658 static A decode(bindings.Decoder decoder0) { | 673 static A decode(bindings.Decoder decoder0) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 | 727 |
| 713 | 728 |
| 714 class B extends bindings.Struct { | 729 class B extends bindings.Struct { |
| 715 static const List<bindings.StructDataHeader> kVersions = const [ | 730 static const List<bindings.StructDataHeader> kVersions = const [ |
| 716 const bindings.StructDataHeader(16, 0) | 731 const bindings.StructDataHeader(16, 0) |
| 717 ]; | 732 ]; |
| 718 A a = null; | 733 A a = null; |
| 719 | 734 |
| 720 B() : super(kVersions.last.size); | 735 B() : super(kVersions.last.size); |
| 721 | 736 |
| 737 B.init( |
| 738 A this.a |
| 739 ) : super(kVersions.last.size); |
| 740 |
| 722 static B deserialize(bindings.Message message) { | 741 static B deserialize(bindings.Message message) { |
| 723 var decoder = new bindings.Decoder(message); | 742 var decoder = new bindings.Decoder(message); |
| 724 var result = decode(decoder); | 743 var result = decode(decoder); |
| 725 if (decoder.excessHandles != null) { | 744 if (decoder.excessHandles != null) { |
| 726 decoder.excessHandles.forEach((h) => h.close()); | 745 decoder.excessHandles.forEach((h) => h.close()); |
| 727 } | 746 } |
| 728 return result; | 747 return result; |
| 729 } | 748 } |
| 730 | 749 |
| 731 static B decode(bindings.Decoder decoder0) { | 750 static B decode(bindings.Decoder decoder0) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 | 804 |
| 786 | 805 |
| 787 class StructWithHandleCalledHandles extends bindings.Struct { | 806 class StructWithHandleCalledHandles extends bindings.Struct { |
| 788 static const List<bindings.StructDataHeader> kVersions = const [ | 807 static const List<bindings.StructDataHeader> kVersions = const [ |
| 789 const bindings.StructDataHeader(16, 0) | 808 const bindings.StructDataHeader(16, 0) |
| 790 ]; | 809 ]; |
| 791 core.MojoHandle handles = null; | 810 core.MojoHandle handles = null; |
| 792 | 811 |
| 793 StructWithHandleCalledHandles() : super(kVersions.last.size); | 812 StructWithHandleCalledHandles() : super(kVersions.last.size); |
| 794 | 813 |
| 814 StructWithHandleCalledHandles.init( |
| 815 core.MojoHandle this.handles |
| 816 ) : super(kVersions.last.size); |
| 817 |
| 795 static StructWithHandleCalledHandles deserialize(bindings.Message message) { | 818 static StructWithHandleCalledHandles deserialize(bindings.Message message) { |
| 796 var decoder = new bindings.Decoder(message); | 819 var decoder = new bindings.Decoder(message); |
| 797 var result = decode(decoder); | 820 var result = decode(decoder); |
| 798 if (decoder.excessHandles != null) { | 821 if (decoder.excessHandles != null) { |
| 799 decoder.excessHandles.forEach((h) => h.close()); | 822 decoder.excessHandles.forEach((h) => h.close()); |
| 800 } | 823 } |
| 801 return result; | 824 return result; |
| 802 } | 825 } |
| 803 | 826 |
| 804 static StructWithHandleCalledHandles decode(bindings.Decoder decoder0) { | 827 static StructWithHandleCalledHandles decode(bindings.Decoder decoder0) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 | 879 |
| 857 | 880 |
| 858 class StructWithArrayOfHandlesCalledHandles extends bindings.Struct { | 881 class StructWithArrayOfHandlesCalledHandles extends bindings.Struct { |
| 859 static const List<bindings.StructDataHeader> kVersions = const [ | 882 static const List<bindings.StructDataHeader> kVersions = const [ |
| 860 const bindings.StructDataHeader(16, 0) | 883 const bindings.StructDataHeader(16, 0) |
| 861 ]; | 884 ]; |
| 862 List<core.MojoHandle> handles = null; | 885 List<core.MojoHandle> handles = null; |
| 863 | 886 |
| 864 StructWithArrayOfHandlesCalledHandles() : super(kVersions.last.size); | 887 StructWithArrayOfHandlesCalledHandles() : super(kVersions.last.size); |
| 865 | 888 |
| 889 StructWithArrayOfHandlesCalledHandles.init( |
| 890 List<core.MojoHandle> this.handles |
| 891 ) : super(kVersions.last.size); |
| 892 |
| 866 static StructWithArrayOfHandlesCalledHandles deserialize(bindings.Message mess
age) { | 893 static StructWithArrayOfHandlesCalledHandles deserialize(bindings.Message mess
age) { |
| 867 var decoder = new bindings.Decoder(message); | 894 var decoder = new bindings.Decoder(message); |
| 868 var result = decode(decoder); | 895 var result = decode(decoder); |
| 869 if (decoder.excessHandles != null) { | 896 if (decoder.excessHandles != null) { |
| 870 decoder.excessHandles.forEach((h) => h.close()); | 897 decoder.excessHandles.forEach((h) => h.close()); |
| 871 } | 898 } |
| 872 return result; | 899 return result; |
| 873 } | 900 } |
| 874 | 901 |
| 875 static StructWithArrayOfHandlesCalledHandles decode(bindings.Decoder decoder0)
{ | 902 static StructWithArrayOfHandlesCalledHandles decode(bindings.Decoder decoder0)
{ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 | 954 |
| 928 | 955 |
| 929 class StructWithInterfaceCalledHandles extends bindings.Struct { | 956 class StructWithInterfaceCalledHandles extends bindings.Struct { |
| 930 static const List<bindings.StructDataHeader> kVersions = const [ | 957 static const List<bindings.StructDataHeader> kVersions = const [ |
| 931 const bindings.StructDataHeader(16, 0) | 958 const bindings.StructDataHeader(16, 0) |
| 932 ]; | 959 ]; |
| 933 TestInterfaceInterface handles = null; | 960 TestInterfaceInterface handles = null; |
| 934 | 961 |
| 935 StructWithInterfaceCalledHandles() : super(kVersions.last.size); | 962 StructWithInterfaceCalledHandles() : super(kVersions.last.size); |
| 936 | 963 |
| 964 StructWithInterfaceCalledHandles.init( |
| 965 TestInterfaceInterface this.handles |
| 966 ) : super(kVersions.last.size); |
| 967 |
| 937 static StructWithInterfaceCalledHandles deserialize(bindings.Message message)
{ | 968 static StructWithInterfaceCalledHandles deserialize(bindings.Message message)
{ |
| 938 var decoder = new bindings.Decoder(message); | 969 var decoder = new bindings.Decoder(message); |
| 939 var result = decode(decoder); | 970 var result = decode(decoder); |
| 940 if (decoder.excessHandles != null) { | 971 if (decoder.excessHandles != null) { |
| 941 decoder.excessHandles.forEach((h) => h.close()); | 972 decoder.excessHandles.forEach((h) => h.close()); |
| 942 } | 973 } |
| 943 return result; | 974 return result; |
| 944 } | 975 } |
| 945 | 976 |
| 946 static StructWithInterfaceCalledHandles decode(bindings.Decoder decoder0) { | 977 static StructWithInterfaceCalledHandles decode(bindings.Decoder decoder0) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 | 1029 |
| 999 | 1030 |
| 1000 class ContainsArrayOfEnum extends bindings.Struct { | 1031 class ContainsArrayOfEnum extends bindings.Struct { |
| 1001 static const List<bindings.StructDataHeader> kVersions = const [ | 1032 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1002 const bindings.StructDataHeader(16, 0) | 1033 const bindings.StructDataHeader(16, 0) |
| 1003 ]; | 1034 ]; |
| 1004 List<NormalEnum> arrayOfEnums = null; | 1035 List<NormalEnum> arrayOfEnums = null; |
| 1005 | 1036 |
| 1006 ContainsArrayOfEnum() : super(kVersions.last.size); | 1037 ContainsArrayOfEnum() : super(kVersions.last.size); |
| 1007 | 1038 |
| 1039 ContainsArrayOfEnum.init( |
| 1040 List<NormalEnum> this.arrayOfEnums |
| 1041 ) : super(kVersions.last.size); |
| 1042 |
| 1008 static ContainsArrayOfEnum deserialize(bindings.Message message) { | 1043 static ContainsArrayOfEnum deserialize(bindings.Message message) { |
| 1009 var decoder = new bindings.Decoder(message); | 1044 var decoder = new bindings.Decoder(message); |
| 1010 var result = decode(decoder); | 1045 var result = decode(decoder); |
| 1011 if (decoder.excessHandles != null) { | 1046 if (decoder.excessHandles != null) { |
| 1012 decoder.excessHandles.forEach((h) => h.close()); | 1047 decoder.excessHandles.forEach((h) => h.close()); |
| 1013 } | 1048 } |
| 1014 return result; | 1049 return result; |
| 1015 } | 1050 } |
| 1016 | 1051 |
| 1017 static ContainsArrayOfEnum decode(bindings.Decoder decoder0) { | 1052 static ContainsArrayOfEnum decode(bindings.Decoder decoder0) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 } | 1116 } |
| 1082 | 1117 |
| 1083 | 1118 |
| 1084 class _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams extend
s bindings.Struct { | 1119 class _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams extend
s bindings.Struct { |
| 1085 static const List<bindings.StructDataHeader> kVersions = const [ | 1120 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1086 const bindings.StructDataHeader(8, 0) | 1121 const bindings.StructDataHeader(8, 0) |
| 1087 ]; | 1122 ]; |
| 1088 | 1123 |
| 1089 _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams() : super(
kVersions.last.size); | 1124 _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams() : super(
kVersions.last.size); |
| 1090 | 1125 |
| 1126 _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams.init( |
| 1127 ) : super(kVersions.last.size); |
| 1128 |
| 1091 static _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams des
erialize(bindings.Message message) { | 1129 static _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams des
erialize(bindings.Message message) { |
| 1092 var decoder = new bindings.Decoder(message); | 1130 var decoder = new bindings.Decoder(message); |
| 1093 var result = decode(decoder); | 1131 var result = decode(decoder); |
| 1094 if (decoder.excessHandles != null) { | 1132 if (decoder.excessHandles != null) { |
| 1095 decoder.excessHandles.forEach((h) => h.close()); | 1133 decoder.excessHandles.forEach((h) => h.close()); |
| 1096 } | 1134 } |
| 1097 return result; | 1135 return result; |
| 1098 } | 1136 } |
| 1099 | 1137 |
| 1100 static _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams dec
ode(bindings.Decoder decoder0) { | 1138 static _CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseParams dec
ode(bindings.Decoder decoder0) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 } | 1177 } |
| 1140 | 1178 |
| 1141 | 1179 |
| 1142 class CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponseParams
extends bindings.Struct { | 1180 class CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponseParams
extends bindings.Struct { |
| 1143 static const List<bindings.StructDataHeader> kVersions = const [ | 1181 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1144 const bindings.StructDataHeader(8, 0) | 1182 const bindings.StructDataHeader(8, 0) |
| 1145 ]; | 1183 ]; |
| 1146 | 1184 |
| 1147 CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponseParams() :
super(kVersions.last.size); | 1185 CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponseParams() :
super(kVersions.last.size); |
| 1148 | 1186 |
| 1187 CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponseParams.ini
t( |
| 1188 ) : super(kVersions.last.size); |
| 1189 |
| 1149 static CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponsePar
ams deserialize(bindings.Message message) { | 1190 static CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponsePar
ams deserialize(bindings.Message message) { |
| 1150 var decoder = new bindings.Decoder(message); | 1191 var decoder = new bindings.Decoder(message); |
| 1151 var result = decode(decoder); | 1192 var result = decode(decoder); |
| 1152 if (decoder.excessHandles != null) { | 1193 if (decoder.excessHandles != null) { |
| 1153 decoder.excessHandles.forEach((h) => h.close()); | 1194 decoder.excessHandles.forEach((h) => h.close()); |
| 1154 } | 1195 } |
| 1155 return result; | 1196 return result; |
| 1156 } | 1197 } |
| 1157 | 1198 |
| 1158 static CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponsePar
ams decode(bindings.Decoder decoder0) { | 1199 static CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponsePar
ams decode(bindings.Decoder decoder0) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 | 1239 |
| 1199 | 1240 |
| 1200 class _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams extends b
indings.Struct { | 1241 class _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams extends b
indings.Struct { |
| 1201 static const List<bindings.StructDataHeader> kVersions = const [ | 1242 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1202 const bindings.StructDataHeader(16, 0) | 1243 const bindings.StructDataHeader(16, 0) |
| 1203 ]; | 1244 ]; |
| 1204 bool b = false; | 1245 bool b = false; |
| 1205 | 1246 |
| 1206 _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams() : super(kVe
rsions.last.size); | 1247 _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams() : super(kVe
rsions.last.size); |
| 1207 | 1248 |
| 1249 _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams.init( |
| 1250 bool this.b |
| 1251 ) : super(kVersions.last.size); |
| 1252 |
| 1208 static _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams deseri
alize(bindings.Message message) { | 1253 static _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams deseri
alize(bindings.Message message) { |
| 1209 var decoder = new bindings.Decoder(message); | 1254 var decoder = new bindings.Decoder(message); |
| 1210 var result = decode(decoder); | 1255 var result = decode(decoder); |
| 1211 if (decoder.excessHandles != null) { | 1256 if (decoder.excessHandles != null) { |
| 1212 decoder.excessHandles.forEach((h) => h.close()); | 1257 decoder.excessHandles.forEach((h) => h.close()); |
| 1213 } | 1258 } |
| 1214 return result; | 1259 return result; |
| 1215 } | 1260 } |
| 1216 | 1261 |
| 1217 static _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams decode
(bindings.Decoder decoder0) { | 1262 static _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseParams decode
(bindings.Decoder decoder0) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 } | 1314 } |
| 1270 | 1315 |
| 1271 | 1316 |
| 1272 class CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams ex
tends bindings.Struct { | 1317 class CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams ex
tends bindings.Struct { |
| 1273 static const List<bindings.StructDataHeader> kVersions = const [ | 1318 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1274 const bindings.StructDataHeader(8, 0) | 1319 const bindings.StructDataHeader(8, 0) |
| 1275 ]; | 1320 ]; |
| 1276 | 1321 |
| 1277 CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams() : su
per(kVersions.last.size); | 1322 CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams() : su
per(kVersions.last.size); |
| 1278 | 1323 |
| 1324 CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams.init( |
| 1325 ) : super(kVersions.last.size); |
| 1326 |
| 1279 static CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams
deserialize(bindings.Message message) { | 1327 static CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams
deserialize(bindings.Message message) { |
| 1280 var decoder = new bindings.Decoder(message); | 1328 var decoder = new bindings.Decoder(message); |
| 1281 var result = decode(decoder); | 1329 var result = decode(decoder); |
| 1282 if (decoder.excessHandles != null) { | 1330 if (decoder.excessHandles != null) { |
| 1283 decoder.excessHandles.forEach((h) => h.close()); | 1331 decoder.excessHandles.forEach((h) => h.close()); |
| 1284 } | 1332 } |
| 1285 return result; | 1333 return result; |
| 1286 } | 1334 } |
| 1287 | 1335 |
| 1288 static CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams
decode(bindings.Decoder decoder0) { | 1336 static CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams
decode(bindings.Decoder decoder0) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 | 1377 |
| 1330 class _CheckNameCollisionWithNameCollisionParams extends bindings.Struct { | 1378 class _CheckNameCollisionWithNameCollisionParams extends bindings.Struct { |
| 1331 static const List<bindings.StructDataHeader> kVersions = const [ | 1379 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1332 const bindings.StructDataHeader(16, 0) | 1380 const bindings.StructDataHeader(16, 0) |
| 1333 ]; | 1381 ]; |
| 1334 bool message = false; | 1382 bool message = false; |
| 1335 bool response = false; | 1383 bool response = false; |
| 1336 | 1384 |
| 1337 _CheckNameCollisionWithNameCollisionParams() : super(kVersions.last.size); | 1385 _CheckNameCollisionWithNameCollisionParams() : super(kVersions.last.size); |
| 1338 | 1386 |
| 1387 _CheckNameCollisionWithNameCollisionParams.init( |
| 1388 bool this.message, |
| 1389 bool this.response |
| 1390 ) : super(kVersions.last.size); |
| 1391 |
| 1339 static _CheckNameCollisionWithNameCollisionParams deserialize(bindings.Message
message) { | 1392 static _CheckNameCollisionWithNameCollisionParams deserialize(bindings.Message
message) { |
| 1340 var decoder = new bindings.Decoder(message); | 1393 var decoder = new bindings.Decoder(message); |
| 1341 var result = decode(decoder); | 1394 var result = decode(decoder); |
| 1342 if (decoder.excessHandles != null) { | 1395 if (decoder.excessHandles != null) { |
| 1343 decoder.excessHandles.forEach((h) => h.close()); | 1396 decoder.excessHandles.forEach((h) => h.close()); |
| 1344 } | 1397 } |
| 1345 return result; | 1398 return result; |
| 1346 } | 1399 } |
| 1347 | 1400 |
| 1348 static _CheckNameCollisionWithNameCollisionParams decode(bindings.Decoder deco
der0) { | 1401 static _CheckNameCollisionWithNameCollisionParams decode(bindings.Decoder deco
der0) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1415 | 1468 |
| 1416 class CheckNameCollisionWithNameCollisionResponseParams extends bindings.Struct
{ | 1469 class CheckNameCollisionWithNameCollisionResponseParams extends bindings.Struct
{ |
| 1417 static const List<bindings.StructDataHeader> kVersions = const [ | 1470 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1418 const bindings.StructDataHeader(16, 0) | 1471 const bindings.StructDataHeader(16, 0) |
| 1419 ]; | 1472 ]; |
| 1420 bool message = false; | 1473 bool message = false; |
| 1421 bool response = false; | 1474 bool response = false; |
| 1422 | 1475 |
| 1423 CheckNameCollisionWithNameCollisionResponseParams() : super(kVersions.last.siz
e); | 1476 CheckNameCollisionWithNameCollisionResponseParams() : super(kVersions.last.siz
e); |
| 1424 | 1477 |
| 1478 CheckNameCollisionWithNameCollisionResponseParams.init( |
| 1479 bool this.message, |
| 1480 bool this.response |
| 1481 ) : super(kVersions.last.size); |
| 1482 |
| 1425 static CheckNameCollisionWithNameCollisionResponseParams deserialize(bindings.
Message message) { | 1483 static CheckNameCollisionWithNameCollisionResponseParams deserialize(bindings.
Message message) { |
| 1426 var decoder = new bindings.Decoder(message); | 1484 var decoder = new bindings.Decoder(message); |
| 1427 var result = decode(decoder); | 1485 var result = decode(decoder); |
| 1428 if (decoder.excessHandles != null) { | 1486 if (decoder.excessHandles != null) { |
| 1429 decoder.excessHandles.forEach((h) => h.close()); | 1487 decoder.excessHandles.forEach((h) => h.close()); |
| 1430 } | 1488 } |
| 1431 return result; | 1489 return result; |
| 1432 } | 1490 } |
| 1433 | 1491 |
| 1434 static CheckNameCollisionWithNameCollisionResponseParams decode(bindings.Decod
er decoder0) { | 1492 static CheckNameCollisionWithNameCollisionResponseParams decode(bindings.Decod
er decoder0) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1500 | 1558 |
| 1501 | 1559 |
| 1502 class _CheckEnumCapsSetEnumWithInternalAllCapsParams extends bindings.Struct { | 1560 class _CheckEnumCapsSetEnumWithInternalAllCapsParams extends bindings.Struct { |
| 1503 static const List<bindings.StructDataHeader> kVersions = const [ | 1561 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1504 const bindings.StructDataHeader(16, 0) | 1562 const bindings.StructDataHeader(16, 0) |
| 1505 ]; | 1563 ]; |
| 1506 EnumWithInternalAllCaps e = null; | 1564 EnumWithInternalAllCaps e = null; |
| 1507 | 1565 |
| 1508 _CheckEnumCapsSetEnumWithInternalAllCapsParams() : super(kVersions.last.size); | 1566 _CheckEnumCapsSetEnumWithInternalAllCapsParams() : super(kVersions.last.size); |
| 1509 | 1567 |
| 1568 _CheckEnumCapsSetEnumWithInternalAllCapsParams.init( |
| 1569 EnumWithInternalAllCaps this.e |
| 1570 ) : super(kVersions.last.size); |
| 1571 |
| 1510 static _CheckEnumCapsSetEnumWithInternalAllCapsParams deserialize(bindings.Mes
sage message) { | 1572 static _CheckEnumCapsSetEnumWithInternalAllCapsParams deserialize(bindings.Mes
sage message) { |
| 1511 var decoder = new bindings.Decoder(message); | 1573 var decoder = new bindings.Decoder(message); |
| 1512 var result = decode(decoder); | 1574 var result = decode(decoder); |
| 1513 if (decoder.excessHandles != null) { | 1575 if (decoder.excessHandles != null) { |
| 1514 decoder.excessHandles.forEach((h) => h.close()); | 1576 decoder.excessHandles.forEach((h) => h.close()); |
| 1515 } | 1577 } |
| 1516 return result; | 1578 return result; |
| 1517 } | 1579 } |
| 1518 | 1580 |
| 1519 static _CheckEnumCapsSetEnumWithInternalAllCapsParams decode(bindings.Decoder
decoder0) { | 1581 static _CheckEnumCapsSetEnumWithInternalAllCapsParams decode(bindings.Decoder
decoder0) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 } | 1637 } |
| 1576 | 1638 |
| 1577 | 1639 |
| 1578 class _TestInterfaceSomeMessageParams extends bindings.Struct { | 1640 class _TestInterfaceSomeMessageParams extends bindings.Struct { |
| 1579 static const List<bindings.StructDataHeader> kVersions = const [ | 1641 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1580 const bindings.StructDataHeader(8, 0) | 1642 const bindings.StructDataHeader(8, 0) |
| 1581 ]; | 1643 ]; |
| 1582 | 1644 |
| 1583 _TestInterfaceSomeMessageParams() : super(kVersions.last.size); | 1645 _TestInterfaceSomeMessageParams() : super(kVersions.last.size); |
| 1584 | 1646 |
| 1647 _TestInterfaceSomeMessageParams.init( |
| 1648 ) : super(kVersions.last.size); |
| 1649 |
| 1585 static _TestInterfaceSomeMessageParams deserialize(bindings.Message message) { | 1650 static _TestInterfaceSomeMessageParams deserialize(bindings.Message message) { |
| 1586 var decoder = new bindings.Decoder(message); | 1651 var decoder = new bindings.Decoder(message); |
| 1587 var result = decode(decoder); | 1652 var result = decode(decoder); |
| 1588 if (decoder.excessHandles != null) { | 1653 if (decoder.excessHandles != null) { |
| 1589 decoder.excessHandles.forEach((h) => h.close()); | 1654 decoder.excessHandles.forEach((h) => h.close()); |
| 1590 } | 1655 } |
| 1591 return result; | 1656 return result; |
| 1592 } | 1657 } |
| 1593 | 1658 |
| 1594 static _TestInterfaceSomeMessageParams decode(bindings.Decoder decoder0) { | 1659 static _TestInterfaceSomeMessageParams decode(bindings.Decoder decoder0) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1634 | 1699 |
| 1635 | 1700 |
| 1636 class _Regression551GetParams extends bindings.Struct { | 1701 class _Regression551GetParams extends bindings.Struct { |
| 1637 static const List<bindings.StructDataHeader> kVersions = const [ | 1702 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1638 const bindings.StructDataHeader(16, 0) | 1703 const bindings.StructDataHeader(16, 0) |
| 1639 ]; | 1704 ]; |
| 1640 List<String> keyPrefixes = null; | 1705 List<String> keyPrefixes = null; |
| 1641 | 1706 |
| 1642 _Regression551GetParams() : super(kVersions.last.size); | 1707 _Regression551GetParams() : super(kVersions.last.size); |
| 1643 | 1708 |
| 1709 _Regression551GetParams.init( |
| 1710 List<String> this.keyPrefixes |
| 1711 ) : super(kVersions.last.size); |
| 1712 |
| 1644 static _Regression551GetParams deserialize(bindings.Message message) { | 1713 static _Regression551GetParams deserialize(bindings.Message message) { |
| 1645 var decoder = new bindings.Decoder(message); | 1714 var decoder = new bindings.Decoder(message); |
| 1646 var result = decode(decoder); | 1715 var result = decode(decoder); |
| 1647 if (decoder.excessHandles != null) { | 1716 if (decoder.excessHandles != null) { |
| 1648 decoder.excessHandles.forEach((h) => h.close()); | 1717 decoder.excessHandles.forEach((h) => h.close()); |
| 1649 } | 1718 } |
| 1650 return result; | 1719 return result; |
| 1651 } | 1720 } |
| 1652 | 1721 |
| 1653 static _Regression551GetParams decode(bindings.Decoder decoder0) { | 1722 static _Regression551GetParams decode(bindings.Decoder decoder0) { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 | 1790 |
| 1722 | 1791 |
| 1723 class Regression551GetResponseParams extends bindings.Struct { | 1792 class Regression551GetResponseParams extends bindings.Struct { |
| 1724 static const List<bindings.StructDataHeader> kVersions = const [ | 1793 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1725 const bindings.StructDataHeader(16, 0) | 1794 const bindings.StructDataHeader(16, 0) |
| 1726 ]; | 1795 ]; |
| 1727 int result = 0; | 1796 int result = 0; |
| 1728 | 1797 |
| 1729 Regression551GetResponseParams() : super(kVersions.last.size); | 1798 Regression551GetResponseParams() : super(kVersions.last.size); |
| 1730 | 1799 |
| 1800 Regression551GetResponseParams.init( |
| 1801 int this.result |
| 1802 ) : super(kVersions.last.size); |
| 1803 |
| 1731 static Regression551GetResponseParams deserialize(bindings.Message message) { | 1804 static Regression551GetResponseParams deserialize(bindings.Message message) { |
| 1732 var decoder = new bindings.Decoder(message); | 1805 var decoder = new bindings.Decoder(message); |
| 1733 var result = decode(decoder); | 1806 var result = decode(decoder); |
| 1734 if (decoder.excessHandles != null) { | 1807 if (decoder.excessHandles != null) { |
| 1735 decoder.excessHandles.forEach((h) => h.close()); | 1808 decoder.excessHandles.forEach((h) => h.close()); |
| 1736 } | 1809 } |
| 1737 return result; | 1810 return result; |
| 1738 } | 1811 } |
| 1739 | 1812 |
| 1740 static Regression551GetResponseParams decode(bindings.Decoder decoder0) { | 1813 static Regression551GetResponseParams decode(bindings.Decoder decoder0) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 } | 1865 } |
| 1793 | 1866 |
| 1794 | 1867 |
| 1795 class _ServiceNameServiceNameParams extends bindings.Struct { | 1868 class _ServiceNameServiceNameParams extends bindings.Struct { |
| 1796 static const List<bindings.StructDataHeader> kVersions = const [ | 1869 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1797 const bindings.StructDataHeader(8, 0) | 1870 const bindings.StructDataHeader(8, 0) |
| 1798 ]; | 1871 ]; |
| 1799 | 1872 |
| 1800 _ServiceNameServiceNameParams() : super(kVersions.last.size); | 1873 _ServiceNameServiceNameParams() : super(kVersions.last.size); |
| 1801 | 1874 |
| 1875 _ServiceNameServiceNameParams.init( |
| 1876 ) : super(kVersions.last.size); |
| 1877 |
| 1802 static _ServiceNameServiceNameParams deserialize(bindings.Message message) { | 1878 static _ServiceNameServiceNameParams deserialize(bindings.Message message) { |
| 1803 var decoder = new bindings.Decoder(message); | 1879 var decoder = new bindings.Decoder(message); |
| 1804 var result = decode(decoder); | 1880 var result = decode(decoder); |
| 1805 if (decoder.excessHandles != null) { | 1881 if (decoder.excessHandles != null) { |
| 1806 decoder.excessHandles.forEach((h) => h.close()); | 1882 decoder.excessHandles.forEach((h) => h.close()); |
| 1807 } | 1883 } |
| 1808 return result; | 1884 return result; |
| 1809 } | 1885 } |
| 1810 | 1886 |
| 1811 static _ServiceNameServiceNameParams decode(bindings.Decoder decoder0) { | 1887 static _ServiceNameServiceNameParams decode(bindings.Decoder decoder0) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 | 1927 |
| 1852 | 1928 |
| 1853 class ServiceNameServiceNameResponseParams extends bindings.Struct { | 1929 class ServiceNameServiceNameResponseParams extends bindings.Struct { |
| 1854 static const List<bindings.StructDataHeader> kVersions = const [ | 1930 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1855 const bindings.StructDataHeader(16, 0) | 1931 const bindings.StructDataHeader(16, 0) |
| 1856 ]; | 1932 ]; |
| 1857 String serviceName_ = null; | 1933 String serviceName_ = null; |
| 1858 | 1934 |
| 1859 ServiceNameServiceNameResponseParams() : super(kVersions.last.size); | 1935 ServiceNameServiceNameResponseParams() : super(kVersions.last.size); |
| 1860 | 1936 |
| 1937 ServiceNameServiceNameResponseParams.init( |
| 1938 String this.serviceName_ |
| 1939 ) : super(kVersions.last.size); |
| 1940 |
| 1861 static ServiceNameServiceNameResponseParams deserialize(bindings.Message messa
ge) { | 1941 static ServiceNameServiceNameResponseParams deserialize(bindings.Message messa
ge) { |
| 1862 var decoder = new bindings.Decoder(message); | 1942 var decoder = new bindings.Decoder(message); |
| 1863 var result = decode(decoder); | 1943 var result = decode(decoder); |
| 1864 if (decoder.excessHandles != null) { | 1944 if (decoder.excessHandles != null) { |
| 1865 decoder.excessHandles.forEach((h) => h.close()); | 1945 decoder.excessHandles.forEach((h) => h.close()); |
| 1866 } | 1946 } |
| 1867 return result; | 1947 return result; |
| 1868 } | 1948 } |
| 1869 | 1949 |
| 1870 static ServiceNameServiceNameResponseParams decode(bindings.Decoder decoder0)
{ | 1950 static ServiceNameServiceNameResponseParams decode(bindings.Decoder decoder0)
{ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1918 Map map = new Map(); | 1998 Map map = new Map(); |
| 1919 map["serviceName_"] = serviceName_; | 1999 map["serviceName_"] = serviceName_; |
| 1920 return map; | 2000 return map; |
| 1921 } | 2001 } |
| 1922 } | 2002 } |
| 1923 | 2003 |
| 1924 const int _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseNam
e = 0; | 2004 const int _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseNam
e = 0; |
| 1925 const int _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName =
1; | 2005 const int _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName =
1; |
| 1926 | 2006 |
| 1927 class _CheckMethodWithEmptyResponseServiceDescription implements service_describ
er.ServiceDescription { | 2007 class _CheckMethodWithEmptyResponseServiceDescription implements service_describ
er.ServiceDescription { |
| 1928 dynamic getTopLevelInterface([Function responseFactory]) => | 2008 void getTopLevelInterface(Function responder) { |
| 1929 responseFactory(null); | 2009 responder(null); |
| 2010 } |
| 1930 | 2011 |
| 1931 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2012 void getTypeDefinition(String typeKey, Function responder) { |
| 1932 responseFactory(null); | 2013 responder(null); |
| 2014 } |
| 1933 | 2015 |
| 1934 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2016 void getAllTypeDefinitions(Function responder) { |
| 1935 responseFactory(null); | 2017 responder(null); |
| 2018 } |
| 1936 } | 2019 } |
| 1937 | 2020 |
| 1938 abstract class CheckMethodWithEmptyResponse { | 2021 abstract class CheckMethodWithEmptyResponse { |
| 1939 static const String serviceName = null; | 2022 static const String serviceName = null; |
| 1940 | 2023 |
| 1941 static service_describer.ServiceDescription _cachedServiceDescription; | 2024 static service_describer.ServiceDescription _cachedServiceDescription; |
| 1942 static service_describer.ServiceDescription get serviceDescription { | 2025 static service_describer.ServiceDescription get serviceDescription { |
| 1943 if (_cachedServiceDescription == null) { | 2026 if (_cachedServiceDescription == null) { |
| 1944 _cachedServiceDescription = new _CheckMethodWithEmptyResponseServiceDescri
ption(); | 2027 _cachedServiceDescription = new _CheckMethodWithEmptyResponseServiceDescri
ption(); |
| 1945 } | 2028 } |
| 1946 return _cachedServiceDescription; | 2029 return _cachedServiceDescription; |
| 1947 } | 2030 } |
| 1948 | 2031 |
| 1949 static CheckMethodWithEmptyResponseProxy connectToService( | 2032 static CheckMethodWithEmptyResponseProxy connectToService( |
| 1950 bindings.ServiceConnector s, String url, [String serviceName]) { | 2033 bindings.ServiceConnector s, String url, [String serviceName]) { |
| 1951 CheckMethodWithEmptyResponseProxy p = new CheckMethodWithEmptyResponseProxy.
unbound(); | 2034 CheckMethodWithEmptyResponseProxy p = new CheckMethodWithEmptyResponseProxy.
unbound(); |
| 1952 String name = serviceName ?? CheckMethodWithEmptyResponse.serviceName; | 2035 String name = serviceName ?? CheckMethodWithEmptyResponse.serviceName; |
| 1953 if ((name == null) || name.isEmpty) { | 2036 if ((name == null) || name.isEmpty) { |
| 1954 throw new core.MojoApiError( | 2037 throw new core.MojoApiError( |
| 1955 "If an interface has no ServiceName, then one must be provided."); | 2038 "If an interface has no ServiceName, then one must be provided."); |
| 1956 } | 2039 } |
| 1957 s.connectToService(url, p, name); | 2040 s.connectToService(url, p, name); |
| 1958 return p; | 2041 return p; |
| 1959 } | 2042 } |
| 1960 dynamic withoutParameterAndEmptyResponse([Function responseFactory = null]); | 2043 void withoutParameterAndEmptyResponse(void callback()); |
| 1961 dynamic withParameterAndEmptyResponse(bool b,[Function responseFactory = null]
); | 2044 void withParameterAndEmptyResponse(bool b,void callback()); |
| 1962 } | 2045 } |
| 1963 | 2046 |
| 1964 abstract class CheckMethodWithEmptyResponseInterface | 2047 abstract class CheckMethodWithEmptyResponseInterface |
| 1965 implements bindings.MojoInterface<CheckMethodWithEmptyResponse>, | 2048 implements bindings.MojoInterface<CheckMethodWithEmptyResponse>, |
| 1966 CheckMethodWithEmptyResponse { | 2049 CheckMethodWithEmptyResponse { |
| 1967 factory CheckMethodWithEmptyResponseInterface([CheckMethodWithEmptyResponse im
pl]) => | 2050 factory CheckMethodWithEmptyResponseInterface([CheckMethodWithEmptyResponse im
pl]) => |
| 1968 new CheckMethodWithEmptyResponseStub.unbound(impl); | 2051 new CheckMethodWithEmptyResponseStub.unbound(impl); |
| 1969 | 2052 |
| 1970 factory CheckMethodWithEmptyResponseInterface.fromEndpoint( | 2053 factory CheckMethodWithEmptyResponseInterface.fromEndpoint( |
| 1971 core.MojoMessagePipeEndpoint endpoint, | 2054 core.MojoMessagePipeEndpoint endpoint, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2001 | 2084 |
| 2002 void handleResponse(bindings.ServiceMessage message) { | 2085 void handleResponse(bindings.ServiceMessage message) { |
| 2003 switch (message.header.type) { | 2086 switch (message.header.type) { |
| 2004 case _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseNa
me: | 2087 case _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseNa
me: |
| 2005 var r = CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResp
onseParams.deserialize( | 2088 var r = CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResp
onseParams.deserialize( |
| 2006 message.payload); | 2089 message.payload); |
| 2007 if (!message.header.hasRequestId) { | 2090 if (!message.header.hasRequestId) { |
| 2008 proxyError("Expected a message with a valid request Id."); | 2091 proxyError("Expected a message with a valid request Id."); |
| 2009 return; | 2092 return; |
| 2010 } | 2093 } |
| 2011 Completer c = completerMap[message.header.requestId]; | 2094 Function callback = callbackMap[message.header.requestId]; |
| 2012 if (c == null) { | 2095 if (callback == null) { |
| 2013 proxyError( | 2096 proxyError( |
| 2014 "Message had unknown request Id: ${message.header.requestId}"); | 2097 "Message had unknown request Id: ${message.header.requestId}"); |
| 2015 return; | 2098 return; |
| 2016 } | 2099 } |
| 2017 completerMap.remove(message.header.requestId); | 2100 callbackMap.remove(message.header.requestId); |
| 2018 if (c.isCompleted) { | 2101 callback(); |
| 2019 proxyError("Response completer already completed"); | |
| 2020 return; | |
| 2021 } | |
| 2022 c.complete(r); | |
| 2023 break; | 2102 break; |
| 2024 case _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName: | 2103 case _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName: |
| 2025 var r = CheckMethodWithEmptyResponseWithParameterAndEmptyResponseRespons
eParams.deserialize( | 2104 var r = CheckMethodWithEmptyResponseWithParameterAndEmptyResponseRespons
eParams.deserialize( |
| 2026 message.payload); | 2105 message.payload); |
| 2027 if (!message.header.hasRequestId) { | 2106 if (!message.header.hasRequestId) { |
| 2028 proxyError("Expected a message with a valid request Id."); | 2107 proxyError("Expected a message with a valid request Id."); |
| 2029 return; | 2108 return; |
| 2030 } | 2109 } |
| 2031 Completer c = completerMap[message.header.requestId]; | 2110 Function callback = callbackMap[message.header.requestId]; |
| 2032 if (c == null) { | 2111 if (callback == null) { |
| 2033 proxyError( | 2112 proxyError( |
| 2034 "Message had unknown request Id: ${message.header.requestId}"); | 2113 "Message had unknown request Id: ${message.header.requestId}"); |
| 2035 return; | 2114 return; |
| 2036 } | 2115 } |
| 2037 completerMap.remove(message.header.requestId); | 2116 callbackMap.remove(message.header.requestId); |
| 2038 if (c.isCompleted) { | 2117 callback(); |
| 2039 proxyError("Response completer already completed"); | |
| 2040 return; | |
| 2041 } | |
| 2042 c.complete(r); | |
| 2043 break; | 2118 break; |
| 2044 default: | 2119 default: |
| 2045 proxyError("Unexpected message type: ${message.header.type}"); | 2120 proxyError("Unexpected message type: ${message.header.type}"); |
| 2046 close(immediate: true); | 2121 close(immediate: true); |
| 2047 break; | 2122 break; |
| 2048 } | 2123 } |
| 2049 } | 2124 } |
| 2050 | 2125 |
| 2051 @override | 2126 @override |
| 2052 String toString() { | 2127 String toString() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2077 return newMockedProxy; | 2152 return newMockedProxy; |
| 2078 } | 2153 } |
| 2079 | 2154 |
| 2080 static CheckMethodWithEmptyResponseProxy newFromEndpoint( | 2155 static CheckMethodWithEmptyResponseProxy newFromEndpoint( |
| 2081 core.MojoMessagePipeEndpoint endpoint) { | 2156 core.MojoMessagePipeEndpoint endpoint) { |
| 2082 assert(endpoint.setDescription("For CheckMethodWithEmptyResponseProxy")); | 2157 assert(endpoint.setDescription("For CheckMethodWithEmptyResponseProxy")); |
| 2083 return new CheckMethodWithEmptyResponseProxy.fromEndpoint(endpoint); | 2158 return new CheckMethodWithEmptyResponseProxy.fromEndpoint(endpoint); |
| 2084 } | 2159 } |
| 2085 | 2160 |
| 2086 | 2161 |
| 2087 dynamic withoutParameterAndEmptyResponse([Function responseFactory = null]) { | 2162 void withoutParameterAndEmptyResponse(void callback()) { |
| 2088 if (impl != null) { | 2163 if (impl != null) { |
| 2089 return new Future(() => impl.withoutParameterAndEmptyResponse(_CheckMethod
WithEmptyResponseStubControl._checkMethodWithEmptyResponseWithoutParameterAndEmp
tyResponseResponseParamsFactory)); | 2164 impl.withoutParameterAndEmptyResponse(callback); |
| 2165 return; |
| 2090 } | 2166 } |
| 2091 var params = new _CheckMethodWithEmptyResponseWithoutParameterAndEmptyRespon
seParams(); | 2167 var params = new _CheckMethodWithEmptyResponseWithoutParameterAndEmptyRespon
seParams(); |
| 2092 return ctrl.sendMessageWithRequestId( | 2168 ctrl.sendMessageWithRequestId( |
| 2093 params, | 2169 params, |
| 2094 _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseName, | 2170 _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseName, |
| 2095 -1, | 2171 -1, |
| 2096 bindings.MessageHeader.kMessageExpectsResponse); | 2172 bindings.MessageHeader.kMessageExpectsResponse, |
| 2173 callback); |
| 2097 } | 2174 } |
| 2098 dynamic withParameterAndEmptyResponse(bool b,[Function responseFactory = null]
) { | 2175 void withParameterAndEmptyResponse(bool b,void callback()) { |
| 2099 if (impl != null) { | 2176 if (impl != null) { |
| 2100 return new Future(() => impl.withParameterAndEmptyResponse(b,_CheckMethodW
ithEmptyResponseStubControl._checkMethodWithEmptyResponseWithParameterAndEmptyRe
sponseResponseParamsFactory)); | 2177 impl.withParameterAndEmptyResponse(b,callback); |
| 2178 return; |
| 2101 } | 2179 } |
| 2102 var params = new _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseP
arams(); | 2180 var params = new _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseP
arams(); |
| 2103 params.b = b; | 2181 params.b = b; |
| 2104 return ctrl.sendMessageWithRequestId( | 2182 ctrl.sendMessageWithRequestId( |
| 2105 params, | 2183 params, |
| 2106 _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName, | 2184 _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName, |
| 2107 -1, | 2185 -1, |
| 2108 bindings.MessageHeader.kMessageExpectsResponse); | 2186 bindings.MessageHeader.kMessageExpectsResponse, |
| 2187 callback); |
| 2109 } | 2188 } |
| 2110 } | 2189 } |
| 2111 | 2190 |
| 2112 class _CheckMethodWithEmptyResponseStubControl | 2191 class _CheckMethodWithEmptyResponseStubControl |
| 2113 extends bindings.StubMessageHandler | 2192 extends bindings.StubMessageHandler |
| 2114 implements bindings.StubControl<CheckMethodWithEmptyResponse> { | 2193 implements bindings.StubControl<CheckMethodWithEmptyResponse> { |
| 2115 CheckMethodWithEmptyResponse _impl; | 2194 CheckMethodWithEmptyResponse _impl; |
| 2116 | 2195 |
| 2117 _CheckMethodWithEmptyResponseStubControl.fromEndpoint( | 2196 _CheckMethodWithEmptyResponseStubControl.fromEndpoint( |
| 2118 core.MojoMessagePipeEndpoint endpoint, [CheckMethodWithEmptyResponse impl]
) | 2197 core.MojoMessagePipeEndpoint endpoint, [CheckMethodWithEmptyResponse impl]
) |
| 2119 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 2198 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
| 2120 _impl = impl; | 2199 _impl = impl; |
| 2121 } | 2200 } |
| 2122 | 2201 |
| 2123 _CheckMethodWithEmptyResponseStubControl.fromHandle( | 2202 _CheckMethodWithEmptyResponseStubControl.fromHandle( |
| 2124 core.MojoHandle handle, [CheckMethodWithEmptyResponse impl]) | 2203 core.MojoHandle handle, [CheckMethodWithEmptyResponse impl]) |
| 2125 : super.fromHandle(handle, autoBegin: impl != null) { | 2204 : super.fromHandle(handle, autoBegin: impl != null) { |
| 2126 _impl = impl; | 2205 _impl = impl; |
| 2127 } | 2206 } |
| 2128 | 2207 |
| 2129 _CheckMethodWithEmptyResponseStubControl.unbound([this._impl]) : super.unbound
(); | 2208 _CheckMethodWithEmptyResponseStubControl.unbound([this._impl]) : super.unbound
(); |
| 2130 | 2209 |
| 2131 String get serviceName => CheckMethodWithEmptyResponse.serviceName; | 2210 String get serviceName => CheckMethodWithEmptyResponse.serviceName; |
| 2132 | 2211 |
| 2133 | 2212 |
| 2134 static CheckMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponsePar
ams _checkMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponseParamsF
actory() { | 2213 Function _checkMethodWithEmptyResponseWithoutParameterAndEmptyResponseResponse
ParamsResponder( |
| 2135 var result = new CheckMethodWithEmptyResponseWithoutParameterAndEmptyRespons
eResponseParams(); | 2214 int requestId) { |
| 2136 return result; | 2215 return () { |
| 2216 var result = new CheckMethodWithEmptyResponseWithoutParameterAndEmptyRespo
nseResponseParams(); |
| 2217 sendResponse(buildResponseWithId( |
| 2218 result, |
| 2219 _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseNam
e, |
| 2220 requestId, |
| 2221 bindings.MessageHeader.kMessageIsResponse)); |
| 2222 }; |
| 2137 } | 2223 } |
| 2138 static CheckMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParams
_checkMethodWithEmptyResponseWithParameterAndEmptyResponseResponseParamsFactory
() { | 2224 Function _checkMethodWithEmptyResponseWithParameterAndEmptyResponseResponsePar
amsResponder( |
| 2139 var result = new CheckMethodWithEmptyResponseWithParameterAndEmptyResponseRe
sponseParams(); | 2225 int requestId) { |
| 2140 return result; | 2226 return () { |
| 2227 var result = new CheckMethodWithEmptyResponseWithParameterAndEmptyResponse
ResponseParams(); |
| 2228 sendResponse(buildResponseWithId( |
| 2229 result, |
| 2230 _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName, |
| 2231 requestId, |
| 2232 bindings.MessageHeader.kMessageIsResponse)); |
| 2233 }; |
| 2141 } | 2234 } |
| 2142 | 2235 |
| 2143 dynamic handleMessage(bindings.ServiceMessage message) { | 2236 void handleMessage(bindings.ServiceMessage message) { |
| 2144 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2237 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 2145 return bindings.ControlMessageHandler.handleMessage(this, | 2238 bindings.ControlMessageHandler.handleMessage( |
| 2146 0, | 2239 this, 0, message); |
| 2147 message); | 2240 return; |
| 2148 } | 2241 } |
| 2149 if (_impl == null) { | 2242 if (_impl == null) { |
| 2150 throw new core.MojoApiError("$this has no implementation set"); | 2243 throw new core.MojoApiError("$this has no implementation set"); |
| 2151 } | 2244 } |
| 2152 switch (message.header.type) { | 2245 switch (message.header.type) { |
| 2153 case _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseNa
me: | 2246 case _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyResponseNa
me: |
| 2154 var response = _impl.withoutParameterAndEmptyResponse(_checkMethodWithEm
ptyResponseWithoutParameterAndEmptyResponseResponseParamsFactory); | 2247 _impl.withoutParameterAndEmptyResponse(_checkMethodWithEmptyResponseWith
outParameterAndEmptyResponseResponseParamsResponder(message.header.requestId)); |
| 2155 if (response is Future) { | |
| 2156 return response.then((response) { | |
| 2157 if (response != null) { | |
| 2158 return buildResponseWithId( | |
| 2159 response, | |
| 2160 _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyRes
ponseName, | |
| 2161 message.header.requestId, | |
| 2162 bindings.MessageHeader.kMessageIsResponse); | |
| 2163 } | |
| 2164 }); | |
| 2165 } else if (response != null) { | |
| 2166 return buildResponseWithId( | |
| 2167 response, | |
| 2168 _checkMethodWithEmptyResponseMethodWithoutParameterAndEmptyRespons
eName, | |
| 2169 message.header.requestId, | |
| 2170 bindings.MessageHeader.kMessageIsResponse); | |
| 2171 } | |
| 2172 break; | 2248 break; |
| 2173 case _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName: | 2249 case _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseName: |
| 2174 var params = _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseP
arams.deserialize( | 2250 var params = _CheckMethodWithEmptyResponseWithParameterAndEmptyResponseP
arams.deserialize( |
| 2175 message.payload); | 2251 message.payload); |
| 2176 var response = _impl.withParameterAndEmptyResponse(params.b,_checkMethod
WithEmptyResponseWithParameterAndEmptyResponseResponseParamsFactory); | 2252 _impl.withParameterAndEmptyResponse(params.b, _checkMethodWithEmptyRespo
nseWithParameterAndEmptyResponseResponseParamsResponder(message.header.requestId
)); |
| 2177 if (response is Future) { | |
| 2178 return response.then((response) { | |
| 2179 if (response != null) { | |
| 2180 return buildResponseWithId( | |
| 2181 response, | |
| 2182 _checkMethodWithEmptyResponseMethodWithParameterAndEmptyRespon
seName, | |
| 2183 message.header.requestId, | |
| 2184 bindings.MessageHeader.kMessageIsResponse); | |
| 2185 } | |
| 2186 }); | |
| 2187 } else if (response != null) { | |
| 2188 return buildResponseWithId( | |
| 2189 response, | |
| 2190 _checkMethodWithEmptyResponseMethodWithParameterAndEmptyResponseNa
me, | |
| 2191 message.header.requestId, | |
| 2192 bindings.MessageHeader.kMessageIsResponse); | |
| 2193 } | |
| 2194 break; | 2253 break; |
| 2195 default: | 2254 default: |
| 2196 throw new bindings.MojoCodecError("Unexpected message name"); | 2255 throw new bindings.MojoCodecError("Unexpected message name"); |
| 2197 break; | 2256 break; |
| 2198 } | 2257 } |
| 2199 return null; | |
| 2200 } | 2258 } |
| 2201 | 2259 |
| 2202 CheckMethodWithEmptyResponse get impl => _impl; | 2260 CheckMethodWithEmptyResponse get impl => _impl; |
| 2203 set impl(CheckMethodWithEmptyResponse d) { | 2261 set impl(CheckMethodWithEmptyResponse d) { |
| 2204 if (d == null) { | 2262 if (d == null) { |
| 2205 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 2263 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 2206 } | 2264 } |
| 2207 if (isBound && (_impl == null)) { | 2265 if (isBound && (_impl == null)) { |
| 2208 beginHandlingEvents(); | 2266 beginHandlingEvents(); |
| 2209 } | 2267 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2243 core.MojoHandle handle, [CheckMethodWithEmptyResponse impl]) | 2301 core.MojoHandle handle, [CheckMethodWithEmptyResponse impl]) |
| 2244 : super(new _CheckMethodWithEmptyResponseStubControl.fromHandle(handle, im
pl)); | 2302 : super(new _CheckMethodWithEmptyResponseStubControl.fromHandle(handle, im
pl)); |
| 2245 | 2303 |
| 2246 static CheckMethodWithEmptyResponseStub newFromEndpoint( | 2304 static CheckMethodWithEmptyResponseStub newFromEndpoint( |
| 2247 core.MojoMessagePipeEndpoint endpoint) { | 2305 core.MojoMessagePipeEndpoint endpoint) { |
| 2248 assert(endpoint.setDescription("For CheckMethodWithEmptyResponseStub")); | 2306 assert(endpoint.setDescription("For CheckMethodWithEmptyResponseStub")); |
| 2249 return new CheckMethodWithEmptyResponseStub.fromEndpoint(endpoint); | 2307 return new CheckMethodWithEmptyResponseStub.fromEndpoint(endpoint); |
| 2250 } | 2308 } |
| 2251 | 2309 |
| 2252 | 2310 |
| 2253 dynamic withoutParameterAndEmptyResponse([Function responseFactory = null]) { | 2311 void withoutParameterAndEmptyResponse(void callback()) { |
| 2254 return impl.withoutParameterAndEmptyResponse(responseFactory); | 2312 return impl.withoutParameterAndEmptyResponse(callback); |
| 2255 } | 2313 } |
| 2256 dynamic withParameterAndEmptyResponse(bool b,[Function responseFactory = null]
) { | 2314 void withParameterAndEmptyResponse(bool b,void callback()) { |
| 2257 return impl.withParameterAndEmptyResponse(b,responseFactory); | 2315 return impl.withParameterAndEmptyResponse(b,callback); |
| 2258 } | 2316 } |
| 2259 } | 2317 } |
| 2260 | 2318 |
| 2261 const int _checkNameCollisionMethodWithNameCollisionName = 0; | 2319 const int _checkNameCollisionMethodWithNameCollisionName = 0; |
| 2262 | 2320 |
| 2263 class _CheckNameCollisionServiceDescription implements service_describer.Service
Description { | 2321 class _CheckNameCollisionServiceDescription implements service_describer.Service
Description { |
| 2264 dynamic getTopLevelInterface([Function responseFactory]) => | 2322 void getTopLevelInterface(Function responder) { |
| 2265 responseFactory(null); | 2323 responder(null); |
| 2324 } |
| 2266 | 2325 |
| 2267 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2326 void getTypeDefinition(String typeKey, Function responder) { |
| 2268 responseFactory(null); | 2327 responder(null); |
| 2328 } |
| 2269 | 2329 |
| 2270 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2330 void getAllTypeDefinitions(Function responder) { |
| 2271 responseFactory(null); | 2331 responder(null); |
| 2332 } |
| 2272 } | 2333 } |
| 2273 | 2334 |
| 2274 abstract class CheckNameCollision { | 2335 abstract class CheckNameCollision { |
| 2275 static const String serviceName = null; | 2336 static const String serviceName = null; |
| 2276 | 2337 |
| 2277 static service_describer.ServiceDescription _cachedServiceDescription; | 2338 static service_describer.ServiceDescription _cachedServiceDescription; |
| 2278 static service_describer.ServiceDescription get serviceDescription { | 2339 static service_describer.ServiceDescription get serviceDescription { |
| 2279 if (_cachedServiceDescription == null) { | 2340 if (_cachedServiceDescription == null) { |
| 2280 _cachedServiceDescription = new _CheckNameCollisionServiceDescription(); | 2341 _cachedServiceDescription = new _CheckNameCollisionServiceDescription(); |
| 2281 } | 2342 } |
| 2282 return _cachedServiceDescription; | 2343 return _cachedServiceDescription; |
| 2283 } | 2344 } |
| 2284 | 2345 |
| 2285 static CheckNameCollisionProxy connectToService( | 2346 static CheckNameCollisionProxy connectToService( |
| 2286 bindings.ServiceConnector s, String url, [String serviceName]) { | 2347 bindings.ServiceConnector s, String url, [String serviceName]) { |
| 2287 CheckNameCollisionProxy p = new CheckNameCollisionProxy.unbound(); | 2348 CheckNameCollisionProxy p = new CheckNameCollisionProxy.unbound(); |
| 2288 String name = serviceName ?? CheckNameCollision.serviceName; | 2349 String name = serviceName ?? CheckNameCollision.serviceName; |
| 2289 if ((name == null) || name.isEmpty) { | 2350 if ((name == null) || name.isEmpty) { |
| 2290 throw new core.MojoApiError( | 2351 throw new core.MojoApiError( |
| 2291 "If an interface has no ServiceName, then one must be provided."); | 2352 "If an interface has no ServiceName, then one must be provided."); |
| 2292 } | 2353 } |
| 2293 s.connectToService(url, p, name); | 2354 s.connectToService(url, p, name); |
| 2294 return p; | 2355 return p; |
| 2295 } | 2356 } |
| 2296 dynamic withNameCollision(bool message,bool response,[Function responseFactory
= null]); | 2357 void withNameCollision(bool message,bool response,void callback(bool message,
bool response)); |
| 2297 } | 2358 } |
| 2298 | 2359 |
| 2299 abstract class CheckNameCollisionInterface | 2360 abstract class CheckNameCollisionInterface |
| 2300 implements bindings.MojoInterface<CheckNameCollision>, | 2361 implements bindings.MojoInterface<CheckNameCollision>, |
| 2301 CheckNameCollision { | 2362 CheckNameCollision { |
| 2302 factory CheckNameCollisionInterface([CheckNameCollision impl]) => | 2363 factory CheckNameCollisionInterface([CheckNameCollision impl]) => |
| 2303 new CheckNameCollisionStub.unbound(impl); | 2364 new CheckNameCollisionStub.unbound(impl); |
| 2304 | 2365 |
| 2305 factory CheckNameCollisionInterface.fromEndpoint( | 2366 factory CheckNameCollisionInterface.fromEndpoint( |
| 2306 core.MojoMessagePipeEndpoint endpoint, | 2367 core.MojoMessagePipeEndpoint endpoint, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2336 | 2397 |
| 2337 void handleResponse(bindings.ServiceMessage message) { | 2398 void handleResponse(bindings.ServiceMessage message) { |
| 2338 switch (message.header.type) { | 2399 switch (message.header.type) { |
| 2339 case _checkNameCollisionMethodWithNameCollisionName: | 2400 case _checkNameCollisionMethodWithNameCollisionName: |
| 2340 var r = CheckNameCollisionWithNameCollisionResponseParams.deserialize( | 2401 var r = CheckNameCollisionWithNameCollisionResponseParams.deserialize( |
| 2341 message.payload); | 2402 message.payload); |
| 2342 if (!message.header.hasRequestId) { | 2403 if (!message.header.hasRequestId) { |
| 2343 proxyError("Expected a message with a valid request Id."); | 2404 proxyError("Expected a message with a valid request Id."); |
| 2344 return; | 2405 return; |
| 2345 } | 2406 } |
| 2346 Completer c = completerMap[message.header.requestId]; | 2407 Function callback = callbackMap[message.header.requestId]; |
| 2347 if (c == null) { | 2408 if (callback == null) { |
| 2348 proxyError( | 2409 proxyError( |
| 2349 "Message had unknown request Id: ${message.header.requestId}"); | 2410 "Message had unknown request Id: ${message.header.requestId}"); |
| 2350 return; | 2411 return; |
| 2351 } | 2412 } |
| 2352 completerMap.remove(message.header.requestId); | 2413 callbackMap.remove(message.header.requestId); |
| 2353 if (c.isCompleted) { | 2414 callback(r.message , r.response ); |
| 2354 proxyError("Response completer already completed"); | |
| 2355 return; | |
| 2356 } | |
| 2357 c.complete(r); | |
| 2358 break; | 2415 break; |
| 2359 default: | 2416 default: |
| 2360 proxyError("Unexpected message type: ${message.header.type}"); | 2417 proxyError("Unexpected message type: ${message.header.type}"); |
| 2361 close(immediate: true); | 2418 close(immediate: true); |
| 2362 break; | 2419 break; |
| 2363 } | 2420 } |
| 2364 } | 2421 } |
| 2365 | 2422 |
| 2366 @override | 2423 @override |
| 2367 String toString() { | 2424 String toString() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2392 return newMockedProxy; | 2449 return newMockedProxy; |
| 2393 } | 2450 } |
| 2394 | 2451 |
| 2395 static CheckNameCollisionProxy newFromEndpoint( | 2452 static CheckNameCollisionProxy newFromEndpoint( |
| 2396 core.MojoMessagePipeEndpoint endpoint) { | 2453 core.MojoMessagePipeEndpoint endpoint) { |
| 2397 assert(endpoint.setDescription("For CheckNameCollisionProxy")); | 2454 assert(endpoint.setDescription("For CheckNameCollisionProxy")); |
| 2398 return new CheckNameCollisionProxy.fromEndpoint(endpoint); | 2455 return new CheckNameCollisionProxy.fromEndpoint(endpoint); |
| 2399 } | 2456 } |
| 2400 | 2457 |
| 2401 | 2458 |
| 2402 dynamic withNameCollision(bool message,bool response,[Function responseFactory
= null]) { | 2459 void withNameCollision(bool message,bool response,void callback(bool message,
bool response)) { |
| 2403 if (impl != null) { | 2460 if (impl != null) { |
| 2404 return new Future(() => impl.withNameCollision(message,response,_CheckName
CollisionStubControl._checkNameCollisionWithNameCollisionResponseParamsFactory))
; | 2461 impl.withNameCollision(message,response,callback); |
| 2462 return; |
| 2405 } | 2463 } |
| 2406 var params = new _CheckNameCollisionWithNameCollisionParams(); | 2464 var params = new _CheckNameCollisionWithNameCollisionParams(); |
| 2407 params.message = message; | 2465 params.message = message; |
| 2408 params.response = response; | 2466 params.response = response; |
| 2409 return ctrl.sendMessageWithRequestId( | 2467 ctrl.sendMessageWithRequestId( |
| 2410 params, | 2468 params, |
| 2411 _checkNameCollisionMethodWithNameCollisionName, | 2469 _checkNameCollisionMethodWithNameCollisionName, |
| 2412 -1, | 2470 -1, |
| 2413 bindings.MessageHeader.kMessageExpectsResponse); | 2471 bindings.MessageHeader.kMessageExpectsResponse, |
| 2472 callback); |
| 2414 } | 2473 } |
| 2415 } | 2474 } |
| 2416 | 2475 |
| 2417 class _CheckNameCollisionStubControl | 2476 class _CheckNameCollisionStubControl |
| 2418 extends bindings.StubMessageHandler | 2477 extends bindings.StubMessageHandler |
| 2419 implements bindings.StubControl<CheckNameCollision> { | 2478 implements bindings.StubControl<CheckNameCollision> { |
| 2420 CheckNameCollision _impl; | 2479 CheckNameCollision _impl; |
| 2421 | 2480 |
| 2422 _CheckNameCollisionStubControl.fromEndpoint( | 2481 _CheckNameCollisionStubControl.fromEndpoint( |
| 2423 core.MojoMessagePipeEndpoint endpoint, [CheckNameCollision impl]) | 2482 core.MojoMessagePipeEndpoint endpoint, [CheckNameCollision impl]) |
| 2424 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 2483 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
| 2425 _impl = impl; | 2484 _impl = impl; |
| 2426 } | 2485 } |
| 2427 | 2486 |
| 2428 _CheckNameCollisionStubControl.fromHandle( | 2487 _CheckNameCollisionStubControl.fromHandle( |
| 2429 core.MojoHandle handle, [CheckNameCollision impl]) | 2488 core.MojoHandle handle, [CheckNameCollision impl]) |
| 2430 : super.fromHandle(handle, autoBegin: impl != null) { | 2489 : super.fromHandle(handle, autoBegin: impl != null) { |
| 2431 _impl = impl; | 2490 _impl = impl; |
| 2432 } | 2491 } |
| 2433 | 2492 |
| 2434 _CheckNameCollisionStubControl.unbound([this._impl]) : super.unbound(); | 2493 _CheckNameCollisionStubControl.unbound([this._impl]) : super.unbound(); |
| 2435 | 2494 |
| 2436 String get serviceName => CheckNameCollision.serviceName; | 2495 String get serviceName => CheckNameCollision.serviceName; |
| 2437 | 2496 |
| 2438 | 2497 |
| 2439 static CheckNameCollisionWithNameCollisionResponseParams _checkNameCollisionWi
thNameCollisionResponseParamsFactory(bool message, bool response) { | 2498 Function _checkNameCollisionWithNameCollisionResponseParamsResponder( |
| 2440 var result = new CheckNameCollisionWithNameCollisionResponseParams(); | 2499 int requestId) { |
| 2441 result.message = message; | 2500 return (bool message, bool response) { |
| 2442 result.response = response; | 2501 var result = new CheckNameCollisionWithNameCollisionResponseParams(); |
| 2443 return result; | 2502 result.message = message; |
| 2503 result.response = response; |
| 2504 sendResponse(buildResponseWithId( |
| 2505 result, |
| 2506 _checkNameCollisionMethodWithNameCollisionName, |
| 2507 requestId, |
| 2508 bindings.MessageHeader.kMessageIsResponse)); |
| 2509 }; |
| 2444 } | 2510 } |
| 2445 | 2511 |
| 2446 dynamic handleMessage(bindings.ServiceMessage message) { | 2512 void handleMessage(bindings.ServiceMessage message) { |
| 2447 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2513 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 2448 return bindings.ControlMessageHandler.handleMessage(this, | 2514 bindings.ControlMessageHandler.handleMessage( |
| 2449 0, | 2515 this, 0, message); |
| 2450 message); | 2516 return; |
| 2451 } | 2517 } |
| 2452 if (_impl == null) { | 2518 if (_impl == null) { |
| 2453 throw new core.MojoApiError("$this has no implementation set"); | 2519 throw new core.MojoApiError("$this has no implementation set"); |
| 2454 } | 2520 } |
| 2455 switch (message.header.type) { | 2521 switch (message.header.type) { |
| 2456 case _checkNameCollisionMethodWithNameCollisionName: | 2522 case _checkNameCollisionMethodWithNameCollisionName: |
| 2457 var params = _CheckNameCollisionWithNameCollisionParams.deserialize( | 2523 var params = _CheckNameCollisionWithNameCollisionParams.deserialize( |
| 2458 message.payload); | 2524 message.payload); |
| 2459 var response = _impl.withNameCollision(params.message,params.response,_c
heckNameCollisionWithNameCollisionResponseParamsFactory); | 2525 _impl.withNameCollision(params.message, params.response, _checkNameColli
sionWithNameCollisionResponseParamsResponder(message.header.requestId)); |
| 2460 if (response is Future) { | |
| 2461 return response.then((response) { | |
| 2462 if (response != null) { | |
| 2463 return buildResponseWithId( | |
| 2464 response, | |
| 2465 _checkNameCollisionMethodWithNameCollisionName, | |
| 2466 message.header.requestId, | |
| 2467 bindings.MessageHeader.kMessageIsResponse); | |
| 2468 } | |
| 2469 }); | |
| 2470 } else if (response != null) { | |
| 2471 return buildResponseWithId( | |
| 2472 response, | |
| 2473 _checkNameCollisionMethodWithNameCollisionName, | |
| 2474 message.header.requestId, | |
| 2475 bindings.MessageHeader.kMessageIsResponse); | |
| 2476 } | |
| 2477 break; | 2526 break; |
| 2478 default: | 2527 default: |
| 2479 throw new bindings.MojoCodecError("Unexpected message name"); | 2528 throw new bindings.MojoCodecError("Unexpected message name"); |
| 2480 break; | 2529 break; |
| 2481 } | 2530 } |
| 2482 return null; | |
| 2483 } | 2531 } |
| 2484 | 2532 |
| 2485 CheckNameCollision get impl => _impl; | 2533 CheckNameCollision get impl => _impl; |
| 2486 set impl(CheckNameCollision d) { | 2534 set impl(CheckNameCollision d) { |
| 2487 if (d == null) { | 2535 if (d == null) { |
| 2488 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 2536 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 2489 } | 2537 } |
| 2490 if (isBound && (_impl == null)) { | 2538 if (isBound && (_impl == null)) { |
| 2491 beginHandlingEvents(); | 2539 beginHandlingEvents(); |
| 2492 } | 2540 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2526 core.MojoHandle handle, [CheckNameCollision impl]) | 2574 core.MojoHandle handle, [CheckNameCollision impl]) |
| 2527 : super(new _CheckNameCollisionStubControl.fromHandle(handle, impl)); | 2575 : super(new _CheckNameCollisionStubControl.fromHandle(handle, impl)); |
| 2528 | 2576 |
| 2529 static CheckNameCollisionStub newFromEndpoint( | 2577 static CheckNameCollisionStub newFromEndpoint( |
| 2530 core.MojoMessagePipeEndpoint endpoint) { | 2578 core.MojoMessagePipeEndpoint endpoint) { |
| 2531 assert(endpoint.setDescription("For CheckNameCollisionStub")); | 2579 assert(endpoint.setDescription("For CheckNameCollisionStub")); |
| 2532 return new CheckNameCollisionStub.fromEndpoint(endpoint); | 2580 return new CheckNameCollisionStub.fromEndpoint(endpoint); |
| 2533 } | 2581 } |
| 2534 | 2582 |
| 2535 | 2583 |
| 2536 dynamic withNameCollision(bool message,bool response,[Function responseFactory
= null]) { | 2584 void withNameCollision(bool message,bool response,void callback(bool message,
bool response)) { |
| 2537 return impl.withNameCollision(message,response,responseFactory); | 2585 return impl.withNameCollision(message,response,callback); |
| 2538 } | 2586 } |
| 2539 } | 2587 } |
| 2540 | 2588 |
| 2541 const int _checkEnumCapsMethodSetEnumWithInternalAllCapsName = 0; | 2589 const int _checkEnumCapsMethodSetEnumWithInternalAllCapsName = 0; |
| 2542 | 2590 |
| 2543 class _CheckEnumCapsServiceDescription implements service_describer.ServiceDescr
iption { | 2591 class _CheckEnumCapsServiceDescription implements service_describer.ServiceDescr
iption { |
| 2544 dynamic getTopLevelInterface([Function responseFactory]) => | 2592 void getTopLevelInterface(Function responder) { |
| 2545 responseFactory(null); | 2593 responder(null); |
| 2594 } |
| 2546 | 2595 |
| 2547 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2596 void getTypeDefinition(String typeKey, Function responder) { |
| 2548 responseFactory(null); | 2597 responder(null); |
| 2598 } |
| 2549 | 2599 |
| 2550 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2600 void getAllTypeDefinitions(Function responder) { |
| 2551 responseFactory(null); | 2601 responder(null); |
| 2602 } |
| 2552 } | 2603 } |
| 2553 | 2604 |
| 2554 abstract class CheckEnumCaps { | 2605 abstract class CheckEnumCaps { |
| 2555 static const String serviceName = null; | 2606 static const String serviceName = null; |
| 2556 | 2607 |
| 2557 static service_describer.ServiceDescription _cachedServiceDescription; | 2608 static service_describer.ServiceDescription _cachedServiceDescription; |
| 2558 static service_describer.ServiceDescription get serviceDescription { | 2609 static service_describer.ServiceDescription get serviceDescription { |
| 2559 if (_cachedServiceDescription == null) { | 2610 if (_cachedServiceDescription == null) { |
| 2560 _cachedServiceDescription = new _CheckEnumCapsServiceDescription(); | 2611 _cachedServiceDescription = new _CheckEnumCapsServiceDescription(); |
| 2561 } | 2612 } |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2691 : super.fromHandle(handle, autoBegin: impl != null) { | 2742 : super.fromHandle(handle, autoBegin: impl != null) { |
| 2692 _impl = impl; | 2743 _impl = impl; |
| 2693 } | 2744 } |
| 2694 | 2745 |
| 2695 _CheckEnumCapsStubControl.unbound([this._impl]) : super.unbound(); | 2746 _CheckEnumCapsStubControl.unbound([this._impl]) : super.unbound(); |
| 2696 | 2747 |
| 2697 String get serviceName => CheckEnumCaps.serviceName; | 2748 String get serviceName => CheckEnumCaps.serviceName; |
| 2698 | 2749 |
| 2699 | 2750 |
| 2700 | 2751 |
| 2701 dynamic handleMessage(bindings.ServiceMessage message) { | 2752 void handleMessage(bindings.ServiceMessage message) { |
| 2702 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2753 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 2703 return bindings.ControlMessageHandler.handleMessage(this, | 2754 bindings.ControlMessageHandler.handleMessage( |
| 2704 0, | 2755 this, 0, message); |
| 2705 message); | 2756 return; |
| 2706 } | 2757 } |
| 2707 if (_impl == null) { | 2758 if (_impl == null) { |
| 2708 throw new core.MojoApiError("$this has no implementation set"); | 2759 throw new core.MojoApiError("$this has no implementation set"); |
| 2709 } | 2760 } |
| 2710 switch (message.header.type) { | 2761 switch (message.header.type) { |
| 2711 case _checkEnumCapsMethodSetEnumWithInternalAllCapsName: | 2762 case _checkEnumCapsMethodSetEnumWithInternalAllCapsName: |
| 2712 var params = _CheckEnumCapsSetEnumWithInternalAllCapsParams.deserialize( | 2763 var params = _CheckEnumCapsSetEnumWithInternalAllCapsParams.deserialize( |
| 2713 message.payload); | 2764 message.payload); |
| 2714 _impl.setEnumWithInternalAllCaps(params.e); | 2765 _impl.setEnumWithInternalAllCaps(params.e); |
| 2715 break; | 2766 break; |
| 2716 default: | 2767 default: |
| 2717 throw new bindings.MojoCodecError("Unexpected message name"); | 2768 throw new bindings.MojoCodecError("Unexpected message name"); |
| 2718 break; | 2769 break; |
| 2719 } | 2770 } |
| 2720 return null; | |
| 2721 } | 2771 } |
| 2722 | 2772 |
| 2723 CheckEnumCaps get impl => _impl; | 2773 CheckEnumCaps get impl => _impl; |
| 2724 set impl(CheckEnumCaps d) { | 2774 set impl(CheckEnumCaps d) { |
| 2725 if (d == null) { | 2775 if (d == null) { |
| 2726 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 2776 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 2727 } | 2777 } |
| 2728 if (isBound && (_impl == null)) { | 2778 if (isBound && (_impl == null)) { |
| 2729 beginHandlingEvents(); | 2779 beginHandlingEvents(); |
| 2730 } | 2780 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2772 | 2822 |
| 2773 | 2823 |
| 2774 void setEnumWithInternalAllCaps(EnumWithInternalAllCaps e) { | 2824 void setEnumWithInternalAllCaps(EnumWithInternalAllCaps e) { |
| 2775 return impl.setEnumWithInternalAllCaps(e); | 2825 return impl.setEnumWithInternalAllCaps(e); |
| 2776 } | 2826 } |
| 2777 } | 2827 } |
| 2778 | 2828 |
| 2779 const int _testInterfaceMethodSomeMessageName = 0; | 2829 const int _testInterfaceMethodSomeMessageName = 0; |
| 2780 | 2830 |
| 2781 class _TestInterfaceServiceDescription implements service_describer.ServiceDescr
iption { | 2831 class _TestInterfaceServiceDescription implements service_describer.ServiceDescr
iption { |
| 2782 dynamic getTopLevelInterface([Function responseFactory]) => | 2832 void getTopLevelInterface(Function responder) { |
| 2783 responseFactory(null); | 2833 responder(null); |
| 2834 } |
| 2784 | 2835 |
| 2785 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2836 void getTypeDefinition(String typeKey, Function responder) { |
| 2786 responseFactory(null); | 2837 responder(null); |
| 2838 } |
| 2787 | 2839 |
| 2788 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2840 void getAllTypeDefinitions(Function responder) { |
| 2789 responseFactory(null); | 2841 responder(null); |
| 2842 } |
| 2790 } | 2843 } |
| 2791 | 2844 |
| 2792 abstract class TestInterface { | 2845 abstract class TestInterface { |
| 2793 static const String serviceName = null; | 2846 static const String serviceName = null; |
| 2794 | 2847 |
| 2795 static service_describer.ServiceDescription _cachedServiceDescription; | 2848 static service_describer.ServiceDescription _cachedServiceDescription; |
| 2796 static service_describer.ServiceDescription get serviceDescription { | 2849 static service_describer.ServiceDescription get serviceDescription { |
| 2797 if (_cachedServiceDescription == null) { | 2850 if (_cachedServiceDescription == null) { |
| 2798 _cachedServiceDescription = new _TestInterfaceServiceDescription(); | 2851 _cachedServiceDescription = new _TestInterfaceServiceDescription(); |
| 2799 } | 2852 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2928 : super.fromHandle(handle, autoBegin: impl != null) { | 2981 : super.fromHandle(handle, autoBegin: impl != null) { |
| 2929 _impl = impl; | 2982 _impl = impl; |
| 2930 } | 2983 } |
| 2931 | 2984 |
| 2932 _TestInterfaceStubControl.unbound([this._impl]) : super.unbound(); | 2985 _TestInterfaceStubControl.unbound([this._impl]) : super.unbound(); |
| 2933 | 2986 |
| 2934 String get serviceName => TestInterface.serviceName; | 2987 String get serviceName => TestInterface.serviceName; |
| 2935 | 2988 |
| 2936 | 2989 |
| 2937 | 2990 |
| 2938 dynamic handleMessage(bindings.ServiceMessage message) { | 2991 void handleMessage(bindings.ServiceMessage message) { |
| 2939 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2992 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 2940 return bindings.ControlMessageHandler.handleMessage(this, | 2993 bindings.ControlMessageHandler.handleMessage( |
| 2941 0, | 2994 this, 0, message); |
| 2942 message); | 2995 return; |
| 2943 } | 2996 } |
| 2944 if (_impl == null) { | 2997 if (_impl == null) { |
| 2945 throw new core.MojoApiError("$this has no implementation set"); | 2998 throw new core.MojoApiError("$this has no implementation set"); |
| 2946 } | 2999 } |
| 2947 switch (message.header.type) { | 3000 switch (message.header.type) { |
| 2948 case _testInterfaceMethodSomeMessageName: | 3001 case _testInterfaceMethodSomeMessageName: |
| 2949 _impl.someMessage(); | 3002 _impl.someMessage(); |
| 2950 break; | 3003 break; |
| 2951 default: | 3004 default: |
| 2952 throw new bindings.MojoCodecError("Unexpected message name"); | 3005 throw new bindings.MojoCodecError("Unexpected message name"); |
| 2953 break; | 3006 break; |
| 2954 } | 3007 } |
| 2955 return null; | |
| 2956 } | 3008 } |
| 2957 | 3009 |
| 2958 TestInterface get impl => _impl; | 3010 TestInterface get impl => _impl; |
| 2959 set impl(TestInterface d) { | 3011 set impl(TestInterface d) { |
| 2960 if (d == null) { | 3012 if (d == null) { |
| 2961 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 3013 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 2962 } | 3014 } |
| 2963 if (isBound && (_impl == null)) { | 3015 if (isBound && (_impl == null)) { |
| 2964 beginHandlingEvents(); | 3016 beginHandlingEvents(); |
| 2965 } | 3017 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 | 3059 |
| 3008 | 3060 |
| 3009 void someMessage() { | 3061 void someMessage() { |
| 3010 return impl.someMessage(); | 3062 return impl.someMessage(); |
| 3011 } | 3063 } |
| 3012 } | 3064 } |
| 3013 | 3065 |
| 3014 const int _regression551MethodGetName = 0; | 3066 const int _regression551MethodGetName = 0; |
| 3015 | 3067 |
| 3016 class _Regression551ServiceDescription implements service_describer.ServiceDescr
iption { | 3068 class _Regression551ServiceDescription implements service_describer.ServiceDescr
iption { |
| 3017 dynamic getTopLevelInterface([Function responseFactory]) => | 3069 void getTopLevelInterface(Function responder) { |
| 3018 responseFactory(null); | 3070 responder(null); |
| 3071 } |
| 3019 | 3072 |
| 3020 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 3073 void getTypeDefinition(String typeKey, Function responder) { |
| 3021 responseFactory(null); | 3074 responder(null); |
| 3075 } |
| 3022 | 3076 |
| 3023 dynamic getAllTypeDefinitions([Function responseFactory]) => | 3077 void getAllTypeDefinitions(Function responder) { |
| 3024 responseFactory(null); | 3078 responder(null); |
| 3079 } |
| 3025 } | 3080 } |
| 3026 | 3081 |
| 3027 abstract class Regression551 { | 3082 abstract class Regression551 { |
| 3028 static const String serviceName = null; | 3083 static const String serviceName = null; |
| 3029 | 3084 |
| 3030 static service_describer.ServiceDescription _cachedServiceDescription; | 3085 static service_describer.ServiceDescription _cachedServiceDescription; |
| 3031 static service_describer.ServiceDescription get serviceDescription { | 3086 static service_describer.ServiceDescription get serviceDescription { |
| 3032 if (_cachedServiceDescription == null) { | 3087 if (_cachedServiceDescription == null) { |
| 3033 _cachedServiceDescription = new _Regression551ServiceDescription(); | 3088 _cachedServiceDescription = new _Regression551ServiceDescription(); |
| 3034 } | 3089 } |
| 3035 return _cachedServiceDescription; | 3090 return _cachedServiceDescription; |
| 3036 } | 3091 } |
| 3037 | 3092 |
| 3038 static Regression551Proxy connectToService( | 3093 static Regression551Proxy connectToService( |
| 3039 bindings.ServiceConnector s, String url, [String serviceName]) { | 3094 bindings.ServiceConnector s, String url, [String serviceName]) { |
| 3040 Regression551Proxy p = new Regression551Proxy.unbound(); | 3095 Regression551Proxy p = new Regression551Proxy.unbound(); |
| 3041 String name = serviceName ?? Regression551.serviceName; | 3096 String name = serviceName ?? Regression551.serviceName; |
| 3042 if ((name == null) || name.isEmpty) { | 3097 if ((name == null) || name.isEmpty) { |
| 3043 throw new core.MojoApiError( | 3098 throw new core.MojoApiError( |
| 3044 "If an interface has no ServiceName, then one must be provided."); | 3099 "If an interface has no ServiceName, then one must be provided."); |
| 3045 } | 3100 } |
| 3046 s.connectToService(url, p, name); | 3101 s.connectToService(url, p, name); |
| 3047 return p; | 3102 return p; |
| 3048 } | 3103 } |
| 3049 dynamic get(List<String> keyPrefixes,[Function responseFactory = null]); | 3104 void get(List<String> keyPrefixes,void callback(int result)); |
| 3050 } | 3105 } |
| 3051 | 3106 |
| 3052 abstract class Regression551Interface | 3107 abstract class Regression551Interface |
| 3053 implements bindings.MojoInterface<Regression551>, | 3108 implements bindings.MojoInterface<Regression551>, |
| 3054 Regression551 { | 3109 Regression551 { |
| 3055 factory Regression551Interface([Regression551 impl]) => | 3110 factory Regression551Interface([Regression551 impl]) => |
| 3056 new Regression551Stub.unbound(impl); | 3111 new Regression551Stub.unbound(impl); |
| 3057 | 3112 |
| 3058 factory Regression551Interface.fromEndpoint( | 3113 factory Regression551Interface.fromEndpoint( |
| 3059 core.MojoMessagePipeEndpoint endpoint, | 3114 core.MojoMessagePipeEndpoint endpoint, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3089 | 3144 |
| 3090 void handleResponse(bindings.ServiceMessage message) { | 3145 void handleResponse(bindings.ServiceMessage message) { |
| 3091 switch (message.header.type) { | 3146 switch (message.header.type) { |
| 3092 case _regression551MethodGetName: | 3147 case _regression551MethodGetName: |
| 3093 var r = Regression551GetResponseParams.deserialize( | 3148 var r = Regression551GetResponseParams.deserialize( |
| 3094 message.payload); | 3149 message.payload); |
| 3095 if (!message.header.hasRequestId) { | 3150 if (!message.header.hasRequestId) { |
| 3096 proxyError("Expected a message with a valid request Id."); | 3151 proxyError("Expected a message with a valid request Id."); |
| 3097 return; | 3152 return; |
| 3098 } | 3153 } |
| 3099 Completer c = completerMap[message.header.requestId]; | 3154 Function callback = callbackMap[message.header.requestId]; |
| 3100 if (c == null) { | 3155 if (callback == null) { |
| 3101 proxyError( | 3156 proxyError( |
| 3102 "Message had unknown request Id: ${message.header.requestId}"); | 3157 "Message had unknown request Id: ${message.header.requestId}"); |
| 3103 return; | 3158 return; |
| 3104 } | 3159 } |
| 3105 completerMap.remove(message.header.requestId); | 3160 callbackMap.remove(message.header.requestId); |
| 3106 if (c.isCompleted) { | 3161 callback(r.result ); |
| 3107 proxyError("Response completer already completed"); | |
| 3108 return; | |
| 3109 } | |
| 3110 c.complete(r); | |
| 3111 break; | 3162 break; |
| 3112 default: | 3163 default: |
| 3113 proxyError("Unexpected message type: ${message.header.type}"); | 3164 proxyError("Unexpected message type: ${message.header.type}"); |
| 3114 close(immediate: true); | 3165 close(immediate: true); |
| 3115 break; | 3166 break; |
| 3116 } | 3167 } |
| 3117 } | 3168 } |
| 3118 | 3169 |
| 3119 @override | 3170 @override |
| 3120 String toString() { | 3171 String toString() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 3145 return newMockedProxy; | 3196 return newMockedProxy; |
| 3146 } | 3197 } |
| 3147 | 3198 |
| 3148 static Regression551Proxy newFromEndpoint( | 3199 static Regression551Proxy newFromEndpoint( |
| 3149 core.MojoMessagePipeEndpoint endpoint) { | 3200 core.MojoMessagePipeEndpoint endpoint) { |
| 3150 assert(endpoint.setDescription("For Regression551Proxy")); | 3201 assert(endpoint.setDescription("For Regression551Proxy")); |
| 3151 return new Regression551Proxy.fromEndpoint(endpoint); | 3202 return new Regression551Proxy.fromEndpoint(endpoint); |
| 3152 } | 3203 } |
| 3153 | 3204 |
| 3154 | 3205 |
| 3155 dynamic get(List<String> keyPrefixes,[Function responseFactory = null]) { | 3206 void get(List<String> keyPrefixes,void callback(int result)) { |
| 3156 if (impl != null) { | 3207 if (impl != null) { |
| 3157 return new Future(() => impl.get(keyPrefixes,_Regression551StubControl._re
gression551GetResponseParamsFactory)); | 3208 impl.get(keyPrefixes,callback); |
| 3209 return; |
| 3158 } | 3210 } |
| 3159 var params = new _Regression551GetParams(); | 3211 var params = new _Regression551GetParams(); |
| 3160 params.keyPrefixes = keyPrefixes; | 3212 params.keyPrefixes = keyPrefixes; |
| 3161 return ctrl.sendMessageWithRequestId( | 3213 ctrl.sendMessageWithRequestId( |
| 3162 params, | 3214 params, |
| 3163 _regression551MethodGetName, | 3215 _regression551MethodGetName, |
| 3164 -1, | 3216 -1, |
| 3165 bindings.MessageHeader.kMessageExpectsResponse); | 3217 bindings.MessageHeader.kMessageExpectsResponse, |
| 3218 callback); |
| 3166 } | 3219 } |
| 3167 } | 3220 } |
| 3168 | 3221 |
| 3169 class _Regression551StubControl | 3222 class _Regression551StubControl |
| 3170 extends bindings.StubMessageHandler | 3223 extends bindings.StubMessageHandler |
| 3171 implements bindings.StubControl<Regression551> { | 3224 implements bindings.StubControl<Regression551> { |
| 3172 Regression551 _impl; | 3225 Regression551 _impl; |
| 3173 | 3226 |
| 3174 _Regression551StubControl.fromEndpoint( | 3227 _Regression551StubControl.fromEndpoint( |
| 3175 core.MojoMessagePipeEndpoint endpoint, [Regression551 impl]) | 3228 core.MojoMessagePipeEndpoint endpoint, [Regression551 impl]) |
| 3176 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 3229 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
| 3177 _impl = impl; | 3230 _impl = impl; |
| 3178 } | 3231 } |
| 3179 | 3232 |
| 3180 _Regression551StubControl.fromHandle( | 3233 _Regression551StubControl.fromHandle( |
| 3181 core.MojoHandle handle, [Regression551 impl]) | 3234 core.MojoHandle handle, [Regression551 impl]) |
| 3182 : super.fromHandle(handle, autoBegin: impl != null) { | 3235 : super.fromHandle(handle, autoBegin: impl != null) { |
| 3183 _impl = impl; | 3236 _impl = impl; |
| 3184 } | 3237 } |
| 3185 | 3238 |
| 3186 _Regression551StubControl.unbound([this._impl]) : super.unbound(); | 3239 _Regression551StubControl.unbound([this._impl]) : super.unbound(); |
| 3187 | 3240 |
| 3188 String get serviceName => Regression551.serviceName; | 3241 String get serviceName => Regression551.serviceName; |
| 3189 | 3242 |
| 3190 | 3243 |
| 3191 static Regression551GetResponseParams _regression551GetResponseParamsFactory(i
nt result) { | 3244 Function _regression551GetResponseParamsResponder( |
| 3192 var result = new Regression551GetResponseParams(); | 3245 int requestId) { |
| 3193 result.result = result; | 3246 return (int result) { |
| 3194 return result; | 3247 var result = new Regression551GetResponseParams(); |
| 3248 result.result = result; |
| 3249 sendResponse(buildResponseWithId( |
| 3250 result, |
| 3251 _regression551MethodGetName, |
| 3252 requestId, |
| 3253 bindings.MessageHeader.kMessageIsResponse)); |
| 3254 }; |
| 3195 } | 3255 } |
| 3196 | 3256 |
| 3197 dynamic handleMessage(bindings.ServiceMessage message) { | 3257 void handleMessage(bindings.ServiceMessage message) { |
| 3198 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 3258 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 3199 return bindings.ControlMessageHandler.handleMessage(this, | 3259 bindings.ControlMessageHandler.handleMessage( |
| 3200 0, | 3260 this, 0, message); |
| 3201 message); | 3261 return; |
| 3202 } | 3262 } |
| 3203 if (_impl == null) { | 3263 if (_impl == null) { |
| 3204 throw new core.MojoApiError("$this has no implementation set"); | 3264 throw new core.MojoApiError("$this has no implementation set"); |
| 3205 } | 3265 } |
| 3206 switch (message.header.type) { | 3266 switch (message.header.type) { |
| 3207 case _regression551MethodGetName: | 3267 case _regression551MethodGetName: |
| 3208 var params = _Regression551GetParams.deserialize( | 3268 var params = _Regression551GetParams.deserialize( |
| 3209 message.payload); | 3269 message.payload); |
| 3210 var response = _impl.get(params.keyPrefixes,_regression551GetResponsePar
amsFactory); | 3270 _impl.get(params.keyPrefixes, _regression551GetResponseParamsResponder(m
essage.header.requestId)); |
| 3211 if (response is Future) { | |
| 3212 return response.then((response) { | |
| 3213 if (response != null) { | |
| 3214 return buildResponseWithId( | |
| 3215 response, | |
| 3216 _regression551MethodGetName, | |
| 3217 message.header.requestId, | |
| 3218 bindings.MessageHeader.kMessageIsResponse); | |
| 3219 } | |
| 3220 }); | |
| 3221 } else if (response != null) { | |
| 3222 return buildResponseWithId( | |
| 3223 response, | |
| 3224 _regression551MethodGetName, | |
| 3225 message.header.requestId, | |
| 3226 bindings.MessageHeader.kMessageIsResponse); | |
| 3227 } | |
| 3228 break; | 3271 break; |
| 3229 default: | 3272 default: |
| 3230 throw new bindings.MojoCodecError("Unexpected message name"); | 3273 throw new bindings.MojoCodecError("Unexpected message name"); |
| 3231 break; | 3274 break; |
| 3232 } | 3275 } |
| 3233 return null; | |
| 3234 } | 3276 } |
| 3235 | 3277 |
| 3236 Regression551 get impl => _impl; | 3278 Regression551 get impl => _impl; |
| 3237 set impl(Regression551 d) { | 3279 set impl(Regression551 d) { |
| 3238 if (d == null) { | 3280 if (d == null) { |
| 3239 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 3281 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 3240 } | 3282 } |
| 3241 if (isBound && (_impl == null)) { | 3283 if (isBound && (_impl == null)) { |
| 3242 beginHandlingEvents(); | 3284 beginHandlingEvents(); |
| 3243 } | 3285 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3277 core.MojoHandle handle, [Regression551 impl]) | 3319 core.MojoHandle handle, [Regression551 impl]) |
| 3278 : super(new _Regression551StubControl.fromHandle(handle, impl)); | 3320 : super(new _Regression551StubControl.fromHandle(handle, impl)); |
| 3279 | 3321 |
| 3280 static Regression551Stub newFromEndpoint( | 3322 static Regression551Stub newFromEndpoint( |
| 3281 core.MojoMessagePipeEndpoint endpoint) { | 3323 core.MojoMessagePipeEndpoint endpoint) { |
| 3282 assert(endpoint.setDescription("For Regression551Stub")); | 3324 assert(endpoint.setDescription("For Regression551Stub")); |
| 3283 return new Regression551Stub.fromEndpoint(endpoint); | 3325 return new Regression551Stub.fromEndpoint(endpoint); |
| 3284 } | 3326 } |
| 3285 | 3327 |
| 3286 | 3328 |
| 3287 dynamic get(List<String> keyPrefixes,[Function responseFactory = null]) { | 3329 void get(List<String> keyPrefixes,void callback(int result)) { |
| 3288 return impl.get(keyPrefixes,responseFactory); | 3330 return impl.get(keyPrefixes,callback); |
| 3289 } | 3331 } |
| 3290 } | 3332 } |
| 3291 | 3333 |
| 3292 const int _serviceNameMethodServiceNameName = 0; | 3334 const int _serviceNameMethodServiceNameName = 0; |
| 3293 | 3335 |
| 3294 class _ServiceNameServiceDescription implements service_describer.ServiceDescrip
tion { | 3336 class _ServiceNameServiceDescription implements service_describer.ServiceDescrip
tion { |
| 3295 dynamic getTopLevelInterface([Function responseFactory]) => | 3337 void getTopLevelInterface(Function responder) { |
| 3296 responseFactory(null); | 3338 responder(null); |
| 3339 } |
| 3297 | 3340 |
| 3298 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 3341 void getTypeDefinition(String typeKey, Function responder) { |
| 3299 responseFactory(null); | 3342 responder(null); |
| 3343 } |
| 3300 | 3344 |
| 3301 dynamic getAllTypeDefinitions([Function responseFactory]) => | 3345 void getAllTypeDefinitions(Function responder) { |
| 3302 responseFactory(null); | 3346 responder(null); |
| 3347 } |
| 3303 } | 3348 } |
| 3304 | 3349 |
| 3305 abstract class ServiceName { | 3350 abstract class ServiceName { |
| 3306 static const String serviceName = null; | 3351 static const String serviceName = null; |
| 3307 | 3352 |
| 3308 static service_describer.ServiceDescription _cachedServiceDescription; | 3353 static service_describer.ServiceDescription _cachedServiceDescription; |
| 3309 static service_describer.ServiceDescription get serviceDescription { | 3354 static service_describer.ServiceDescription get serviceDescription { |
| 3310 if (_cachedServiceDescription == null) { | 3355 if (_cachedServiceDescription == null) { |
| 3311 _cachedServiceDescription = new _ServiceNameServiceDescription(); | 3356 _cachedServiceDescription = new _ServiceNameServiceDescription(); |
| 3312 } | 3357 } |
| 3313 return _cachedServiceDescription; | 3358 return _cachedServiceDescription; |
| 3314 } | 3359 } |
| 3315 | 3360 |
| 3316 static ServiceNameProxy connectToService( | 3361 static ServiceNameProxy connectToService( |
| 3317 bindings.ServiceConnector s, String url, [String serviceName]) { | 3362 bindings.ServiceConnector s, String url, [String serviceName]) { |
| 3318 ServiceNameProxy p = new ServiceNameProxy.unbound(); | 3363 ServiceNameProxy p = new ServiceNameProxy.unbound(); |
| 3319 String name = serviceName ?? ServiceName.serviceName; | 3364 String name = serviceName ?? ServiceName.serviceName; |
| 3320 if ((name == null) || name.isEmpty) { | 3365 if ((name == null) || name.isEmpty) { |
| 3321 throw new core.MojoApiError( | 3366 throw new core.MojoApiError( |
| 3322 "If an interface has no ServiceName, then one must be provided."); | 3367 "If an interface has no ServiceName, then one must be provided."); |
| 3323 } | 3368 } |
| 3324 s.connectToService(url, p, name); | 3369 s.connectToService(url, p, name); |
| 3325 return p; | 3370 return p; |
| 3326 } | 3371 } |
| 3327 dynamic serviceName_([Function responseFactory = null]); | 3372 void serviceName_(void callback(String serviceName_)); |
| 3328 } | 3373 } |
| 3329 | 3374 |
| 3330 abstract class ServiceNameInterface | 3375 abstract class ServiceNameInterface |
| 3331 implements bindings.MojoInterface<ServiceName>, | 3376 implements bindings.MojoInterface<ServiceName>, |
| 3332 ServiceName { | 3377 ServiceName { |
| 3333 factory ServiceNameInterface([ServiceName impl]) => | 3378 factory ServiceNameInterface([ServiceName impl]) => |
| 3334 new ServiceNameStub.unbound(impl); | 3379 new ServiceNameStub.unbound(impl); |
| 3335 | 3380 |
| 3336 factory ServiceNameInterface.fromEndpoint( | 3381 factory ServiceNameInterface.fromEndpoint( |
| 3337 core.MojoMessagePipeEndpoint endpoint, | 3382 core.MojoMessagePipeEndpoint endpoint, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3367 | 3412 |
| 3368 void handleResponse(bindings.ServiceMessage message) { | 3413 void handleResponse(bindings.ServiceMessage message) { |
| 3369 switch (message.header.type) { | 3414 switch (message.header.type) { |
| 3370 case _serviceNameMethodServiceNameName: | 3415 case _serviceNameMethodServiceNameName: |
| 3371 var r = ServiceNameServiceNameResponseParams.deserialize( | 3416 var r = ServiceNameServiceNameResponseParams.deserialize( |
| 3372 message.payload); | 3417 message.payload); |
| 3373 if (!message.header.hasRequestId) { | 3418 if (!message.header.hasRequestId) { |
| 3374 proxyError("Expected a message with a valid request Id."); | 3419 proxyError("Expected a message with a valid request Id."); |
| 3375 return; | 3420 return; |
| 3376 } | 3421 } |
| 3377 Completer c = completerMap[message.header.requestId]; | 3422 Function callback = callbackMap[message.header.requestId]; |
| 3378 if (c == null) { | 3423 if (callback == null) { |
| 3379 proxyError( | 3424 proxyError( |
| 3380 "Message had unknown request Id: ${message.header.requestId}"); | 3425 "Message had unknown request Id: ${message.header.requestId}"); |
| 3381 return; | 3426 return; |
| 3382 } | 3427 } |
| 3383 completerMap.remove(message.header.requestId); | 3428 callbackMap.remove(message.header.requestId); |
| 3384 if (c.isCompleted) { | 3429 callback(r.serviceName_ ); |
| 3385 proxyError("Response completer already completed"); | |
| 3386 return; | |
| 3387 } | |
| 3388 c.complete(r); | |
| 3389 break; | 3430 break; |
| 3390 default: | 3431 default: |
| 3391 proxyError("Unexpected message type: ${message.header.type}"); | 3432 proxyError("Unexpected message type: ${message.header.type}"); |
| 3392 close(immediate: true); | 3433 close(immediate: true); |
| 3393 break; | 3434 break; |
| 3394 } | 3435 } |
| 3395 } | 3436 } |
| 3396 | 3437 |
| 3397 @override | 3438 @override |
| 3398 String toString() { | 3439 String toString() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 3423 return newMockedProxy; | 3464 return newMockedProxy; |
| 3424 } | 3465 } |
| 3425 | 3466 |
| 3426 static ServiceNameProxy newFromEndpoint( | 3467 static ServiceNameProxy newFromEndpoint( |
| 3427 core.MojoMessagePipeEndpoint endpoint) { | 3468 core.MojoMessagePipeEndpoint endpoint) { |
| 3428 assert(endpoint.setDescription("For ServiceNameProxy")); | 3469 assert(endpoint.setDescription("For ServiceNameProxy")); |
| 3429 return new ServiceNameProxy.fromEndpoint(endpoint); | 3470 return new ServiceNameProxy.fromEndpoint(endpoint); |
| 3430 } | 3471 } |
| 3431 | 3472 |
| 3432 | 3473 |
| 3433 dynamic serviceName_([Function responseFactory = null]) { | 3474 void serviceName_(void callback(String serviceName_)) { |
| 3434 if (impl != null) { | 3475 if (impl != null) { |
| 3435 return new Future(() => impl.serviceName_(_ServiceNameStubControl._service
NameServiceNameResponseParamsFactory)); | 3476 impl.serviceName_(callback); |
| 3477 return; |
| 3436 } | 3478 } |
| 3437 var params = new _ServiceNameServiceNameParams(); | 3479 var params = new _ServiceNameServiceNameParams(); |
| 3438 return ctrl.sendMessageWithRequestId( | 3480 ctrl.sendMessageWithRequestId( |
| 3439 params, | 3481 params, |
| 3440 _serviceNameMethodServiceNameName, | 3482 _serviceNameMethodServiceNameName, |
| 3441 -1, | 3483 -1, |
| 3442 bindings.MessageHeader.kMessageExpectsResponse); | 3484 bindings.MessageHeader.kMessageExpectsResponse, |
| 3485 callback); |
| 3443 } | 3486 } |
| 3444 } | 3487 } |
| 3445 | 3488 |
| 3446 class _ServiceNameStubControl | 3489 class _ServiceNameStubControl |
| 3447 extends bindings.StubMessageHandler | 3490 extends bindings.StubMessageHandler |
| 3448 implements bindings.StubControl<ServiceName> { | 3491 implements bindings.StubControl<ServiceName> { |
| 3449 ServiceName _impl; | 3492 ServiceName _impl; |
| 3450 | 3493 |
| 3451 _ServiceNameStubControl.fromEndpoint( | 3494 _ServiceNameStubControl.fromEndpoint( |
| 3452 core.MojoMessagePipeEndpoint endpoint, [ServiceName impl]) | 3495 core.MojoMessagePipeEndpoint endpoint, [ServiceName impl]) |
| 3453 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 3496 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
| 3454 _impl = impl; | 3497 _impl = impl; |
| 3455 } | 3498 } |
| 3456 | 3499 |
| 3457 _ServiceNameStubControl.fromHandle( | 3500 _ServiceNameStubControl.fromHandle( |
| 3458 core.MojoHandle handle, [ServiceName impl]) | 3501 core.MojoHandle handle, [ServiceName impl]) |
| 3459 : super.fromHandle(handle, autoBegin: impl != null) { | 3502 : super.fromHandle(handle, autoBegin: impl != null) { |
| 3460 _impl = impl; | 3503 _impl = impl; |
| 3461 } | 3504 } |
| 3462 | 3505 |
| 3463 _ServiceNameStubControl.unbound([this._impl]) : super.unbound(); | 3506 _ServiceNameStubControl.unbound([this._impl]) : super.unbound(); |
| 3464 | 3507 |
| 3465 String get serviceName => ServiceName.serviceName; | 3508 String get serviceName => ServiceName.serviceName; |
| 3466 | 3509 |
| 3467 | 3510 |
| 3468 static ServiceNameServiceNameResponseParams _serviceNameServiceNameResponsePar
amsFactory(String serviceName_) { | 3511 Function _serviceNameServiceNameResponseParamsResponder( |
| 3469 var result = new ServiceNameServiceNameResponseParams(); | 3512 int requestId) { |
| 3470 result.serviceName_ = serviceName_; | 3513 return (String serviceName_) { |
| 3471 return result; | 3514 var result = new ServiceNameServiceNameResponseParams(); |
| 3515 result.serviceName_ = serviceName_; |
| 3516 sendResponse(buildResponseWithId( |
| 3517 result, |
| 3518 _serviceNameMethodServiceNameName, |
| 3519 requestId, |
| 3520 bindings.MessageHeader.kMessageIsResponse)); |
| 3521 }; |
| 3472 } | 3522 } |
| 3473 | 3523 |
| 3474 dynamic handleMessage(bindings.ServiceMessage message) { | 3524 void handleMessage(bindings.ServiceMessage message) { |
| 3475 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 3525 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 3476 return bindings.ControlMessageHandler.handleMessage(this, | 3526 bindings.ControlMessageHandler.handleMessage( |
| 3477 0, | 3527 this, 0, message); |
| 3478 message); | 3528 return; |
| 3479 } | 3529 } |
| 3480 if (_impl == null) { | 3530 if (_impl == null) { |
| 3481 throw new core.MojoApiError("$this has no implementation set"); | 3531 throw new core.MojoApiError("$this has no implementation set"); |
| 3482 } | 3532 } |
| 3483 switch (message.header.type) { | 3533 switch (message.header.type) { |
| 3484 case _serviceNameMethodServiceNameName: | 3534 case _serviceNameMethodServiceNameName: |
| 3485 var response = _impl.serviceName_(_serviceNameServiceNameResponseParamsF
actory); | 3535 _impl.serviceName_(_serviceNameServiceNameResponseParamsResponder(messag
e.header.requestId)); |
| 3486 if (response is Future) { | |
| 3487 return response.then((response) { | |
| 3488 if (response != null) { | |
| 3489 return buildResponseWithId( | |
| 3490 response, | |
| 3491 _serviceNameMethodServiceNameName, | |
| 3492 message.header.requestId, | |
| 3493 bindings.MessageHeader.kMessageIsResponse); | |
| 3494 } | |
| 3495 }); | |
| 3496 } else if (response != null) { | |
| 3497 return buildResponseWithId( | |
| 3498 response, | |
| 3499 _serviceNameMethodServiceNameName, | |
| 3500 message.header.requestId, | |
| 3501 bindings.MessageHeader.kMessageIsResponse); | |
| 3502 } | |
| 3503 break; | 3536 break; |
| 3504 default: | 3537 default: |
| 3505 throw new bindings.MojoCodecError("Unexpected message name"); | 3538 throw new bindings.MojoCodecError("Unexpected message name"); |
| 3506 break; | 3539 break; |
| 3507 } | 3540 } |
| 3508 return null; | |
| 3509 } | 3541 } |
| 3510 | 3542 |
| 3511 ServiceName get impl => _impl; | 3543 ServiceName get impl => _impl; |
| 3512 set impl(ServiceName d) { | 3544 set impl(ServiceName d) { |
| 3513 if (d == null) { | 3545 if (d == null) { |
| 3514 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 3546 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 3515 } | 3547 } |
| 3516 if (isBound && (_impl == null)) { | 3548 if (isBound && (_impl == null)) { |
| 3517 beginHandlingEvents(); | 3549 beginHandlingEvents(); |
| 3518 } | 3550 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3552 core.MojoHandle handle, [ServiceName impl]) | 3584 core.MojoHandle handle, [ServiceName impl]) |
| 3553 : super(new _ServiceNameStubControl.fromHandle(handle, impl)); | 3585 : super(new _ServiceNameStubControl.fromHandle(handle, impl)); |
| 3554 | 3586 |
| 3555 static ServiceNameStub newFromEndpoint( | 3587 static ServiceNameStub newFromEndpoint( |
| 3556 core.MojoMessagePipeEndpoint endpoint) { | 3588 core.MojoMessagePipeEndpoint endpoint) { |
| 3557 assert(endpoint.setDescription("For ServiceNameStub")); | 3589 assert(endpoint.setDescription("For ServiceNameStub")); |
| 3558 return new ServiceNameStub.fromEndpoint(endpoint); | 3590 return new ServiceNameStub.fromEndpoint(endpoint); |
| 3559 } | 3591 } |
| 3560 | 3592 |
| 3561 | 3593 |
| 3562 dynamic serviceName_([Function responseFactory = null]) { | 3594 void serviceName_(void callback(String serviceName_)) { |
| 3563 return impl.serviceName_(responseFactory); | 3595 return impl.serviceName_(callback); |
| 3564 } | 3596 } |
| 3565 } | 3597 } |
| 3566 | 3598 |
| 3567 | 3599 |
| 3568 mojom_types.RuntimeTypeInfo getRuntimeTypeInfo() => _runtimeTypeInfo ?? | 3600 mojom_types.RuntimeTypeInfo getRuntimeTypeInfo() => _runtimeTypeInfo ?? |
| 3569 _initRuntimeTypeInfo(); | 3601 _initRuntimeTypeInfo(); |
| 3570 | 3602 |
| 3571 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { | 3603 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
| 3572 return getRuntimeTypeInfo().typeMap; | 3604 return getRuntimeTypeInfo().typeMap; |
| 3573 } | 3605 } |
| 3574 | 3606 |
| 3575 var _runtimeTypeInfo; | 3607 var _runtimeTypeInfo; |
| 3576 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() { | 3608 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() { |
| 3577 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of | 3609 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of |
| 3578 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this | 3610 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this |
| 3579 // file. The string contains the base64 encoding of the gzip-compressed bytes. | 3611 // file. The string contains the base64 encoding of the gzip-compressed bytes. |
| 3580 var serializedRuntimeTypeInfo = "H4sIAAAJbogC/+xdS3cbtxXGUHIsP5LIbZzIcao4dpuos
U1JtuUwTpuIkqhHJZE6JOXIp+mhaWokMuKrQyqVd15q2WV/QpdeetmfkJ+QpZdZatcCnAtxcDmYwdDDm
aFVnoMDD4XLAT7cBy7uBTxBzM841DNQ4+95PYZq3G7rnFm/ouVDWl7C9z9D/SvUNzSzXoX6BdQvof4Fa
hIzqymon0J9DPUrqF9DPTFi1vNQl6H+J9Q/Qz02Cu+Hugn1LVqu05J/spUqrKeePDL0fUNvtSqNeqGtt
9qteFKx3UKn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9fqCJHX2BalX9F
ffJT3OMX0t7+rLn7jhes5FwcHsXdL+I23Dqf6OP65Ag8jY1ILzCWGdwP+DPPvy2o+gH5Ofv1G65Jif3u
3d5TXbHfKxonmfar3w7ngdeAqAwTqvwbx3Wz6M9WD9zP1UpEsy/LbungJ+z9b513eN+LB9CPD9LGvPxq
EZ8vAzx1mHVv4vofltVPv1RghePm/rd7i/Nq1P7swAd85AmZ3nOKvy6pYHeJS78yP2g4l9zCP73H3Tbn
8rGJfXvooZ4/v5ySvanvVovZ+noN+HsmVu/10/5/tQx/lO5Px1DeeGq8aqUj5+Nn6/g+fWSYxUdOH5yZ
neEvFHZvTk3yGDOfc6g+Ca2O7LzKUH/Ppaq3flfAAAA///6iGIIGG4AAA=="; |
| 3581 | 3613 |
| 3582 // Deserialize RuntimeTypeInfo | 3614 // Deserialize RuntimeTypeInfo |
| 3583 var bytes = BASE64.decode(serializedRuntimeTypeInfo); | 3615 var bytes = BASE64.decode(serializedRuntimeTypeInfo); |
| 3584 var unzippedBytes = new ZLibDecoder().convert(bytes); | 3616 var unzippedBytes = new ZLibDecoder().convert(bytes); |
| 3585 var bdata = new ByteData.view(unzippedBytes.buffer); | 3617 var bdata = new ByteData.view(unzippedBytes.buffer); |
| 3586 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0); | 3618 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0); |
| 3587 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message); | 3619 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message); |
| 3588 return _runtimeTypeInfo; | 3620 return _runtimeTypeInfo; |
| 3589 } | 3621 } |
| OLD | NEW |