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 activity_mojom; | 4 library activity_mojom; |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'package:mojo/bindings.dart' as bindings; | 6 import 'package:mojo/bindings.dart' as bindings; |
7 import 'package:mojo/core.dart' as core; | 7 import 'package:mojo/core.dart' as core; |
8 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 8 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
9 | 9 |
10 class SystemUiVisibility extends bindings.MojoEnum { | 10 class SystemUiVisibility extends bindings.MojoEnum { |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 class StringExtra extends bindings.Struct { | 276 class StringExtra extends bindings.Struct { |
277 static const List<bindings.StructDataHeader> kVersions = const [ | 277 static const List<bindings.StructDataHeader> kVersions = const [ |
278 const bindings.StructDataHeader(24, 0) | 278 const bindings.StructDataHeader(24, 0) |
279 ]; | 279 ]; |
280 String name = null; | 280 String name = null; |
281 String value = null; | 281 String value = null; |
282 | 282 |
283 StringExtra() : super(kVersions.last.size); | 283 StringExtra() : super(kVersions.last.size); |
284 | 284 |
| 285 StringExtra.init( |
| 286 String this.name, |
| 287 String this.value |
| 288 ) : super(kVersions.last.size); |
| 289 |
285 static StringExtra deserialize(bindings.Message message) { | 290 static StringExtra deserialize(bindings.Message message) { |
286 var decoder = new bindings.Decoder(message); | 291 var decoder = new bindings.Decoder(message); |
287 var result = decode(decoder); | 292 var result = decode(decoder); |
288 if (decoder.excessHandles != null) { | 293 if (decoder.excessHandles != null) { |
289 decoder.excessHandles.forEach((h) => h.close()); | 294 decoder.excessHandles.forEach((h) => h.close()); |
290 } | 295 } |
291 return result; | 296 return result; |
292 } | 297 } |
293 | 298 |
294 static StringExtra decode(bindings.Decoder decoder0) { | 299 static StringExtra decode(bindings.Decoder decoder0) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 366 |
362 class ComponentName extends bindings.Struct { | 367 class ComponentName extends bindings.Struct { |
363 static const List<bindings.StructDataHeader> kVersions = const [ | 368 static const List<bindings.StructDataHeader> kVersions = const [ |
364 const bindings.StructDataHeader(24, 0) | 369 const bindings.StructDataHeader(24, 0) |
365 ]; | 370 ]; |
366 String packageName = null; | 371 String packageName = null; |
367 String className = null; | 372 String className = null; |
368 | 373 |
369 ComponentName() : super(kVersions.last.size); | 374 ComponentName() : super(kVersions.last.size); |
370 | 375 |
| 376 ComponentName.init( |
| 377 String this.packageName, |
| 378 String this.className |
| 379 ) : super(kVersions.last.size); |
| 380 |
371 static ComponentName deserialize(bindings.Message message) { | 381 static ComponentName deserialize(bindings.Message message) { |
372 var decoder = new bindings.Decoder(message); | 382 var decoder = new bindings.Decoder(message); |
373 var result = decode(decoder); | 383 var result = decode(decoder); |
374 if (decoder.excessHandles != null) { | 384 if (decoder.excessHandles != null) { |
375 decoder.excessHandles.forEach((h) => h.close()); | 385 decoder.excessHandles.forEach((h) => h.close()); |
376 } | 386 } |
377 return result; | 387 return result; |
378 } | 388 } |
379 | 389 |
380 static ComponentName decode(bindings.Decoder decoder0) { | 390 static ComponentName decode(bindings.Decoder decoder0) { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 ]; | 461 ]; |
452 String action = null; | 462 String action = null; |
453 String url = null; | 463 String url = null; |
454 int flags = 0; | 464 int flags = 0; |
455 ComponentName component = null; | 465 ComponentName component = null; |
456 List<StringExtra> stringExtras = null; | 466 List<StringExtra> stringExtras = null; |
457 String type = null; | 467 String type = null; |
458 | 468 |
459 Intent() : super(kVersions.last.size); | 469 Intent() : super(kVersions.last.size); |
460 | 470 |
| 471 Intent.init( |
| 472 String this.action, |
| 473 String this.url, |
| 474 int this.flags, |
| 475 ComponentName this.component, |
| 476 List<StringExtra> this.stringExtras, |
| 477 String this.type |
| 478 ) : super(kVersions.last.size); |
| 479 |
461 static Intent deserialize(bindings.Message message) { | 480 static Intent deserialize(bindings.Message message) { |
462 var decoder = new bindings.Decoder(message); | 481 var decoder = new bindings.Decoder(message); |
463 var result = decode(decoder); | 482 var result = decode(decoder); |
464 if (decoder.excessHandles != null) { | 483 if (decoder.excessHandles != null) { |
465 decoder.excessHandles.forEach((h) => h.close()); | 484 decoder.excessHandles.forEach((h) => h.close()); |
466 } | 485 } |
467 return result; | 486 return result; |
468 } | 487 } |
469 | 488 |
470 static Intent decode(bindings.Decoder decoder0) { | 489 static Intent decode(bindings.Decoder decoder0) { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 | 627 |
609 class TaskDescription extends bindings.Struct { | 628 class TaskDescription extends bindings.Struct { |
610 static const List<bindings.StructDataHeader> kVersions = const [ | 629 static const List<bindings.StructDataHeader> kVersions = const [ |
611 const bindings.StructDataHeader(24, 0) | 630 const bindings.StructDataHeader(24, 0) |
612 ]; | 631 ]; |
613 String label = null; | 632 String label = null; |
614 int primaryColor = 0; | 633 int primaryColor = 0; |
615 | 634 |
616 TaskDescription() : super(kVersions.last.size); | 635 TaskDescription() : super(kVersions.last.size); |
617 | 636 |
| 637 TaskDescription.init( |
| 638 String this.label, |
| 639 int this.primaryColor |
| 640 ) : super(kVersions.last.size); |
| 641 |
618 static TaskDescription deserialize(bindings.Message message) { | 642 static TaskDescription deserialize(bindings.Message message) { |
619 var decoder = new bindings.Decoder(message); | 643 var decoder = new bindings.Decoder(message); |
620 var result = decode(decoder); | 644 var result = decode(decoder); |
621 if (decoder.excessHandles != null) { | 645 if (decoder.excessHandles != null) { |
622 decoder.excessHandles.forEach((h) => h.close()); | 646 decoder.excessHandles.forEach((h) => h.close()); |
623 } | 647 } |
624 return result; | 648 return result; |
625 } | 649 } |
626 | 650 |
627 static TaskDescription decode(bindings.Decoder decoder0) { | 651 static TaskDescription decode(bindings.Decoder decoder0) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 | 717 |
694 | 718 |
695 class _ActivityGetUserFeedbackParams extends bindings.Struct { | 719 class _ActivityGetUserFeedbackParams extends bindings.Struct { |
696 static const List<bindings.StructDataHeader> kVersions = const [ | 720 static const List<bindings.StructDataHeader> kVersions = const [ |
697 const bindings.StructDataHeader(16, 0) | 721 const bindings.StructDataHeader(16, 0) |
698 ]; | 722 ]; |
699 UserFeedbackInterfaceRequest userFeedback = null; | 723 UserFeedbackInterfaceRequest userFeedback = null; |
700 | 724 |
701 _ActivityGetUserFeedbackParams() : super(kVersions.last.size); | 725 _ActivityGetUserFeedbackParams() : super(kVersions.last.size); |
702 | 726 |
| 727 _ActivityGetUserFeedbackParams.init( |
| 728 UserFeedbackInterfaceRequest this.userFeedback |
| 729 ) : super(kVersions.last.size); |
| 730 |
703 static _ActivityGetUserFeedbackParams deserialize(bindings.Message message) { | 731 static _ActivityGetUserFeedbackParams deserialize(bindings.Message message) { |
704 var decoder = new bindings.Decoder(message); | 732 var decoder = new bindings.Decoder(message); |
705 var result = decode(decoder); | 733 var result = decode(decoder); |
706 if (decoder.excessHandles != null) { | 734 if (decoder.excessHandles != null) { |
707 decoder.excessHandles.forEach((h) => h.close()); | 735 decoder.excessHandles.forEach((h) => h.close()); |
708 } | 736 } |
709 return result; | 737 return result; |
710 } | 738 } |
711 | 739 |
712 static _ActivityGetUserFeedbackParams decode(bindings.Decoder decoder0) { | 740 static _ActivityGetUserFeedbackParams decode(bindings.Decoder decoder0) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 | 792 |
765 | 793 |
766 class _ActivityStartActivityParams extends bindings.Struct { | 794 class _ActivityStartActivityParams extends bindings.Struct { |
767 static const List<bindings.StructDataHeader> kVersions = const [ | 795 static const List<bindings.StructDataHeader> kVersions = const [ |
768 const bindings.StructDataHeader(16, 0) | 796 const bindings.StructDataHeader(16, 0) |
769 ]; | 797 ]; |
770 Intent intent = null; | 798 Intent intent = null; |
771 | 799 |
772 _ActivityStartActivityParams() : super(kVersions.last.size); | 800 _ActivityStartActivityParams() : super(kVersions.last.size); |
773 | 801 |
| 802 _ActivityStartActivityParams.init( |
| 803 Intent this.intent |
| 804 ) : super(kVersions.last.size); |
| 805 |
774 static _ActivityStartActivityParams deserialize(bindings.Message message) { | 806 static _ActivityStartActivityParams deserialize(bindings.Message message) { |
775 var decoder = new bindings.Decoder(message); | 807 var decoder = new bindings.Decoder(message); |
776 var result = decode(decoder); | 808 var result = decode(decoder); |
777 if (decoder.excessHandles != null) { | 809 if (decoder.excessHandles != null) { |
778 decoder.excessHandles.forEach((h) => h.close()); | 810 decoder.excessHandles.forEach((h) => h.close()); |
779 } | 811 } |
780 return result; | 812 return result; |
781 } | 813 } |
782 | 814 |
783 static _ActivityStartActivityParams decode(bindings.Decoder decoder0) { | 815 static _ActivityStartActivityParams decode(bindings.Decoder decoder0) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 } | 868 } |
837 | 869 |
838 | 870 |
839 class _ActivityFinishCurrentActivityParams extends bindings.Struct { | 871 class _ActivityFinishCurrentActivityParams extends bindings.Struct { |
840 static const List<bindings.StructDataHeader> kVersions = const [ | 872 static const List<bindings.StructDataHeader> kVersions = const [ |
841 const bindings.StructDataHeader(8, 0) | 873 const bindings.StructDataHeader(8, 0) |
842 ]; | 874 ]; |
843 | 875 |
844 _ActivityFinishCurrentActivityParams() : super(kVersions.last.size); | 876 _ActivityFinishCurrentActivityParams() : super(kVersions.last.size); |
845 | 877 |
| 878 _ActivityFinishCurrentActivityParams.init( |
| 879 ) : super(kVersions.last.size); |
| 880 |
846 static _ActivityFinishCurrentActivityParams deserialize(bindings.Message messa
ge) { | 881 static _ActivityFinishCurrentActivityParams deserialize(bindings.Message messa
ge) { |
847 var decoder = new bindings.Decoder(message); | 882 var decoder = new bindings.Decoder(message); |
848 var result = decode(decoder); | 883 var result = decode(decoder); |
849 if (decoder.excessHandles != null) { | 884 if (decoder.excessHandles != null) { |
850 decoder.excessHandles.forEach((h) => h.close()); | 885 decoder.excessHandles.forEach((h) => h.close()); |
851 } | 886 } |
852 return result; | 887 return result; |
853 } | 888 } |
854 | 889 |
855 static _ActivityFinishCurrentActivityParams decode(bindings.Decoder decoder0)
{ | 890 static _ActivityFinishCurrentActivityParams decode(bindings.Decoder decoder0)
{ |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 | 930 |
896 | 931 |
897 class _ActivitySetTaskDescriptionParams extends bindings.Struct { | 932 class _ActivitySetTaskDescriptionParams extends bindings.Struct { |
898 static const List<bindings.StructDataHeader> kVersions = const [ | 933 static const List<bindings.StructDataHeader> kVersions = const [ |
899 const bindings.StructDataHeader(16, 0) | 934 const bindings.StructDataHeader(16, 0) |
900 ]; | 935 ]; |
901 TaskDescription description = null; | 936 TaskDescription description = null; |
902 | 937 |
903 _ActivitySetTaskDescriptionParams() : super(kVersions.last.size); | 938 _ActivitySetTaskDescriptionParams() : super(kVersions.last.size); |
904 | 939 |
| 940 _ActivitySetTaskDescriptionParams.init( |
| 941 TaskDescription this.description |
| 942 ) : super(kVersions.last.size); |
| 943 |
905 static _ActivitySetTaskDescriptionParams deserialize(bindings.Message message)
{ | 944 static _ActivitySetTaskDescriptionParams deserialize(bindings.Message message)
{ |
906 var decoder = new bindings.Decoder(message); | 945 var decoder = new bindings.Decoder(message); |
907 var result = decode(decoder); | 946 var result = decode(decoder); |
908 if (decoder.excessHandles != null) { | 947 if (decoder.excessHandles != null) { |
909 decoder.excessHandles.forEach((h) => h.close()); | 948 decoder.excessHandles.forEach((h) => h.close()); |
910 } | 949 } |
911 return result; | 950 return result; |
912 } | 951 } |
913 | 952 |
914 static _ActivitySetTaskDescriptionParams decode(bindings.Decoder decoder0) { | 953 static _ActivitySetTaskDescriptionParams decode(bindings.Decoder decoder0) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 | 1007 |
969 | 1008 |
970 class _ActivitySetSystemUiVisibilityParams extends bindings.Struct { | 1009 class _ActivitySetSystemUiVisibilityParams extends bindings.Struct { |
971 static const List<bindings.StructDataHeader> kVersions = const [ | 1010 static const List<bindings.StructDataHeader> kVersions = const [ |
972 const bindings.StructDataHeader(16, 0) | 1011 const bindings.StructDataHeader(16, 0) |
973 ]; | 1012 ]; |
974 SystemUiVisibility visibility = null; | 1013 SystemUiVisibility visibility = null; |
975 | 1014 |
976 _ActivitySetSystemUiVisibilityParams() : super(kVersions.last.size); | 1015 _ActivitySetSystemUiVisibilityParams() : super(kVersions.last.size); |
977 | 1016 |
| 1017 _ActivitySetSystemUiVisibilityParams.init( |
| 1018 SystemUiVisibility this.visibility |
| 1019 ) : super(kVersions.last.size); |
| 1020 |
978 static _ActivitySetSystemUiVisibilityParams deserialize(bindings.Message messa
ge) { | 1021 static _ActivitySetSystemUiVisibilityParams deserialize(bindings.Message messa
ge) { |
979 var decoder = new bindings.Decoder(message); | 1022 var decoder = new bindings.Decoder(message); |
980 var result = decode(decoder); | 1023 var result = decode(decoder); |
981 if (decoder.excessHandles != null) { | 1024 if (decoder.excessHandles != null) { |
982 decoder.excessHandles.forEach((h) => h.close()); | 1025 decoder.excessHandles.forEach((h) => h.close()); |
983 } | 1026 } |
984 return result; | 1027 return result; |
985 } | 1028 } |
986 | 1029 |
987 static _ActivitySetSystemUiVisibilityParams decode(bindings.Decoder decoder0)
{ | 1030 static _ActivitySetSystemUiVisibilityParams decode(bindings.Decoder decoder0)
{ |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 | 1087 |
1045 | 1088 |
1046 class _ActivitySetRequestedOrientationParams extends bindings.Struct { | 1089 class _ActivitySetRequestedOrientationParams extends bindings.Struct { |
1047 static const List<bindings.StructDataHeader> kVersions = const [ | 1090 static const List<bindings.StructDataHeader> kVersions = const [ |
1048 const bindings.StructDataHeader(16, 0) | 1091 const bindings.StructDataHeader(16, 0) |
1049 ]; | 1092 ]; |
1050 ScreenOrientation orientation = null; | 1093 ScreenOrientation orientation = null; |
1051 | 1094 |
1052 _ActivitySetRequestedOrientationParams() : super(kVersions.last.size); | 1095 _ActivitySetRequestedOrientationParams() : super(kVersions.last.size); |
1053 | 1096 |
| 1097 _ActivitySetRequestedOrientationParams.init( |
| 1098 ScreenOrientation this.orientation |
| 1099 ) : super(kVersions.last.size); |
| 1100 |
1054 static _ActivitySetRequestedOrientationParams deserialize(bindings.Message mes
sage) { | 1101 static _ActivitySetRequestedOrientationParams deserialize(bindings.Message mes
sage) { |
1055 var decoder = new bindings.Decoder(message); | 1102 var decoder = new bindings.Decoder(message); |
1056 var result = decode(decoder); | 1103 var result = decode(decoder); |
1057 if (decoder.excessHandles != null) { | 1104 if (decoder.excessHandles != null) { |
1058 decoder.excessHandles.forEach((h) => h.close()); | 1105 decoder.excessHandles.forEach((h) => h.close()); |
1059 } | 1106 } |
1060 return result; | 1107 return result; |
1061 } | 1108 } |
1062 | 1109 |
1063 static _ActivitySetRequestedOrientationParams decode(bindings.Decoder decoder0
) { | 1110 static _ActivitySetRequestedOrientationParams decode(bindings.Decoder decoder0
) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 } | 1166 } |
1120 | 1167 |
1121 | 1168 |
1122 class _PathServiceGetAppDataDirParams extends bindings.Struct { | 1169 class _PathServiceGetAppDataDirParams extends bindings.Struct { |
1123 static const List<bindings.StructDataHeader> kVersions = const [ | 1170 static const List<bindings.StructDataHeader> kVersions = const [ |
1124 const bindings.StructDataHeader(8, 0) | 1171 const bindings.StructDataHeader(8, 0) |
1125 ]; | 1172 ]; |
1126 | 1173 |
1127 _PathServiceGetAppDataDirParams() : super(kVersions.last.size); | 1174 _PathServiceGetAppDataDirParams() : super(kVersions.last.size); |
1128 | 1175 |
| 1176 _PathServiceGetAppDataDirParams.init( |
| 1177 ) : super(kVersions.last.size); |
| 1178 |
1129 static _PathServiceGetAppDataDirParams deserialize(bindings.Message message) { | 1179 static _PathServiceGetAppDataDirParams deserialize(bindings.Message message) { |
1130 var decoder = new bindings.Decoder(message); | 1180 var decoder = new bindings.Decoder(message); |
1131 var result = decode(decoder); | 1181 var result = decode(decoder); |
1132 if (decoder.excessHandles != null) { | 1182 if (decoder.excessHandles != null) { |
1133 decoder.excessHandles.forEach((h) => h.close()); | 1183 decoder.excessHandles.forEach((h) => h.close()); |
1134 } | 1184 } |
1135 return result; | 1185 return result; |
1136 } | 1186 } |
1137 | 1187 |
1138 static _PathServiceGetAppDataDirParams decode(bindings.Decoder decoder0) { | 1188 static _PathServiceGetAppDataDirParams decode(bindings.Decoder decoder0) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1178 | 1228 |
1179 | 1229 |
1180 class PathServiceGetAppDataDirResponseParams extends bindings.Struct { | 1230 class PathServiceGetAppDataDirResponseParams extends bindings.Struct { |
1181 static const List<bindings.StructDataHeader> kVersions = const [ | 1231 static const List<bindings.StructDataHeader> kVersions = const [ |
1182 const bindings.StructDataHeader(16, 0) | 1232 const bindings.StructDataHeader(16, 0) |
1183 ]; | 1233 ]; |
1184 String path = null; | 1234 String path = null; |
1185 | 1235 |
1186 PathServiceGetAppDataDirResponseParams() : super(kVersions.last.size); | 1236 PathServiceGetAppDataDirResponseParams() : super(kVersions.last.size); |
1187 | 1237 |
| 1238 PathServiceGetAppDataDirResponseParams.init( |
| 1239 String this.path |
| 1240 ) : super(kVersions.last.size); |
| 1241 |
1188 static PathServiceGetAppDataDirResponseParams deserialize(bindings.Message mes
sage) { | 1242 static PathServiceGetAppDataDirResponseParams deserialize(bindings.Message mes
sage) { |
1189 var decoder = new bindings.Decoder(message); | 1243 var decoder = new bindings.Decoder(message); |
1190 var result = decode(decoder); | 1244 var result = decode(decoder); |
1191 if (decoder.excessHandles != null) { | 1245 if (decoder.excessHandles != null) { |
1192 decoder.excessHandles.forEach((h) => h.close()); | 1246 decoder.excessHandles.forEach((h) => h.close()); |
1193 } | 1247 } |
1194 return result; | 1248 return result; |
1195 } | 1249 } |
1196 | 1250 |
1197 static PathServiceGetAppDataDirResponseParams decode(bindings.Decoder decoder0
) { | 1251 static PathServiceGetAppDataDirResponseParams decode(bindings.Decoder decoder0
) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 } | 1303 } |
1250 | 1304 |
1251 | 1305 |
1252 class _PathServiceGetFilesDirParams extends bindings.Struct { | 1306 class _PathServiceGetFilesDirParams extends bindings.Struct { |
1253 static const List<bindings.StructDataHeader> kVersions = const [ | 1307 static const List<bindings.StructDataHeader> kVersions = const [ |
1254 const bindings.StructDataHeader(8, 0) | 1308 const bindings.StructDataHeader(8, 0) |
1255 ]; | 1309 ]; |
1256 | 1310 |
1257 _PathServiceGetFilesDirParams() : super(kVersions.last.size); | 1311 _PathServiceGetFilesDirParams() : super(kVersions.last.size); |
1258 | 1312 |
| 1313 _PathServiceGetFilesDirParams.init( |
| 1314 ) : super(kVersions.last.size); |
| 1315 |
1259 static _PathServiceGetFilesDirParams deserialize(bindings.Message message) { | 1316 static _PathServiceGetFilesDirParams deserialize(bindings.Message message) { |
1260 var decoder = new bindings.Decoder(message); | 1317 var decoder = new bindings.Decoder(message); |
1261 var result = decode(decoder); | 1318 var result = decode(decoder); |
1262 if (decoder.excessHandles != null) { | 1319 if (decoder.excessHandles != null) { |
1263 decoder.excessHandles.forEach((h) => h.close()); | 1320 decoder.excessHandles.forEach((h) => h.close()); |
1264 } | 1321 } |
1265 return result; | 1322 return result; |
1266 } | 1323 } |
1267 | 1324 |
1268 static _PathServiceGetFilesDirParams decode(bindings.Decoder decoder0) { | 1325 static _PathServiceGetFilesDirParams decode(bindings.Decoder decoder0) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 | 1365 |
1309 | 1366 |
1310 class PathServiceGetFilesDirResponseParams extends bindings.Struct { | 1367 class PathServiceGetFilesDirResponseParams extends bindings.Struct { |
1311 static const List<bindings.StructDataHeader> kVersions = const [ | 1368 static const List<bindings.StructDataHeader> kVersions = const [ |
1312 const bindings.StructDataHeader(16, 0) | 1369 const bindings.StructDataHeader(16, 0) |
1313 ]; | 1370 ]; |
1314 String path = null; | 1371 String path = null; |
1315 | 1372 |
1316 PathServiceGetFilesDirResponseParams() : super(kVersions.last.size); | 1373 PathServiceGetFilesDirResponseParams() : super(kVersions.last.size); |
1317 | 1374 |
| 1375 PathServiceGetFilesDirResponseParams.init( |
| 1376 String this.path |
| 1377 ) : super(kVersions.last.size); |
| 1378 |
1318 static PathServiceGetFilesDirResponseParams deserialize(bindings.Message messa
ge) { | 1379 static PathServiceGetFilesDirResponseParams deserialize(bindings.Message messa
ge) { |
1319 var decoder = new bindings.Decoder(message); | 1380 var decoder = new bindings.Decoder(message); |
1320 var result = decode(decoder); | 1381 var result = decode(decoder); |
1321 if (decoder.excessHandles != null) { | 1382 if (decoder.excessHandles != null) { |
1322 decoder.excessHandles.forEach((h) => h.close()); | 1383 decoder.excessHandles.forEach((h) => h.close()); |
1323 } | 1384 } |
1324 return result; | 1385 return result; |
1325 } | 1386 } |
1326 | 1387 |
1327 static PathServiceGetFilesDirResponseParams decode(bindings.Decoder decoder0)
{ | 1388 static PathServiceGetFilesDirResponseParams decode(bindings.Decoder decoder0)
{ |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 } | 1440 } |
1380 | 1441 |
1381 | 1442 |
1382 class _PathServiceGetCacheDirParams extends bindings.Struct { | 1443 class _PathServiceGetCacheDirParams extends bindings.Struct { |
1383 static const List<bindings.StructDataHeader> kVersions = const [ | 1444 static const List<bindings.StructDataHeader> kVersions = const [ |
1384 const bindings.StructDataHeader(8, 0) | 1445 const bindings.StructDataHeader(8, 0) |
1385 ]; | 1446 ]; |
1386 | 1447 |
1387 _PathServiceGetCacheDirParams() : super(kVersions.last.size); | 1448 _PathServiceGetCacheDirParams() : super(kVersions.last.size); |
1388 | 1449 |
| 1450 _PathServiceGetCacheDirParams.init( |
| 1451 ) : super(kVersions.last.size); |
| 1452 |
1389 static _PathServiceGetCacheDirParams deserialize(bindings.Message message) { | 1453 static _PathServiceGetCacheDirParams deserialize(bindings.Message message) { |
1390 var decoder = new bindings.Decoder(message); | 1454 var decoder = new bindings.Decoder(message); |
1391 var result = decode(decoder); | 1455 var result = decode(decoder); |
1392 if (decoder.excessHandles != null) { | 1456 if (decoder.excessHandles != null) { |
1393 decoder.excessHandles.forEach((h) => h.close()); | 1457 decoder.excessHandles.forEach((h) => h.close()); |
1394 } | 1458 } |
1395 return result; | 1459 return result; |
1396 } | 1460 } |
1397 | 1461 |
1398 static _PathServiceGetCacheDirParams decode(bindings.Decoder decoder0) { | 1462 static _PathServiceGetCacheDirParams decode(bindings.Decoder decoder0) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 | 1502 |
1439 | 1503 |
1440 class PathServiceGetCacheDirResponseParams extends bindings.Struct { | 1504 class PathServiceGetCacheDirResponseParams extends bindings.Struct { |
1441 static const List<bindings.StructDataHeader> kVersions = const [ | 1505 static const List<bindings.StructDataHeader> kVersions = const [ |
1442 const bindings.StructDataHeader(16, 0) | 1506 const bindings.StructDataHeader(16, 0) |
1443 ]; | 1507 ]; |
1444 String path = null; | 1508 String path = null; |
1445 | 1509 |
1446 PathServiceGetCacheDirResponseParams() : super(kVersions.last.size); | 1510 PathServiceGetCacheDirResponseParams() : super(kVersions.last.size); |
1447 | 1511 |
| 1512 PathServiceGetCacheDirResponseParams.init( |
| 1513 String this.path |
| 1514 ) : super(kVersions.last.size); |
| 1515 |
1448 static PathServiceGetCacheDirResponseParams deserialize(bindings.Message messa
ge) { | 1516 static PathServiceGetCacheDirResponseParams deserialize(bindings.Message messa
ge) { |
1449 var decoder = new bindings.Decoder(message); | 1517 var decoder = new bindings.Decoder(message); |
1450 var result = decode(decoder); | 1518 var result = decode(decoder); |
1451 if (decoder.excessHandles != null) { | 1519 if (decoder.excessHandles != null) { |
1452 decoder.excessHandles.forEach((h) => h.close()); | 1520 decoder.excessHandles.forEach((h) => h.close()); |
1453 } | 1521 } |
1454 return result; | 1522 return result; |
1455 } | 1523 } |
1456 | 1524 |
1457 static PathServiceGetCacheDirResponseParams decode(bindings.Decoder decoder0)
{ | 1525 static PathServiceGetCacheDirResponseParams decode(bindings.Decoder decoder0)
{ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 | 1578 |
1511 | 1579 |
1512 class _UserFeedbackPerformHapticFeedbackParams extends bindings.Struct { | 1580 class _UserFeedbackPerformHapticFeedbackParams extends bindings.Struct { |
1513 static const List<bindings.StructDataHeader> kVersions = const [ | 1581 static const List<bindings.StructDataHeader> kVersions = const [ |
1514 const bindings.StructDataHeader(16, 0) | 1582 const bindings.StructDataHeader(16, 0) |
1515 ]; | 1583 ]; |
1516 HapticFeedbackType type = null; | 1584 HapticFeedbackType type = null; |
1517 | 1585 |
1518 _UserFeedbackPerformHapticFeedbackParams() : super(kVersions.last.size); | 1586 _UserFeedbackPerformHapticFeedbackParams() : super(kVersions.last.size); |
1519 | 1587 |
| 1588 _UserFeedbackPerformHapticFeedbackParams.init( |
| 1589 HapticFeedbackType this.type |
| 1590 ) : super(kVersions.last.size); |
| 1591 |
1520 static _UserFeedbackPerformHapticFeedbackParams deserialize(bindings.Message m
essage) { | 1592 static _UserFeedbackPerformHapticFeedbackParams deserialize(bindings.Message m
essage) { |
1521 var decoder = new bindings.Decoder(message); | 1593 var decoder = new bindings.Decoder(message); |
1522 var result = decode(decoder); | 1594 var result = decode(decoder); |
1523 if (decoder.excessHandles != null) { | 1595 if (decoder.excessHandles != null) { |
1524 decoder.excessHandles.forEach((h) => h.close()); | 1596 decoder.excessHandles.forEach((h) => h.close()); |
1525 } | 1597 } |
1526 return result; | 1598 return result; |
1527 } | 1599 } |
1528 | 1600 |
1529 static _UserFeedbackPerformHapticFeedbackParams decode(bindings.Decoder decode
r0) { | 1601 static _UserFeedbackPerformHapticFeedbackParams decode(bindings.Decoder decode
r0) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 | 1658 |
1587 | 1659 |
1588 class _UserFeedbackPerformAuralFeedbackParams extends bindings.Struct { | 1660 class _UserFeedbackPerformAuralFeedbackParams extends bindings.Struct { |
1589 static const List<bindings.StructDataHeader> kVersions = const [ | 1661 static const List<bindings.StructDataHeader> kVersions = const [ |
1590 const bindings.StructDataHeader(16, 0) | 1662 const bindings.StructDataHeader(16, 0) |
1591 ]; | 1663 ]; |
1592 AuralFeedbackType type = null; | 1664 AuralFeedbackType type = null; |
1593 | 1665 |
1594 _UserFeedbackPerformAuralFeedbackParams() : super(kVersions.last.size); | 1666 _UserFeedbackPerformAuralFeedbackParams() : super(kVersions.last.size); |
1595 | 1667 |
| 1668 _UserFeedbackPerformAuralFeedbackParams.init( |
| 1669 AuralFeedbackType this.type |
| 1670 ) : super(kVersions.last.size); |
| 1671 |
1596 static _UserFeedbackPerformAuralFeedbackParams deserialize(bindings.Message me
ssage) { | 1672 static _UserFeedbackPerformAuralFeedbackParams deserialize(bindings.Message me
ssage) { |
1597 var decoder = new bindings.Decoder(message); | 1673 var decoder = new bindings.Decoder(message); |
1598 var result = decode(decoder); | 1674 var result = decode(decoder); |
1599 if (decoder.excessHandles != null) { | 1675 if (decoder.excessHandles != null) { |
1600 decoder.excessHandles.forEach((h) => h.close()); | 1676 decoder.excessHandles.forEach((h) => h.close()); |
1601 } | 1677 } |
1602 return result; | 1678 return result; |
1603 } | 1679 } |
1604 | 1680 |
1605 static _UserFeedbackPerformAuralFeedbackParams decode(bindings.Decoder decoder
0) { | 1681 static _UserFeedbackPerformAuralFeedbackParams decode(bindings.Decoder decoder
0) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 } | 1737 } |
1662 | 1738 |
1663 const int _activityMethodGetUserFeedbackName = 0; | 1739 const int _activityMethodGetUserFeedbackName = 0; |
1664 const int _activityMethodStartActivityName = 1; | 1740 const int _activityMethodStartActivityName = 1; |
1665 const int _activityMethodFinishCurrentActivityName = 2; | 1741 const int _activityMethodFinishCurrentActivityName = 2; |
1666 const int _activityMethodSetTaskDescriptionName = 3; | 1742 const int _activityMethodSetTaskDescriptionName = 3; |
1667 const int _activityMethodSetSystemUiVisibilityName = 4; | 1743 const int _activityMethodSetSystemUiVisibilityName = 4; |
1668 const int _activityMethodSetRequestedOrientationName = 5; | 1744 const int _activityMethodSetRequestedOrientationName = 5; |
1669 | 1745 |
1670 class _ActivityServiceDescription implements service_describer.ServiceDescriptio
n { | 1746 class _ActivityServiceDescription implements service_describer.ServiceDescriptio
n { |
1671 dynamic getTopLevelInterface([Function responseFactory]) => | 1747 void getTopLevelInterface(Function responder) { |
1672 responseFactory(null); | 1748 responder(null); |
| 1749 } |
1673 | 1750 |
1674 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1751 void getTypeDefinition(String typeKey, Function responder) { |
1675 responseFactory(null); | 1752 responder(null); |
| 1753 } |
1676 | 1754 |
1677 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1755 void getAllTypeDefinitions(Function responder) { |
1678 responseFactory(null); | 1756 responder(null); |
| 1757 } |
1679 } | 1758 } |
1680 | 1759 |
1681 abstract class Activity { | 1760 abstract class Activity { |
1682 static const String serviceName = "activity::Activity"; | 1761 static const String serviceName = "activity::Activity"; |
1683 | 1762 |
1684 static service_describer.ServiceDescription _cachedServiceDescription; | 1763 static service_describer.ServiceDescription _cachedServiceDescription; |
1685 static service_describer.ServiceDescription get serviceDescription { | 1764 static service_describer.ServiceDescription get serviceDescription { |
1686 if (_cachedServiceDescription == null) { | 1765 if (_cachedServiceDescription == null) { |
1687 _cachedServiceDescription = new _ActivityServiceDescription(); | 1766 _cachedServiceDescription = new _ActivityServiceDescription(); |
1688 } | 1767 } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1892 : super.fromHandle(handle, autoBegin: impl != null) { | 1971 : super.fromHandle(handle, autoBegin: impl != null) { |
1893 _impl = impl; | 1972 _impl = impl; |
1894 } | 1973 } |
1895 | 1974 |
1896 _ActivityStubControl.unbound([this._impl]) : super.unbound(); | 1975 _ActivityStubControl.unbound([this._impl]) : super.unbound(); |
1897 | 1976 |
1898 String get serviceName => Activity.serviceName; | 1977 String get serviceName => Activity.serviceName; |
1899 | 1978 |
1900 | 1979 |
1901 | 1980 |
1902 dynamic handleMessage(bindings.ServiceMessage message) { | 1981 void handleMessage(bindings.ServiceMessage message) { |
1903 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 1982 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
1904 return bindings.ControlMessageHandler.handleMessage(this, | 1983 bindings.ControlMessageHandler.handleMessage( |
1905 0, | 1984 this, 0, message); |
1906 message); | 1985 return; |
1907 } | 1986 } |
1908 if (_impl == null) { | 1987 if (_impl == null) { |
1909 throw new core.MojoApiError("$this has no implementation set"); | 1988 throw new core.MojoApiError("$this has no implementation set"); |
1910 } | 1989 } |
1911 switch (message.header.type) { | 1990 switch (message.header.type) { |
1912 case _activityMethodGetUserFeedbackName: | 1991 case _activityMethodGetUserFeedbackName: |
1913 var params = _ActivityGetUserFeedbackParams.deserialize( | 1992 var params = _ActivityGetUserFeedbackParams.deserialize( |
1914 message.payload); | 1993 message.payload); |
1915 _impl.getUserFeedback(params.userFeedback); | 1994 _impl.getUserFeedback(params.userFeedback); |
1916 break; | 1995 break; |
(...skipping 17 matching lines...) Expand all Loading... |
1934 break; | 2013 break; |
1935 case _activityMethodSetRequestedOrientationName: | 2014 case _activityMethodSetRequestedOrientationName: |
1936 var params = _ActivitySetRequestedOrientationParams.deserialize( | 2015 var params = _ActivitySetRequestedOrientationParams.deserialize( |
1937 message.payload); | 2016 message.payload); |
1938 _impl.setRequestedOrientation(params.orientation); | 2017 _impl.setRequestedOrientation(params.orientation); |
1939 break; | 2018 break; |
1940 default: | 2019 default: |
1941 throw new bindings.MojoCodecError("Unexpected message name"); | 2020 throw new bindings.MojoCodecError("Unexpected message name"); |
1942 break; | 2021 break; |
1943 } | 2022 } |
1944 return null; | |
1945 } | 2023 } |
1946 | 2024 |
1947 Activity get impl => _impl; | 2025 Activity get impl => _impl; |
1948 set impl(Activity d) { | 2026 set impl(Activity d) { |
1949 if (d == null) { | 2027 if (d == null) { |
1950 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 2028 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
1951 } | 2029 } |
1952 if (isBound && (_impl == null)) { | 2030 if (isBound && (_impl == null)) { |
1953 beginHandlingEvents(); | 2031 beginHandlingEvents(); |
1954 } | 2032 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2013 void setRequestedOrientation(ScreenOrientation orientation) { | 2091 void setRequestedOrientation(ScreenOrientation orientation) { |
2014 return impl.setRequestedOrientation(orientation); | 2092 return impl.setRequestedOrientation(orientation); |
2015 } | 2093 } |
2016 } | 2094 } |
2017 | 2095 |
2018 const int _pathServiceMethodGetAppDataDirName = 0; | 2096 const int _pathServiceMethodGetAppDataDirName = 0; |
2019 const int _pathServiceMethodGetFilesDirName = 1; | 2097 const int _pathServiceMethodGetFilesDirName = 1; |
2020 const int _pathServiceMethodGetCacheDirName = 2; | 2098 const int _pathServiceMethodGetCacheDirName = 2; |
2021 | 2099 |
2022 class _PathServiceServiceDescription implements service_describer.ServiceDescrip
tion { | 2100 class _PathServiceServiceDescription implements service_describer.ServiceDescrip
tion { |
2023 dynamic getTopLevelInterface([Function responseFactory]) => | 2101 void getTopLevelInterface(Function responder) { |
2024 responseFactory(null); | 2102 responder(null); |
| 2103 } |
2025 | 2104 |
2026 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2105 void getTypeDefinition(String typeKey, Function responder) { |
2027 responseFactory(null); | 2106 responder(null); |
| 2107 } |
2028 | 2108 |
2029 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2109 void getAllTypeDefinitions(Function responder) { |
2030 responseFactory(null); | 2110 responder(null); |
| 2111 } |
2031 } | 2112 } |
2032 | 2113 |
2033 abstract class PathService { | 2114 abstract class PathService { |
2034 static const String serviceName = "activity::PathService"; | 2115 static const String serviceName = "activity::PathService"; |
2035 | 2116 |
2036 static service_describer.ServiceDescription _cachedServiceDescription; | 2117 static service_describer.ServiceDescription _cachedServiceDescription; |
2037 static service_describer.ServiceDescription get serviceDescription { | 2118 static service_describer.ServiceDescription get serviceDescription { |
2038 if (_cachedServiceDescription == null) { | 2119 if (_cachedServiceDescription == null) { |
2039 _cachedServiceDescription = new _PathServiceServiceDescription(); | 2120 _cachedServiceDescription = new _PathServiceServiceDescription(); |
2040 } | 2121 } |
2041 return _cachedServiceDescription; | 2122 return _cachedServiceDescription; |
2042 } | 2123 } |
2043 | 2124 |
2044 static PathServiceProxy connectToService( | 2125 static PathServiceProxy connectToService( |
2045 bindings.ServiceConnector s, String url, [String serviceName]) { | 2126 bindings.ServiceConnector s, String url, [String serviceName]) { |
2046 PathServiceProxy p = new PathServiceProxy.unbound(); | 2127 PathServiceProxy p = new PathServiceProxy.unbound(); |
2047 String name = serviceName ?? PathService.serviceName; | 2128 String name = serviceName ?? PathService.serviceName; |
2048 if ((name == null) || name.isEmpty) { | 2129 if ((name == null) || name.isEmpty) { |
2049 throw new core.MojoApiError( | 2130 throw new core.MojoApiError( |
2050 "If an interface has no ServiceName, then one must be provided."); | 2131 "If an interface has no ServiceName, then one must be provided."); |
2051 } | 2132 } |
2052 s.connectToService(url, p, name); | 2133 s.connectToService(url, p, name); |
2053 return p; | 2134 return p; |
2054 } | 2135 } |
2055 dynamic getAppDataDir([Function responseFactory = null]); | 2136 void getAppDataDir(void callback(String path)); |
2056 dynamic getFilesDir([Function responseFactory = null]); | 2137 void getFilesDir(void callback(String path)); |
2057 dynamic getCacheDir([Function responseFactory = null]); | 2138 void getCacheDir(void callback(String path)); |
2058 } | 2139 } |
2059 | 2140 |
2060 abstract class PathServiceInterface | 2141 abstract class PathServiceInterface |
2061 implements bindings.MojoInterface<PathService>, | 2142 implements bindings.MojoInterface<PathService>, |
2062 PathService { | 2143 PathService { |
2063 factory PathServiceInterface([PathService impl]) => | 2144 factory PathServiceInterface([PathService impl]) => |
2064 new PathServiceStub.unbound(impl); | 2145 new PathServiceStub.unbound(impl); |
2065 | 2146 |
2066 factory PathServiceInterface.fromEndpoint( | 2147 factory PathServiceInterface.fromEndpoint( |
2067 core.MojoMessagePipeEndpoint endpoint, | 2148 core.MojoMessagePipeEndpoint endpoint, |
(...skipping 29 matching lines...) Expand all Loading... |
2097 | 2178 |
2098 void handleResponse(bindings.ServiceMessage message) { | 2179 void handleResponse(bindings.ServiceMessage message) { |
2099 switch (message.header.type) { | 2180 switch (message.header.type) { |
2100 case _pathServiceMethodGetAppDataDirName: | 2181 case _pathServiceMethodGetAppDataDirName: |
2101 var r = PathServiceGetAppDataDirResponseParams.deserialize( | 2182 var r = PathServiceGetAppDataDirResponseParams.deserialize( |
2102 message.payload); | 2183 message.payload); |
2103 if (!message.header.hasRequestId) { | 2184 if (!message.header.hasRequestId) { |
2104 proxyError("Expected a message with a valid request Id."); | 2185 proxyError("Expected a message with a valid request Id."); |
2105 return; | 2186 return; |
2106 } | 2187 } |
2107 Completer c = completerMap[message.header.requestId]; | 2188 Function callback = callbackMap[message.header.requestId]; |
2108 if (c == null) { | 2189 if (callback == null) { |
2109 proxyError( | 2190 proxyError( |
2110 "Message had unknown request Id: ${message.header.requestId}"); | 2191 "Message had unknown request Id: ${message.header.requestId}"); |
2111 return; | 2192 return; |
2112 } | 2193 } |
2113 completerMap.remove(message.header.requestId); | 2194 callbackMap.remove(message.header.requestId); |
2114 if (c.isCompleted) { | 2195 callback(r.path ); |
2115 proxyError("Response completer already completed"); | |
2116 return; | |
2117 } | |
2118 c.complete(r); | |
2119 break; | 2196 break; |
2120 case _pathServiceMethodGetFilesDirName: | 2197 case _pathServiceMethodGetFilesDirName: |
2121 var r = PathServiceGetFilesDirResponseParams.deserialize( | 2198 var r = PathServiceGetFilesDirResponseParams.deserialize( |
2122 message.payload); | 2199 message.payload); |
2123 if (!message.header.hasRequestId) { | 2200 if (!message.header.hasRequestId) { |
2124 proxyError("Expected a message with a valid request Id."); | 2201 proxyError("Expected a message with a valid request Id."); |
2125 return; | 2202 return; |
2126 } | 2203 } |
2127 Completer c = completerMap[message.header.requestId]; | 2204 Function callback = callbackMap[message.header.requestId]; |
2128 if (c == null) { | 2205 if (callback == null) { |
2129 proxyError( | 2206 proxyError( |
2130 "Message had unknown request Id: ${message.header.requestId}"); | 2207 "Message had unknown request Id: ${message.header.requestId}"); |
2131 return; | 2208 return; |
2132 } | 2209 } |
2133 completerMap.remove(message.header.requestId); | 2210 callbackMap.remove(message.header.requestId); |
2134 if (c.isCompleted) { | 2211 callback(r.path ); |
2135 proxyError("Response completer already completed"); | |
2136 return; | |
2137 } | |
2138 c.complete(r); | |
2139 break; | 2212 break; |
2140 case _pathServiceMethodGetCacheDirName: | 2213 case _pathServiceMethodGetCacheDirName: |
2141 var r = PathServiceGetCacheDirResponseParams.deserialize( | 2214 var r = PathServiceGetCacheDirResponseParams.deserialize( |
2142 message.payload); | 2215 message.payload); |
2143 if (!message.header.hasRequestId) { | 2216 if (!message.header.hasRequestId) { |
2144 proxyError("Expected a message with a valid request Id."); | 2217 proxyError("Expected a message with a valid request Id."); |
2145 return; | 2218 return; |
2146 } | 2219 } |
2147 Completer c = completerMap[message.header.requestId]; | 2220 Function callback = callbackMap[message.header.requestId]; |
2148 if (c == null) { | 2221 if (callback == null) { |
2149 proxyError( | 2222 proxyError( |
2150 "Message had unknown request Id: ${message.header.requestId}"); | 2223 "Message had unknown request Id: ${message.header.requestId}"); |
2151 return; | 2224 return; |
2152 } | 2225 } |
2153 completerMap.remove(message.header.requestId); | 2226 callbackMap.remove(message.header.requestId); |
2154 if (c.isCompleted) { | 2227 callback(r.path ); |
2155 proxyError("Response completer already completed"); | |
2156 return; | |
2157 } | |
2158 c.complete(r); | |
2159 break; | 2228 break; |
2160 default: | 2229 default: |
2161 proxyError("Unexpected message type: ${message.header.type}"); | 2230 proxyError("Unexpected message type: ${message.header.type}"); |
2162 close(immediate: true); | 2231 close(immediate: true); |
2163 break; | 2232 break; |
2164 } | 2233 } |
2165 } | 2234 } |
2166 | 2235 |
2167 @override | 2236 @override |
2168 String toString() { | 2237 String toString() { |
(...skipping 24 matching lines...) Expand all Loading... |
2193 return newMockedProxy; | 2262 return newMockedProxy; |
2194 } | 2263 } |
2195 | 2264 |
2196 static PathServiceProxy newFromEndpoint( | 2265 static PathServiceProxy newFromEndpoint( |
2197 core.MojoMessagePipeEndpoint endpoint) { | 2266 core.MojoMessagePipeEndpoint endpoint) { |
2198 assert(endpoint.setDescription("For PathServiceProxy")); | 2267 assert(endpoint.setDescription("For PathServiceProxy")); |
2199 return new PathServiceProxy.fromEndpoint(endpoint); | 2268 return new PathServiceProxy.fromEndpoint(endpoint); |
2200 } | 2269 } |
2201 | 2270 |
2202 | 2271 |
2203 dynamic getAppDataDir([Function responseFactory = null]) { | 2272 void getAppDataDir(void callback(String path)) { |
2204 if (impl != null) { | 2273 if (impl != null) { |
2205 return new Future(() => impl.getAppDataDir(_PathServiceStubControl._pathSe
rviceGetAppDataDirResponseParamsFactory)); | 2274 impl.getAppDataDir(callback); |
| 2275 return; |
2206 } | 2276 } |
2207 var params = new _PathServiceGetAppDataDirParams(); | 2277 var params = new _PathServiceGetAppDataDirParams(); |
2208 return ctrl.sendMessageWithRequestId( | 2278 ctrl.sendMessageWithRequestId( |
2209 params, | 2279 params, |
2210 _pathServiceMethodGetAppDataDirName, | 2280 _pathServiceMethodGetAppDataDirName, |
2211 -1, | 2281 -1, |
2212 bindings.MessageHeader.kMessageExpectsResponse); | 2282 bindings.MessageHeader.kMessageExpectsResponse, |
| 2283 callback); |
2213 } | 2284 } |
2214 dynamic getFilesDir([Function responseFactory = null]) { | 2285 void getFilesDir(void callback(String path)) { |
2215 if (impl != null) { | 2286 if (impl != null) { |
2216 return new Future(() => impl.getFilesDir(_PathServiceStubControl._pathServ
iceGetFilesDirResponseParamsFactory)); | 2287 impl.getFilesDir(callback); |
| 2288 return; |
2217 } | 2289 } |
2218 var params = new _PathServiceGetFilesDirParams(); | 2290 var params = new _PathServiceGetFilesDirParams(); |
2219 return ctrl.sendMessageWithRequestId( | 2291 ctrl.sendMessageWithRequestId( |
2220 params, | 2292 params, |
2221 _pathServiceMethodGetFilesDirName, | 2293 _pathServiceMethodGetFilesDirName, |
2222 -1, | 2294 -1, |
2223 bindings.MessageHeader.kMessageExpectsResponse); | 2295 bindings.MessageHeader.kMessageExpectsResponse, |
| 2296 callback); |
2224 } | 2297 } |
2225 dynamic getCacheDir([Function responseFactory = null]) { | 2298 void getCacheDir(void callback(String path)) { |
2226 if (impl != null) { | 2299 if (impl != null) { |
2227 return new Future(() => impl.getCacheDir(_PathServiceStubControl._pathServ
iceGetCacheDirResponseParamsFactory)); | 2300 impl.getCacheDir(callback); |
| 2301 return; |
2228 } | 2302 } |
2229 var params = new _PathServiceGetCacheDirParams(); | 2303 var params = new _PathServiceGetCacheDirParams(); |
2230 return ctrl.sendMessageWithRequestId( | 2304 ctrl.sendMessageWithRequestId( |
2231 params, | 2305 params, |
2232 _pathServiceMethodGetCacheDirName, | 2306 _pathServiceMethodGetCacheDirName, |
2233 -1, | 2307 -1, |
2234 bindings.MessageHeader.kMessageExpectsResponse); | 2308 bindings.MessageHeader.kMessageExpectsResponse, |
| 2309 callback); |
2235 } | 2310 } |
2236 } | 2311 } |
2237 | 2312 |
2238 class _PathServiceStubControl | 2313 class _PathServiceStubControl |
2239 extends bindings.StubMessageHandler | 2314 extends bindings.StubMessageHandler |
2240 implements bindings.StubControl<PathService> { | 2315 implements bindings.StubControl<PathService> { |
2241 PathService _impl; | 2316 PathService _impl; |
2242 | 2317 |
2243 _PathServiceStubControl.fromEndpoint( | 2318 _PathServiceStubControl.fromEndpoint( |
2244 core.MojoMessagePipeEndpoint endpoint, [PathService impl]) | 2319 core.MojoMessagePipeEndpoint endpoint, [PathService impl]) |
2245 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 2320 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
2246 _impl = impl; | 2321 _impl = impl; |
2247 } | 2322 } |
2248 | 2323 |
2249 _PathServiceStubControl.fromHandle( | 2324 _PathServiceStubControl.fromHandle( |
2250 core.MojoHandle handle, [PathService impl]) | 2325 core.MojoHandle handle, [PathService impl]) |
2251 : super.fromHandle(handle, autoBegin: impl != null) { | 2326 : super.fromHandle(handle, autoBegin: impl != null) { |
2252 _impl = impl; | 2327 _impl = impl; |
2253 } | 2328 } |
2254 | 2329 |
2255 _PathServiceStubControl.unbound([this._impl]) : super.unbound(); | 2330 _PathServiceStubControl.unbound([this._impl]) : super.unbound(); |
2256 | 2331 |
2257 String get serviceName => PathService.serviceName; | 2332 String get serviceName => PathService.serviceName; |
2258 | 2333 |
2259 | 2334 |
2260 static PathServiceGetAppDataDirResponseParams _pathServiceGetAppDataDirRespons
eParamsFactory(String path) { | 2335 Function _pathServiceGetAppDataDirResponseParamsResponder( |
2261 var result = new PathServiceGetAppDataDirResponseParams(); | 2336 int requestId) { |
2262 result.path = path; | 2337 return (String path) { |
2263 return result; | 2338 var result = new PathServiceGetAppDataDirResponseParams(); |
| 2339 result.path = path; |
| 2340 sendResponse(buildResponseWithId( |
| 2341 result, |
| 2342 _pathServiceMethodGetAppDataDirName, |
| 2343 requestId, |
| 2344 bindings.MessageHeader.kMessageIsResponse)); |
| 2345 }; |
2264 } | 2346 } |
2265 static PathServiceGetFilesDirResponseParams _pathServiceGetFilesDirResponsePar
amsFactory(String path) { | 2347 Function _pathServiceGetFilesDirResponseParamsResponder( |
2266 var result = new PathServiceGetFilesDirResponseParams(); | 2348 int requestId) { |
2267 result.path = path; | 2349 return (String path) { |
2268 return result; | 2350 var result = new PathServiceGetFilesDirResponseParams(); |
| 2351 result.path = path; |
| 2352 sendResponse(buildResponseWithId( |
| 2353 result, |
| 2354 _pathServiceMethodGetFilesDirName, |
| 2355 requestId, |
| 2356 bindings.MessageHeader.kMessageIsResponse)); |
| 2357 }; |
2269 } | 2358 } |
2270 static PathServiceGetCacheDirResponseParams _pathServiceGetCacheDirResponsePar
amsFactory(String path) { | 2359 Function _pathServiceGetCacheDirResponseParamsResponder( |
2271 var result = new PathServiceGetCacheDirResponseParams(); | 2360 int requestId) { |
2272 result.path = path; | 2361 return (String path) { |
2273 return result; | 2362 var result = new PathServiceGetCacheDirResponseParams(); |
| 2363 result.path = path; |
| 2364 sendResponse(buildResponseWithId( |
| 2365 result, |
| 2366 _pathServiceMethodGetCacheDirName, |
| 2367 requestId, |
| 2368 bindings.MessageHeader.kMessageIsResponse)); |
| 2369 }; |
2274 } | 2370 } |
2275 | 2371 |
2276 dynamic handleMessage(bindings.ServiceMessage message) { | 2372 void handleMessage(bindings.ServiceMessage message) { |
2277 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2373 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
2278 return bindings.ControlMessageHandler.handleMessage(this, | 2374 bindings.ControlMessageHandler.handleMessage( |
2279 0, | 2375 this, 0, message); |
2280 message); | 2376 return; |
2281 } | 2377 } |
2282 if (_impl == null) { | 2378 if (_impl == null) { |
2283 throw new core.MojoApiError("$this has no implementation set"); | 2379 throw new core.MojoApiError("$this has no implementation set"); |
2284 } | 2380 } |
2285 switch (message.header.type) { | 2381 switch (message.header.type) { |
2286 case _pathServiceMethodGetAppDataDirName: | 2382 case _pathServiceMethodGetAppDataDirName: |
2287 var response = _impl.getAppDataDir(_pathServiceGetAppDataDirResponsePara
msFactory); | 2383 _impl.getAppDataDir(_pathServiceGetAppDataDirResponseParamsResponder(mes
sage.header.requestId)); |
2288 if (response is Future) { | |
2289 return response.then((response) { | |
2290 if (response != null) { | |
2291 return buildResponseWithId( | |
2292 response, | |
2293 _pathServiceMethodGetAppDataDirName, | |
2294 message.header.requestId, | |
2295 bindings.MessageHeader.kMessageIsResponse); | |
2296 } | |
2297 }); | |
2298 } else if (response != null) { | |
2299 return buildResponseWithId( | |
2300 response, | |
2301 _pathServiceMethodGetAppDataDirName, | |
2302 message.header.requestId, | |
2303 bindings.MessageHeader.kMessageIsResponse); | |
2304 } | |
2305 break; | 2384 break; |
2306 case _pathServiceMethodGetFilesDirName: | 2385 case _pathServiceMethodGetFilesDirName: |
2307 var response = _impl.getFilesDir(_pathServiceGetFilesDirResponseParamsFa
ctory); | 2386 _impl.getFilesDir(_pathServiceGetFilesDirResponseParamsResponder(message
.header.requestId)); |
2308 if (response is Future) { | |
2309 return response.then((response) { | |
2310 if (response != null) { | |
2311 return buildResponseWithId( | |
2312 response, | |
2313 _pathServiceMethodGetFilesDirName, | |
2314 message.header.requestId, | |
2315 bindings.MessageHeader.kMessageIsResponse); | |
2316 } | |
2317 }); | |
2318 } else if (response != null) { | |
2319 return buildResponseWithId( | |
2320 response, | |
2321 _pathServiceMethodGetFilesDirName, | |
2322 message.header.requestId, | |
2323 bindings.MessageHeader.kMessageIsResponse); | |
2324 } | |
2325 break; | 2387 break; |
2326 case _pathServiceMethodGetCacheDirName: | 2388 case _pathServiceMethodGetCacheDirName: |
2327 var response = _impl.getCacheDir(_pathServiceGetCacheDirResponseParamsFa
ctory); | 2389 _impl.getCacheDir(_pathServiceGetCacheDirResponseParamsResponder(message
.header.requestId)); |
2328 if (response is Future) { | |
2329 return response.then((response) { | |
2330 if (response != null) { | |
2331 return buildResponseWithId( | |
2332 response, | |
2333 _pathServiceMethodGetCacheDirName, | |
2334 message.header.requestId, | |
2335 bindings.MessageHeader.kMessageIsResponse); | |
2336 } | |
2337 }); | |
2338 } else if (response != null) { | |
2339 return buildResponseWithId( | |
2340 response, | |
2341 _pathServiceMethodGetCacheDirName, | |
2342 message.header.requestId, | |
2343 bindings.MessageHeader.kMessageIsResponse); | |
2344 } | |
2345 break; | 2390 break; |
2346 default: | 2391 default: |
2347 throw new bindings.MojoCodecError("Unexpected message name"); | 2392 throw new bindings.MojoCodecError("Unexpected message name"); |
2348 break; | 2393 break; |
2349 } | 2394 } |
2350 return null; | |
2351 } | 2395 } |
2352 | 2396 |
2353 PathService get impl => _impl; | 2397 PathService get impl => _impl; |
2354 set impl(PathService d) { | 2398 set impl(PathService d) { |
2355 if (d == null) { | 2399 if (d == null) { |
2356 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 2400 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
2357 } | 2401 } |
2358 if (isBound && (_impl == null)) { | 2402 if (isBound && (_impl == null)) { |
2359 beginHandlingEvents(); | 2403 beginHandlingEvents(); |
2360 } | 2404 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2394 core.MojoHandle handle, [PathService impl]) | 2438 core.MojoHandle handle, [PathService impl]) |
2395 : super(new _PathServiceStubControl.fromHandle(handle, impl)); | 2439 : super(new _PathServiceStubControl.fromHandle(handle, impl)); |
2396 | 2440 |
2397 static PathServiceStub newFromEndpoint( | 2441 static PathServiceStub newFromEndpoint( |
2398 core.MojoMessagePipeEndpoint endpoint) { | 2442 core.MojoMessagePipeEndpoint endpoint) { |
2399 assert(endpoint.setDescription("For PathServiceStub")); | 2443 assert(endpoint.setDescription("For PathServiceStub")); |
2400 return new PathServiceStub.fromEndpoint(endpoint); | 2444 return new PathServiceStub.fromEndpoint(endpoint); |
2401 } | 2445 } |
2402 | 2446 |
2403 | 2447 |
2404 dynamic getAppDataDir([Function responseFactory = null]) { | 2448 void getAppDataDir(void callback(String path)) { |
2405 return impl.getAppDataDir(responseFactory); | 2449 return impl.getAppDataDir(callback); |
2406 } | 2450 } |
2407 dynamic getFilesDir([Function responseFactory = null]) { | 2451 void getFilesDir(void callback(String path)) { |
2408 return impl.getFilesDir(responseFactory); | 2452 return impl.getFilesDir(callback); |
2409 } | 2453 } |
2410 dynamic getCacheDir([Function responseFactory = null]) { | 2454 void getCacheDir(void callback(String path)) { |
2411 return impl.getCacheDir(responseFactory); | 2455 return impl.getCacheDir(callback); |
2412 } | 2456 } |
2413 } | 2457 } |
2414 | 2458 |
2415 const int _userFeedbackMethodPerformHapticFeedbackName = 0; | 2459 const int _userFeedbackMethodPerformHapticFeedbackName = 0; |
2416 const int _userFeedbackMethodPerformAuralFeedbackName = 1; | 2460 const int _userFeedbackMethodPerformAuralFeedbackName = 1; |
2417 | 2461 |
2418 class _UserFeedbackServiceDescription implements service_describer.ServiceDescri
ption { | 2462 class _UserFeedbackServiceDescription implements service_describer.ServiceDescri
ption { |
2419 dynamic getTopLevelInterface([Function responseFactory]) => | 2463 void getTopLevelInterface(Function responder) { |
2420 responseFactory(null); | 2464 responder(null); |
| 2465 } |
2421 | 2466 |
2422 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2467 void getTypeDefinition(String typeKey, Function responder) { |
2423 responseFactory(null); | 2468 responder(null); |
| 2469 } |
2424 | 2470 |
2425 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2471 void getAllTypeDefinitions(Function responder) { |
2426 responseFactory(null); | 2472 responder(null); |
| 2473 } |
2427 } | 2474 } |
2428 | 2475 |
2429 abstract class UserFeedback { | 2476 abstract class UserFeedback { |
2430 static const String serviceName = null; | 2477 static const String serviceName = null; |
2431 | 2478 |
2432 static service_describer.ServiceDescription _cachedServiceDescription; | 2479 static service_describer.ServiceDescription _cachedServiceDescription; |
2433 static service_describer.ServiceDescription get serviceDescription { | 2480 static service_describer.ServiceDescription get serviceDescription { |
2434 if (_cachedServiceDescription == null) { | 2481 if (_cachedServiceDescription == null) { |
2435 _cachedServiceDescription = new _UserFeedbackServiceDescription(); | 2482 _cachedServiceDescription = new _UserFeedbackServiceDescription(); |
2436 } | 2483 } |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 : super.fromHandle(handle, autoBegin: impl != null) { | 2628 : super.fromHandle(handle, autoBegin: impl != null) { |
2582 _impl = impl; | 2629 _impl = impl; |
2583 } | 2630 } |
2584 | 2631 |
2585 _UserFeedbackStubControl.unbound([this._impl]) : super.unbound(); | 2632 _UserFeedbackStubControl.unbound([this._impl]) : super.unbound(); |
2586 | 2633 |
2587 String get serviceName => UserFeedback.serviceName; | 2634 String get serviceName => UserFeedback.serviceName; |
2588 | 2635 |
2589 | 2636 |
2590 | 2637 |
2591 dynamic handleMessage(bindings.ServiceMessage message) { | 2638 void handleMessage(bindings.ServiceMessage message) { |
2592 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2639 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
2593 return bindings.ControlMessageHandler.handleMessage(this, | 2640 bindings.ControlMessageHandler.handleMessage( |
2594 0, | 2641 this, 0, message); |
2595 message); | 2642 return; |
2596 } | 2643 } |
2597 if (_impl == null) { | 2644 if (_impl == null) { |
2598 throw new core.MojoApiError("$this has no implementation set"); | 2645 throw new core.MojoApiError("$this has no implementation set"); |
2599 } | 2646 } |
2600 switch (message.header.type) { | 2647 switch (message.header.type) { |
2601 case _userFeedbackMethodPerformHapticFeedbackName: | 2648 case _userFeedbackMethodPerformHapticFeedbackName: |
2602 var params = _UserFeedbackPerformHapticFeedbackParams.deserialize( | 2649 var params = _UserFeedbackPerformHapticFeedbackParams.deserialize( |
2603 message.payload); | 2650 message.payload); |
2604 _impl.performHapticFeedback(params.type); | 2651 _impl.performHapticFeedback(params.type); |
2605 break; | 2652 break; |
2606 case _userFeedbackMethodPerformAuralFeedbackName: | 2653 case _userFeedbackMethodPerformAuralFeedbackName: |
2607 var params = _UserFeedbackPerformAuralFeedbackParams.deserialize( | 2654 var params = _UserFeedbackPerformAuralFeedbackParams.deserialize( |
2608 message.payload); | 2655 message.payload); |
2609 _impl.performAuralFeedback(params.type); | 2656 _impl.performAuralFeedback(params.type); |
2610 break; | 2657 break; |
2611 default: | 2658 default: |
2612 throw new bindings.MojoCodecError("Unexpected message name"); | 2659 throw new bindings.MojoCodecError("Unexpected message name"); |
2613 break; | 2660 break; |
2614 } | 2661 } |
2615 return null; | |
2616 } | 2662 } |
2617 | 2663 |
2618 UserFeedback get impl => _impl; | 2664 UserFeedback get impl => _impl; |
2619 set impl(UserFeedback d) { | 2665 set impl(UserFeedback d) { |
2620 if (d == null) { | 2666 if (d == null) { |
2621 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 2667 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
2622 } | 2668 } |
2623 if (isBound && (_impl == null)) { | 2669 if (isBound && (_impl == null)) { |
2624 beginHandlingEvents(); | 2670 beginHandlingEvents(); |
2625 } | 2671 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2669 void performHapticFeedback(HapticFeedbackType type) { | 2715 void performHapticFeedback(HapticFeedbackType type) { |
2670 return impl.performHapticFeedback(type); | 2716 return impl.performHapticFeedback(type); |
2671 } | 2717 } |
2672 void performAuralFeedback(AuralFeedbackType type) { | 2718 void performAuralFeedback(AuralFeedbackType type) { |
2673 return impl.performAuralFeedback(type); | 2719 return impl.performAuralFeedback(type); |
2674 } | 2720 } |
2675 } | 2721 } |
2676 | 2722 |
2677 | 2723 |
2678 | 2724 |
OLD | NEW |