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