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 directory_mojom; | 4 library directory_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 import 'package:mojo_services/mojo/files/file.mojom.dart' as file_mojom; | 9 import 'package:mojo_services/mojo/files/file.mojom.dart' as file_mojom; |
10 import 'package:mojo_services/mojo/files/types.mojom.dart' as types_mojom; | 10 import 'package:mojo_services/mojo/files/types.mojom.dart' as types_mojom; |
11 | 11 |
12 | 12 |
13 | 13 |
14 class _DirectoryReadParams extends bindings.Struct { | 14 class _DirectoryReadParams extends bindings.Struct { |
15 static const List<bindings.StructDataHeader> kVersions = const [ | 15 static const List<bindings.StructDataHeader> kVersions = const [ |
16 const bindings.StructDataHeader(8, 0) | 16 const bindings.StructDataHeader(8, 0) |
17 ]; | 17 ]; |
18 | 18 |
19 _DirectoryReadParams() : super(kVersions.last.size); | 19 _DirectoryReadParams() : super(kVersions.last.size); |
20 | 20 |
| 21 _DirectoryReadParams.init( |
| 22 ) : super(kVersions.last.size); |
| 23 |
21 static _DirectoryReadParams deserialize(bindings.Message message) { | 24 static _DirectoryReadParams deserialize(bindings.Message message) { |
22 var decoder = new bindings.Decoder(message); | 25 var decoder = new bindings.Decoder(message); |
23 var result = decode(decoder); | 26 var result = decode(decoder); |
24 if (decoder.excessHandles != null) { | 27 if (decoder.excessHandles != null) { |
25 decoder.excessHandles.forEach((h) => h.close()); | 28 decoder.excessHandles.forEach((h) => h.close()); |
26 } | 29 } |
27 return result; | 30 return result; |
28 } | 31 } |
29 | 32 |
30 static _DirectoryReadParams decode(bindings.Decoder decoder0) { | 33 static _DirectoryReadParams decode(bindings.Decoder decoder0) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 74 |
72 class DirectoryReadResponseParams extends bindings.Struct { | 75 class DirectoryReadResponseParams extends bindings.Struct { |
73 static const List<bindings.StructDataHeader> kVersions = const [ | 76 static const List<bindings.StructDataHeader> kVersions = const [ |
74 const bindings.StructDataHeader(24, 0) | 77 const bindings.StructDataHeader(24, 0) |
75 ]; | 78 ]; |
76 types_mojom.Error error = null; | 79 types_mojom.Error error = null; |
77 List<types_mojom.DirectoryEntry> directoryContents = null; | 80 List<types_mojom.DirectoryEntry> directoryContents = null; |
78 | 81 |
79 DirectoryReadResponseParams() : super(kVersions.last.size); | 82 DirectoryReadResponseParams() : super(kVersions.last.size); |
80 | 83 |
| 84 DirectoryReadResponseParams.init( |
| 85 types_mojom.Error this.error, |
| 86 List<types_mojom.DirectoryEntry> this.directoryContents |
| 87 ) : super(kVersions.last.size); |
| 88 |
81 static DirectoryReadResponseParams deserialize(bindings.Message message) { | 89 static DirectoryReadResponseParams deserialize(bindings.Message message) { |
82 var decoder = new bindings.Decoder(message); | 90 var decoder = new bindings.Decoder(message); |
83 var result = decode(decoder); | 91 var result = decode(decoder); |
84 if (decoder.excessHandles != null) { | 92 if (decoder.excessHandles != null) { |
85 decoder.excessHandles.forEach((h) => h.close()); | 93 decoder.excessHandles.forEach((h) => h.close()); |
86 } | 94 } |
87 return result; | 95 return result; |
88 } | 96 } |
89 | 97 |
90 static DirectoryReadResponseParams decode(bindings.Decoder decoder0) { | 98 static DirectoryReadResponseParams decode(bindings.Decoder decoder0) { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 185 } |
178 | 186 |
179 | 187 |
180 class _DirectoryStatParams extends bindings.Struct { | 188 class _DirectoryStatParams extends bindings.Struct { |
181 static const List<bindings.StructDataHeader> kVersions = const [ | 189 static const List<bindings.StructDataHeader> kVersions = const [ |
182 const bindings.StructDataHeader(8, 0) | 190 const bindings.StructDataHeader(8, 0) |
183 ]; | 191 ]; |
184 | 192 |
185 _DirectoryStatParams() : super(kVersions.last.size); | 193 _DirectoryStatParams() : super(kVersions.last.size); |
186 | 194 |
| 195 _DirectoryStatParams.init( |
| 196 ) : super(kVersions.last.size); |
| 197 |
187 static _DirectoryStatParams deserialize(bindings.Message message) { | 198 static _DirectoryStatParams deserialize(bindings.Message message) { |
188 var decoder = new bindings.Decoder(message); | 199 var decoder = new bindings.Decoder(message); |
189 var result = decode(decoder); | 200 var result = decode(decoder); |
190 if (decoder.excessHandles != null) { | 201 if (decoder.excessHandles != null) { |
191 decoder.excessHandles.forEach((h) => h.close()); | 202 decoder.excessHandles.forEach((h) => h.close()); |
192 } | 203 } |
193 return result; | 204 return result; |
194 } | 205 } |
195 | 206 |
196 static _DirectoryStatParams decode(bindings.Decoder decoder0) { | 207 static _DirectoryStatParams decode(bindings.Decoder decoder0) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 248 |
238 class DirectoryStatResponseParams extends bindings.Struct { | 249 class DirectoryStatResponseParams extends bindings.Struct { |
239 static const List<bindings.StructDataHeader> kVersions = const [ | 250 static const List<bindings.StructDataHeader> kVersions = const [ |
240 const bindings.StructDataHeader(24, 0) | 251 const bindings.StructDataHeader(24, 0) |
241 ]; | 252 ]; |
242 types_mojom.Error error = null; | 253 types_mojom.Error error = null; |
243 types_mojom.FileInformation fileInformation = null; | 254 types_mojom.FileInformation fileInformation = null; |
244 | 255 |
245 DirectoryStatResponseParams() : super(kVersions.last.size); | 256 DirectoryStatResponseParams() : super(kVersions.last.size); |
246 | 257 |
| 258 DirectoryStatResponseParams.init( |
| 259 types_mojom.Error this.error, |
| 260 types_mojom.FileInformation this.fileInformation |
| 261 ) : super(kVersions.last.size); |
| 262 |
247 static DirectoryStatResponseParams deserialize(bindings.Message message) { | 263 static DirectoryStatResponseParams deserialize(bindings.Message message) { |
248 var decoder = new bindings.Decoder(message); | 264 var decoder = new bindings.Decoder(message); |
249 var result = decode(decoder); | 265 var result = decode(decoder); |
250 if (decoder.excessHandles != null) { | 266 if (decoder.excessHandles != null) { |
251 decoder.excessHandles.forEach((h) => h.close()); | 267 decoder.excessHandles.forEach((h) => h.close()); |
252 } | 268 } |
253 return result; | 269 return result; |
254 } | 270 } |
255 | 271 |
256 static DirectoryStatResponseParams decode(bindings.Decoder decoder0) { | 272 static DirectoryStatResponseParams decode(bindings.Decoder decoder0) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 344 |
329 class _DirectoryTouchParams extends bindings.Struct { | 345 class _DirectoryTouchParams extends bindings.Struct { |
330 static const List<bindings.StructDataHeader> kVersions = const [ | 346 static const List<bindings.StructDataHeader> kVersions = const [ |
331 const bindings.StructDataHeader(24, 0) | 347 const bindings.StructDataHeader(24, 0) |
332 ]; | 348 ]; |
333 types_mojom.TimespecOrNow atime = null; | 349 types_mojom.TimespecOrNow atime = null; |
334 types_mojom.TimespecOrNow mtime = null; | 350 types_mojom.TimespecOrNow mtime = null; |
335 | 351 |
336 _DirectoryTouchParams() : super(kVersions.last.size); | 352 _DirectoryTouchParams() : super(kVersions.last.size); |
337 | 353 |
| 354 _DirectoryTouchParams.init( |
| 355 types_mojom.TimespecOrNow this.atime, |
| 356 types_mojom.TimespecOrNow this.mtime |
| 357 ) : super(kVersions.last.size); |
| 358 |
338 static _DirectoryTouchParams deserialize(bindings.Message message) { | 359 static _DirectoryTouchParams deserialize(bindings.Message message) { |
339 var decoder = new bindings.Decoder(message); | 360 var decoder = new bindings.Decoder(message); |
340 var result = decode(decoder); | 361 var result = decode(decoder); |
341 if (decoder.excessHandles != null) { | 362 if (decoder.excessHandles != null) { |
342 decoder.excessHandles.forEach((h) => h.close()); | 363 decoder.excessHandles.forEach((h) => h.close()); |
343 } | 364 } |
344 return result; | 365 return result; |
345 } | 366 } |
346 | 367 |
347 static _DirectoryTouchParams decode(bindings.Decoder decoder0) { | 368 static _DirectoryTouchParams decode(bindings.Decoder decoder0) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 436 |
416 | 437 |
417 class DirectoryTouchResponseParams extends bindings.Struct { | 438 class DirectoryTouchResponseParams extends bindings.Struct { |
418 static const List<bindings.StructDataHeader> kVersions = const [ | 439 static const List<bindings.StructDataHeader> kVersions = const [ |
419 const bindings.StructDataHeader(16, 0) | 440 const bindings.StructDataHeader(16, 0) |
420 ]; | 441 ]; |
421 types_mojom.Error error = null; | 442 types_mojom.Error error = null; |
422 | 443 |
423 DirectoryTouchResponseParams() : super(kVersions.last.size); | 444 DirectoryTouchResponseParams() : super(kVersions.last.size); |
424 | 445 |
| 446 DirectoryTouchResponseParams.init( |
| 447 types_mojom.Error this.error |
| 448 ) : super(kVersions.last.size); |
| 449 |
425 static DirectoryTouchResponseParams deserialize(bindings.Message message) { | 450 static DirectoryTouchResponseParams deserialize(bindings.Message message) { |
426 var decoder = new bindings.Decoder(message); | 451 var decoder = new bindings.Decoder(message); |
427 var result = decode(decoder); | 452 var result = decode(decoder); |
428 if (decoder.excessHandles != null) { | 453 if (decoder.excessHandles != null) { |
429 decoder.excessHandles.forEach((h) => h.close()); | 454 decoder.excessHandles.forEach((h) => h.close()); |
430 } | 455 } |
431 return result; | 456 return result; |
432 } | 457 } |
433 | 458 |
434 static DirectoryTouchResponseParams decode(bindings.Decoder decoder0) { | 459 static DirectoryTouchResponseParams decode(bindings.Decoder decoder0) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 class _DirectoryOpenFileParams extends bindings.Struct { | 518 class _DirectoryOpenFileParams extends bindings.Struct { |
494 static const List<bindings.StructDataHeader> kVersions = const [ | 519 static const List<bindings.StructDataHeader> kVersions = const [ |
495 const bindings.StructDataHeader(24, 0) | 520 const bindings.StructDataHeader(24, 0) |
496 ]; | 521 ]; |
497 String path = null; | 522 String path = null; |
498 file_mojom.FileInterfaceRequest file = null; | 523 file_mojom.FileInterfaceRequest file = null; |
499 int openFlags = 0; | 524 int openFlags = 0; |
500 | 525 |
501 _DirectoryOpenFileParams() : super(kVersions.last.size); | 526 _DirectoryOpenFileParams() : super(kVersions.last.size); |
502 | 527 |
| 528 _DirectoryOpenFileParams.init( |
| 529 String this.path, |
| 530 file_mojom.FileInterfaceRequest this.file, |
| 531 int this.openFlags |
| 532 ) : super(kVersions.last.size); |
| 533 |
503 static _DirectoryOpenFileParams deserialize(bindings.Message message) { | 534 static _DirectoryOpenFileParams deserialize(bindings.Message message) { |
504 var decoder = new bindings.Decoder(message); | 535 var decoder = new bindings.Decoder(message); |
505 var result = decode(decoder); | 536 var result = decode(decoder); |
506 if (decoder.excessHandles != null) { | 537 if (decoder.excessHandles != null) { |
507 decoder.excessHandles.forEach((h) => h.close()); | 538 decoder.excessHandles.forEach((h) => h.close()); |
508 } | 539 } |
509 return result; | 540 return result; |
510 } | 541 } |
511 | 542 |
512 static _DirectoryOpenFileParams decode(bindings.Decoder decoder0) { | 543 static _DirectoryOpenFileParams decode(bindings.Decoder decoder0) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 | 619 |
589 | 620 |
590 class DirectoryOpenFileResponseParams extends bindings.Struct { | 621 class DirectoryOpenFileResponseParams extends bindings.Struct { |
591 static const List<bindings.StructDataHeader> kVersions = const [ | 622 static const List<bindings.StructDataHeader> kVersions = const [ |
592 const bindings.StructDataHeader(16, 0) | 623 const bindings.StructDataHeader(16, 0) |
593 ]; | 624 ]; |
594 types_mojom.Error error = null; | 625 types_mojom.Error error = null; |
595 | 626 |
596 DirectoryOpenFileResponseParams() : super(kVersions.last.size); | 627 DirectoryOpenFileResponseParams() : super(kVersions.last.size); |
597 | 628 |
| 629 DirectoryOpenFileResponseParams.init( |
| 630 types_mojom.Error this.error |
| 631 ) : super(kVersions.last.size); |
| 632 |
598 static DirectoryOpenFileResponseParams deserialize(bindings.Message message) { | 633 static DirectoryOpenFileResponseParams deserialize(bindings.Message message) { |
599 var decoder = new bindings.Decoder(message); | 634 var decoder = new bindings.Decoder(message); |
600 var result = decode(decoder); | 635 var result = decode(decoder); |
601 if (decoder.excessHandles != null) { | 636 if (decoder.excessHandles != null) { |
602 decoder.excessHandles.forEach((h) => h.close()); | 637 decoder.excessHandles.forEach((h) => h.close()); |
603 } | 638 } |
604 return result; | 639 return result; |
605 } | 640 } |
606 | 641 |
607 static DirectoryOpenFileResponseParams decode(bindings.Decoder decoder0) { | 642 static DirectoryOpenFileResponseParams decode(bindings.Decoder decoder0) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 class _DirectoryOpenDirectoryParams extends bindings.Struct { | 701 class _DirectoryOpenDirectoryParams extends bindings.Struct { |
667 static const List<bindings.StructDataHeader> kVersions = const [ | 702 static const List<bindings.StructDataHeader> kVersions = const [ |
668 const bindings.StructDataHeader(24, 0) | 703 const bindings.StructDataHeader(24, 0) |
669 ]; | 704 ]; |
670 String path = null; | 705 String path = null; |
671 DirectoryInterfaceRequest directory = null; | 706 DirectoryInterfaceRequest directory = null; |
672 int openFlags = 0; | 707 int openFlags = 0; |
673 | 708 |
674 _DirectoryOpenDirectoryParams() : super(kVersions.last.size); | 709 _DirectoryOpenDirectoryParams() : super(kVersions.last.size); |
675 | 710 |
| 711 _DirectoryOpenDirectoryParams.init( |
| 712 String this.path, |
| 713 DirectoryInterfaceRequest this.directory, |
| 714 int this.openFlags |
| 715 ) : super(kVersions.last.size); |
| 716 |
676 static _DirectoryOpenDirectoryParams deserialize(bindings.Message message) { | 717 static _DirectoryOpenDirectoryParams deserialize(bindings.Message message) { |
677 var decoder = new bindings.Decoder(message); | 718 var decoder = new bindings.Decoder(message); |
678 var result = decode(decoder); | 719 var result = decode(decoder); |
679 if (decoder.excessHandles != null) { | 720 if (decoder.excessHandles != null) { |
680 decoder.excessHandles.forEach((h) => h.close()); | 721 decoder.excessHandles.forEach((h) => h.close()); |
681 } | 722 } |
682 return result; | 723 return result; |
683 } | 724 } |
684 | 725 |
685 static _DirectoryOpenDirectoryParams decode(bindings.Decoder decoder0) { | 726 static _DirectoryOpenDirectoryParams decode(bindings.Decoder decoder0) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 | 802 |
762 | 803 |
763 class DirectoryOpenDirectoryResponseParams extends bindings.Struct { | 804 class DirectoryOpenDirectoryResponseParams extends bindings.Struct { |
764 static const List<bindings.StructDataHeader> kVersions = const [ | 805 static const List<bindings.StructDataHeader> kVersions = const [ |
765 const bindings.StructDataHeader(16, 0) | 806 const bindings.StructDataHeader(16, 0) |
766 ]; | 807 ]; |
767 types_mojom.Error error = null; | 808 types_mojom.Error error = null; |
768 | 809 |
769 DirectoryOpenDirectoryResponseParams() : super(kVersions.last.size); | 810 DirectoryOpenDirectoryResponseParams() : super(kVersions.last.size); |
770 | 811 |
| 812 DirectoryOpenDirectoryResponseParams.init( |
| 813 types_mojom.Error this.error |
| 814 ) : super(kVersions.last.size); |
| 815 |
771 static DirectoryOpenDirectoryResponseParams deserialize(bindings.Message messa
ge) { | 816 static DirectoryOpenDirectoryResponseParams deserialize(bindings.Message messa
ge) { |
772 var decoder = new bindings.Decoder(message); | 817 var decoder = new bindings.Decoder(message); |
773 var result = decode(decoder); | 818 var result = decode(decoder); |
774 if (decoder.excessHandles != null) { | 819 if (decoder.excessHandles != null) { |
775 decoder.excessHandles.forEach((h) => h.close()); | 820 decoder.excessHandles.forEach((h) => h.close()); |
776 } | 821 } |
777 return result; | 822 return result; |
778 } | 823 } |
779 | 824 |
780 static DirectoryOpenDirectoryResponseParams decode(bindings.Decoder decoder0)
{ | 825 static DirectoryOpenDirectoryResponseParams decode(bindings.Decoder decoder0)
{ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 | 883 |
839 class _DirectoryRenameParams extends bindings.Struct { | 884 class _DirectoryRenameParams extends bindings.Struct { |
840 static const List<bindings.StructDataHeader> kVersions = const [ | 885 static const List<bindings.StructDataHeader> kVersions = const [ |
841 const bindings.StructDataHeader(24, 0) | 886 const bindings.StructDataHeader(24, 0) |
842 ]; | 887 ]; |
843 String path = null; | 888 String path = null; |
844 String newPath = null; | 889 String newPath = null; |
845 | 890 |
846 _DirectoryRenameParams() : super(kVersions.last.size); | 891 _DirectoryRenameParams() : super(kVersions.last.size); |
847 | 892 |
| 893 _DirectoryRenameParams.init( |
| 894 String this.path, |
| 895 String this.newPath |
| 896 ) : super(kVersions.last.size); |
| 897 |
848 static _DirectoryRenameParams deserialize(bindings.Message message) { | 898 static _DirectoryRenameParams deserialize(bindings.Message message) { |
849 var decoder = new bindings.Decoder(message); | 899 var decoder = new bindings.Decoder(message); |
850 var result = decode(decoder); | 900 var result = decode(decoder); |
851 if (decoder.excessHandles != null) { | 901 if (decoder.excessHandles != null) { |
852 decoder.excessHandles.forEach((h) => h.close()); | 902 decoder.excessHandles.forEach((h) => h.close()); |
853 } | 903 } |
854 return result; | 904 return result; |
855 } | 905 } |
856 | 906 |
857 static _DirectoryRenameParams decode(bindings.Decoder decoder0) { | 907 static _DirectoryRenameParams decode(bindings.Decoder decoder0) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 | 973 |
924 | 974 |
925 class DirectoryRenameResponseParams extends bindings.Struct { | 975 class DirectoryRenameResponseParams extends bindings.Struct { |
926 static const List<bindings.StructDataHeader> kVersions = const [ | 976 static const List<bindings.StructDataHeader> kVersions = const [ |
927 const bindings.StructDataHeader(16, 0) | 977 const bindings.StructDataHeader(16, 0) |
928 ]; | 978 ]; |
929 types_mojom.Error error = null; | 979 types_mojom.Error error = null; |
930 | 980 |
931 DirectoryRenameResponseParams() : super(kVersions.last.size); | 981 DirectoryRenameResponseParams() : super(kVersions.last.size); |
932 | 982 |
| 983 DirectoryRenameResponseParams.init( |
| 984 types_mojom.Error this.error |
| 985 ) : super(kVersions.last.size); |
| 986 |
933 static DirectoryRenameResponseParams deserialize(bindings.Message message) { | 987 static DirectoryRenameResponseParams deserialize(bindings.Message message) { |
934 var decoder = new bindings.Decoder(message); | 988 var decoder = new bindings.Decoder(message); |
935 var result = decode(decoder); | 989 var result = decode(decoder); |
936 if (decoder.excessHandles != null) { | 990 if (decoder.excessHandles != null) { |
937 decoder.excessHandles.forEach((h) => h.close()); | 991 decoder.excessHandles.forEach((h) => h.close()); |
938 } | 992 } |
939 return result; | 993 return result; |
940 } | 994 } |
941 | 995 |
942 static DirectoryRenameResponseParams decode(bindings.Decoder decoder0) { | 996 static DirectoryRenameResponseParams decode(bindings.Decoder decoder0) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 | 1054 |
1001 class _DirectoryDeleteParams extends bindings.Struct { | 1055 class _DirectoryDeleteParams extends bindings.Struct { |
1002 static const List<bindings.StructDataHeader> kVersions = const [ | 1056 static const List<bindings.StructDataHeader> kVersions = const [ |
1003 const bindings.StructDataHeader(24, 0) | 1057 const bindings.StructDataHeader(24, 0) |
1004 ]; | 1058 ]; |
1005 String path = null; | 1059 String path = null; |
1006 int deleteFlags = 0; | 1060 int deleteFlags = 0; |
1007 | 1061 |
1008 _DirectoryDeleteParams() : super(kVersions.last.size); | 1062 _DirectoryDeleteParams() : super(kVersions.last.size); |
1009 | 1063 |
| 1064 _DirectoryDeleteParams.init( |
| 1065 String this.path, |
| 1066 int this.deleteFlags |
| 1067 ) : super(kVersions.last.size); |
| 1068 |
1010 static _DirectoryDeleteParams deserialize(bindings.Message message) { | 1069 static _DirectoryDeleteParams deserialize(bindings.Message message) { |
1011 var decoder = new bindings.Decoder(message); | 1070 var decoder = new bindings.Decoder(message); |
1012 var result = decode(decoder); | 1071 var result = decode(decoder); |
1013 if (decoder.excessHandles != null) { | 1072 if (decoder.excessHandles != null) { |
1014 decoder.excessHandles.forEach((h) => h.close()); | 1073 decoder.excessHandles.forEach((h) => h.close()); |
1015 } | 1074 } |
1016 return result; | 1075 return result; |
1017 } | 1076 } |
1018 | 1077 |
1019 static _DirectoryDeleteParams decode(bindings.Decoder decoder0) { | 1078 static _DirectoryDeleteParams decode(bindings.Decoder decoder0) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 | 1144 |
1086 | 1145 |
1087 class DirectoryDeleteResponseParams extends bindings.Struct { | 1146 class DirectoryDeleteResponseParams extends bindings.Struct { |
1088 static const List<bindings.StructDataHeader> kVersions = const [ | 1147 static const List<bindings.StructDataHeader> kVersions = const [ |
1089 const bindings.StructDataHeader(16, 0) | 1148 const bindings.StructDataHeader(16, 0) |
1090 ]; | 1149 ]; |
1091 types_mojom.Error error = null; | 1150 types_mojom.Error error = null; |
1092 | 1151 |
1093 DirectoryDeleteResponseParams() : super(kVersions.last.size); | 1152 DirectoryDeleteResponseParams() : super(kVersions.last.size); |
1094 | 1153 |
| 1154 DirectoryDeleteResponseParams.init( |
| 1155 types_mojom.Error this.error |
| 1156 ) : super(kVersions.last.size); |
| 1157 |
1095 static DirectoryDeleteResponseParams deserialize(bindings.Message message) { | 1158 static DirectoryDeleteResponseParams deserialize(bindings.Message message) { |
1096 var decoder = new bindings.Decoder(message); | 1159 var decoder = new bindings.Decoder(message); |
1097 var result = decode(decoder); | 1160 var result = decode(decoder); |
1098 if (decoder.excessHandles != null) { | 1161 if (decoder.excessHandles != null) { |
1099 decoder.excessHandles.forEach((h) => h.close()); | 1162 decoder.excessHandles.forEach((h) => h.close()); |
1100 } | 1163 } |
1101 return result; | 1164 return result; |
1102 } | 1165 } |
1103 | 1166 |
1104 static DirectoryDeleteResponseParams decode(bindings.Decoder decoder0) { | 1167 static DirectoryDeleteResponseParams decode(bindings.Decoder decoder0) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 | 1224 |
1162 const int _directoryMethodReadName = 0; | 1225 const int _directoryMethodReadName = 0; |
1163 const int _directoryMethodStatName = 1; | 1226 const int _directoryMethodStatName = 1; |
1164 const int _directoryMethodTouchName = 2; | 1227 const int _directoryMethodTouchName = 2; |
1165 const int _directoryMethodOpenFileName = 3; | 1228 const int _directoryMethodOpenFileName = 3; |
1166 const int _directoryMethodOpenDirectoryName = 4; | 1229 const int _directoryMethodOpenDirectoryName = 4; |
1167 const int _directoryMethodRenameName = 5; | 1230 const int _directoryMethodRenameName = 5; |
1168 const int _directoryMethodDeleteName = 6; | 1231 const int _directoryMethodDeleteName = 6; |
1169 | 1232 |
1170 class _DirectoryServiceDescription implements service_describer.ServiceDescripti
on { | 1233 class _DirectoryServiceDescription implements service_describer.ServiceDescripti
on { |
1171 dynamic getTopLevelInterface([Function responseFactory]) => | 1234 void getTopLevelInterface(Function responder) { |
1172 responseFactory(null); | 1235 responder(null); |
| 1236 } |
1173 | 1237 |
1174 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1238 void getTypeDefinition(String typeKey, Function responder) { |
1175 responseFactory(null); | 1239 responder(null); |
| 1240 } |
1176 | 1241 |
1177 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1242 void getAllTypeDefinitions(Function responder) { |
1178 responseFactory(null); | 1243 responder(null); |
| 1244 } |
1179 } | 1245 } |
1180 | 1246 |
1181 abstract class Directory { | 1247 abstract class Directory { |
1182 static const String serviceName = null; | 1248 static const String serviceName = null; |
1183 | 1249 |
1184 static service_describer.ServiceDescription _cachedServiceDescription; | 1250 static service_describer.ServiceDescription _cachedServiceDescription; |
1185 static service_describer.ServiceDescription get serviceDescription { | 1251 static service_describer.ServiceDescription get serviceDescription { |
1186 if (_cachedServiceDescription == null) { | 1252 if (_cachedServiceDescription == null) { |
1187 _cachedServiceDescription = new _DirectoryServiceDescription(); | 1253 _cachedServiceDescription = new _DirectoryServiceDescription(); |
1188 } | 1254 } |
1189 return _cachedServiceDescription; | 1255 return _cachedServiceDescription; |
1190 } | 1256 } |
1191 | 1257 |
1192 static DirectoryProxy connectToService( | 1258 static DirectoryProxy connectToService( |
1193 bindings.ServiceConnector s, String url, [String serviceName]) { | 1259 bindings.ServiceConnector s, String url, [String serviceName]) { |
1194 DirectoryProxy p = new DirectoryProxy.unbound(); | 1260 DirectoryProxy p = new DirectoryProxy.unbound(); |
1195 String name = serviceName ?? Directory.serviceName; | 1261 String name = serviceName ?? Directory.serviceName; |
1196 if ((name == null) || name.isEmpty) { | 1262 if ((name == null) || name.isEmpty) { |
1197 throw new core.MojoApiError( | 1263 throw new core.MojoApiError( |
1198 "If an interface has no ServiceName, then one must be provided."); | 1264 "If an interface has no ServiceName, then one must be provided."); |
1199 } | 1265 } |
1200 s.connectToService(url, p, name); | 1266 s.connectToService(url, p, name); |
1201 return p; | 1267 return p; |
1202 } | 1268 } |
1203 dynamic read([Function responseFactory = null]); | 1269 void read(void callback(types_mojom.Error error, List<types_mojom.DirectoryEnt
ry> directoryContents)); |
1204 dynamic stat([Function responseFactory = null]); | 1270 void stat(void callback(types_mojom.Error error, types_mojom.FileInformation f
ileInformation)); |
1205 dynamic touch(types_mojom.TimespecOrNow atime,types_mojom.TimespecOrNow mtime,
[Function responseFactory = null]); | 1271 void touch(types_mojom.TimespecOrNow atime,types_mojom.TimespecOrNow mtime,voi
d callback(types_mojom.Error error)); |
1206 dynamic openFile(String path,file_mojom.FileInterfaceRequest file,int openFlag
s,[Function responseFactory = null]); | 1272 void openFile(String path,file_mojom.FileInterfaceRequest file,int openFlags,v
oid callback(types_mojom.Error error)); |
1207 dynamic openDirectory(String path,DirectoryInterfaceRequest directory,int open
Flags,[Function responseFactory = null]); | 1273 void openDirectory(String path,DirectoryInterfaceRequest directory,int openFla
gs,void callback(types_mojom.Error error)); |
1208 dynamic rename(String path,String newPath,[Function responseFactory = null]); | 1274 void rename(String path,String newPath,void callback(types_mojom.Error error))
; |
1209 dynamic delete(String path,int deleteFlags,[Function responseFactory = null]); | 1275 void delete(String path,int deleteFlags,void callback(types_mojom.Error error)
); |
1210 } | 1276 } |
1211 | 1277 |
1212 abstract class DirectoryInterface | 1278 abstract class DirectoryInterface |
1213 implements bindings.MojoInterface<Directory>, | 1279 implements bindings.MojoInterface<Directory>, |
1214 Directory { | 1280 Directory { |
1215 factory DirectoryInterface([Directory impl]) => | 1281 factory DirectoryInterface([Directory impl]) => |
1216 new DirectoryStub.unbound(impl); | 1282 new DirectoryStub.unbound(impl); |
1217 | 1283 |
1218 factory DirectoryInterface.fromEndpoint( | 1284 factory DirectoryInterface.fromEndpoint( |
1219 core.MojoMessagePipeEndpoint endpoint, | 1285 core.MojoMessagePipeEndpoint endpoint, |
(...skipping 29 matching lines...) Expand all Loading... |
1249 | 1315 |
1250 void handleResponse(bindings.ServiceMessage message) { | 1316 void handleResponse(bindings.ServiceMessage message) { |
1251 switch (message.header.type) { | 1317 switch (message.header.type) { |
1252 case _directoryMethodReadName: | 1318 case _directoryMethodReadName: |
1253 var r = DirectoryReadResponseParams.deserialize( | 1319 var r = DirectoryReadResponseParams.deserialize( |
1254 message.payload); | 1320 message.payload); |
1255 if (!message.header.hasRequestId) { | 1321 if (!message.header.hasRequestId) { |
1256 proxyError("Expected a message with a valid request Id."); | 1322 proxyError("Expected a message with a valid request Id."); |
1257 return; | 1323 return; |
1258 } | 1324 } |
1259 Completer c = completerMap[message.header.requestId]; | 1325 Function callback = callbackMap[message.header.requestId]; |
1260 if (c == null) { | 1326 if (callback == null) { |
1261 proxyError( | 1327 proxyError( |
1262 "Message had unknown request Id: ${message.header.requestId}"); | 1328 "Message had unknown request Id: ${message.header.requestId}"); |
1263 return; | 1329 return; |
1264 } | 1330 } |
1265 completerMap.remove(message.header.requestId); | 1331 callbackMap.remove(message.header.requestId); |
1266 if (c.isCompleted) { | 1332 callback(r.error , r.directoryContents ); |
1267 proxyError("Response completer already completed"); | |
1268 return; | |
1269 } | |
1270 c.complete(r); | |
1271 break; | 1333 break; |
1272 case _directoryMethodStatName: | 1334 case _directoryMethodStatName: |
1273 var r = DirectoryStatResponseParams.deserialize( | 1335 var r = DirectoryStatResponseParams.deserialize( |
1274 message.payload); | 1336 message.payload); |
1275 if (!message.header.hasRequestId) { | 1337 if (!message.header.hasRequestId) { |
1276 proxyError("Expected a message with a valid request Id."); | 1338 proxyError("Expected a message with a valid request Id."); |
1277 return; | 1339 return; |
1278 } | 1340 } |
1279 Completer c = completerMap[message.header.requestId]; | 1341 Function callback = callbackMap[message.header.requestId]; |
1280 if (c == null) { | 1342 if (callback == null) { |
1281 proxyError( | 1343 proxyError( |
1282 "Message had unknown request Id: ${message.header.requestId}"); | 1344 "Message had unknown request Id: ${message.header.requestId}"); |
1283 return; | 1345 return; |
1284 } | 1346 } |
1285 completerMap.remove(message.header.requestId); | 1347 callbackMap.remove(message.header.requestId); |
1286 if (c.isCompleted) { | 1348 callback(r.error , r.fileInformation ); |
1287 proxyError("Response completer already completed"); | |
1288 return; | |
1289 } | |
1290 c.complete(r); | |
1291 break; | 1349 break; |
1292 case _directoryMethodTouchName: | 1350 case _directoryMethodTouchName: |
1293 var r = DirectoryTouchResponseParams.deserialize( | 1351 var r = DirectoryTouchResponseParams.deserialize( |
1294 message.payload); | 1352 message.payload); |
1295 if (!message.header.hasRequestId) { | 1353 if (!message.header.hasRequestId) { |
1296 proxyError("Expected a message with a valid request Id."); | 1354 proxyError("Expected a message with a valid request Id."); |
1297 return; | 1355 return; |
1298 } | 1356 } |
1299 Completer c = completerMap[message.header.requestId]; | 1357 Function callback = callbackMap[message.header.requestId]; |
1300 if (c == null) { | 1358 if (callback == null) { |
1301 proxyError( | 1359 proxyError( |
1302 "Message had unknown request Id: ${message.header.requestId}"); | 1360 "Message had unknown request Id: ${message.header.requestId}"); |
1303 return; | 1361 return; |
1304 } | 1362 } |
1305 completerMap.remove(message.header.requestId); | 1363 callbackMap.remove(message.header.requestId); |
1306 if (c.isCompleted) { | 1364 callback(r.error ); |
1307 proxyError("Response completer already completed"); | |
1308 return; | |
1309 } | |
1310 c.complete(r); | |
1311 break; | 1365 break; |
1312 case _directoryMethodOpenFileName: | 1366 case _directoryMethodOpenFileName: |
1313 var r = DirectoryOpenFileResponseParams.deserialize( | 1367 var r = DirectoryOpenFileResponseParams.deserialize( |
1314 message.payload); | 1368 message.payload); |
1315 if (!message.header.hasRequestId) { | 1369 if (!message.header.hasRequestId) { |
1316 proxyError("Expected a message with a valid request Id."); | 1370 proxyError("Expected a message with a valid request Id."); |
1317 return; | 1371 return; |
1318 } | 1372 } |
1319 Completer c = completerMap[message.header.requestId]; | 1373 Function callback = callbackMap[message.header.requestId]; |
1320 if (c == null) { | 1374 if (callback == null) { |
1321 proxyError( | 1375 proxyError( |
1322 "Message had unknown request Id: ${message.header.requestId}"); | 1376 "Message had unknown request Id: ${message.header.requestId}"); |
1323 return; | 1377 return; |
1324 } | 1378 } |
1325 completerMap.remove(message.header.requestId); | 1379 callbackMap.remove(message.header.requestId); |
1326 if (c.isCompleted) { | 1380 callback(r.error ); |
1327 proxyError("Response completer already completed"); | |
1328 return; | |
1329 } | |
1330 c.complete(r); | |
1331 break; | 1381 break; |
1332 case _directoryMethodOpenDirectoryName: | 1382 case _directoryMethodOpenDirectoryName: |
1333 var r = DirectoryOpenDirectoryResponseParams.deserialize( | 1383 var r = DirectoryOpenDirectoryResponseParams.deserialize( |
1334 message.payload); | 1384 message.payload); |
1335 if (!message.header.hasRequestId) { | 1385 if (!message.header.hasRequestId) { |
1336 proxyError("Expected a message with a valid request Id."); | 1386 proxyError("Expected a message with a valid request Id."); |
1337 return; | 1387 return; |
1338 } | 1388 } |
1339 Completer c = completerMap[message.header.requestId]; | 1389 Function callback = callbackMap[message.header.requestId]; |
1340 if (c == null) { | 1390 if (callback == null) { |
1341 proxyError( | 1391 proxyError( |
1342 "Message had unknown request Id: ${message.header.requestId}"); | 1392 "Message had unknown request Id: ${message.header.requestId}"); |
1343 return; | 1393 return; |
1344 } | 1394 } |
1345 completerMap.remove(message.header.requestId); | 1395 callbackMap.remove(message.header.requestId); |
1346 if (c.isCompleted) { | 1396 callback(r.error ); |
1347 proxyError("Response completer already completed"); | |
1348 return; | |
1349 } | |
1350 c.complete(r); | |
1351 break; | 1397 break; |
1352 case _directoryMethodRenameName: | 1398 case _directoryMethodRenameName: |
1353 var r = DirectoryRenameResponseParams.deserialize( | 1399 var r = DirectoryRenameResponseParams.deserialize( |
1354 message.payload); | 1400 message.payload); |
1355 if (!message.header.hasRequestId) { | 1401 if (!message.header.hasRequestId) { |
1356 proxyError("Expected a message with a valid request Id."); | 1402 proxyError("Expected a message with a valid request Id."); |
1357 return; | 1403 return; |
1358 } | 1404 } |
1359 Completer c = completerMap[message.header.requestId]; | 1405 Function callback = callbackMap[message.header.requestId]; |
1360 if (c == null) { | 1406 if (callback == null) { |
1361 proxyError( | 1407 proxyError( |
1362 "Message had unknown request Id: ${message.header.requestId}"); | 1408 "Message had unknown request Id: ${message.header.requestId}"); |
1363 return; | 1409 return; |
1364 } | 1410 } |
1365 completerMap.remove(message.header.requestId); | 1411 callbackMap.remove(message.header.requestId); |
1366 if (c.isCompleted) { | 1412 callback(r.error ); |
1367 proxyError("Response completer already completed"); | |
1368 return; | |
1369 } | |
1370 c.complete(r); | |
1371 break; | 1413 break; |
1372 case _directoryMethodDeleteName: | 1414 case _directoryMethodDeleteName: |
1373 var r = DirectoryDeleteResponseParams.deserialize( | 1415 var r = DirectoryDeleteResponseParams.deserialize( |
1374 message.payload); | 1416 message.payload); |
1375 if (!message.header.hasRequestId) { | 1417 if (!message.header.hasRequestId) { |
1376 proxyError("Expected a message with a valid request Id."); | 1418 proxyError("Expected a message with a valid request Id."); |
1377 return; | 1419 return; |
1378 } | 1420 } |
1379 Completer c = completerMap[message.header.requestId]; | 1421 Function callback = callbackMap[message.header.requestId]; |
1380 if (c == null) { | 1422 if (callback == null) { |
1381 proxyError( | 1423 proxyError( |
1382 "Message had unknown request Id: ${message.header.requestId}"); | 1424 "Message had unknown request Id: ${message.header.requestId}"); |
1383 return; | 1425 return; |
1384 } | 1426 } |
1385 completerMap.remove(message.header.requestId); | 1427 callbackMap.remove(message.header.requestId); |
1386 if (c.isCompleted) { | 1428 callback(r.error ); |
1387 proxyError("Response completer already completed"); | |
1388 return; | |
1389 } | |
1390 c.complete(r); | |
1391 break; | 1429 break; |
1392 default: | 1430 default: |
1393 proxyError("Unexpected message type: ${message.header.type}"); | 1431 proxyError("Unexpected message type: ${message.header.type}"); |
1394 close(immediate: true); | 1432 close(immediate: true); |
1395 break; | 1433 break; |
1396 } | 1434 } |
1397 } | 1435 } |
1398 | 1436 |
1399 @override | 1437 @override |
1400 String toString() { | 1438 String toString() { |
(...skipping 24 matching lines...) Expand all Loading... |
1425 return newMockedProxy; | 1463 return newMockedProxy; |
1426 } | 1464 } |
1427 | 1465 |
1428 static DirectoryProxy newFromEndpoint( | 1466 static DirectoryProxy newFromEndpoint( |
1429 core.MojoMessagePipeEndpoint endpoint) { | 1467 core.MojoMessagePipeEndpoint endpoint) { |
1430 assert(endpoint.setDescription("For DirectoryProxy")); | 1468 assert(endpoint.setDescription("For DirectoryProxy")); |
1431 return new DirectoryProxy.fromEndpoint(endpoint); | 1469 return new DirectoryProxy.fromEndpoint(endpoint); |
1432 } | 1470 } |
1433 | 1471 |
1434 | 1472 |
1435 dynamic read([Function responseFactory = null]) { | 1473 void read(void callback(types_mojom.Error error, List<types_mojom.DirectoryEnt
ry> directoryContents)) { |
1436 if (impl != null) { | 1474 if (impl != null) { |
1437 return new Future(() => impl.read(_DirectoryStubControl._directoryReadResp
onseParamsFactory)); | 1475 impl.read(callback); |
| 1476 return; |
1438 } | 1477 } |
1439 var params = new _DirectoryReadParams(); | 1478 var params = new _DirectoryReadParams(); |
1440 return ctrl.sendMessageWithRequestId( | 1479 ctrl.sendMessageWithRequestId( |
1441 params, | 1480 params, |
1442 _directoryMethodReadName, | 1481 _directoryMethodReadName, |
1443 -1, | 1482 -1, |
1444 bindings.MessageHeader.kMessageExpectsResponse); | 1483 bindings.MessageHeader.kMessageExpectsResponse, |
| 1484 callback); |
1445 } | 1485 } |
1446 dynamic stat([Function responseFactory = null]) { | 1486 void stat(void callback(types_mojom.Error error, types_mojom.FileInformation f
ileInformation)) { |
1447 if (impl != null) { | 1487 if (impl != null) { |
1448 return new Future(() => impl.stat(_DirectoryStubControl._directoryStatResp
onseParamsFactory)); | 1488 impl.stat(callback); |
| 1489 return; |
1449 } | 1490 } |
1450 var params = new _DirectoryStatParams(); | 1491 var params = new _DirectoryStatParams(); |
1451 return ctrl.sendMessageWithRequestId( | 1492 ctrl.sendMessageWithRequestId( |
1452 params, | 1493 params, |
1453 _directoryMethodStatName, | 1494 _directoryMethodStatName, |
1454 -1, | 1495 -1, |
1455 bindings.MessageHeader.kMessageExpectsResponse); | 1496 bindings.MessageHeader.kMessageExpectsResponse, |
| 1497 callback); |
1456 } | 1498 } |
1457 dynamic touch(types_mojom.TimespecOrNow atime,types_mojom.TimespecOrNow mtime,
[Function responseFactory = null]) { | 1499 void touch(types_mojom.TimespecOrNow atime,types_mojom.TimespecOrNow mtime,voi
d callback(types_mojom.Error error)) { |
1458 if (impl != null) { | 1500 if (impl != null) { |
1459 return new Future(() => impl.touch(atime,mtime,_DirectoryStubControl._dire
ctoryTouchResponseParamsFactory)); | 1501 impl.touch(atime,mtime,callback); |
| 1502 return; |
1460 } | 1503 } |
1461 var params = new _DirectoryTouchParams(); | 1504 var params = new _DirectoryTouchParams(); |
1462 params.atime = atime; | 1505 params.atime = atime; |
1463 params.mtime = mtime; | 1506 params.mtime = mtime; |
1464 return ctrl.sendMessageWithRequestId( | 1507 ctrl.sendMessageWithRequestId( |
1465 params, | 1508 params, |
1466 _directoryMethodTouchName, | 1509 _directoryMethodTouchName, |
1467 -1, | 1510 -1, |
1468 bindings.MessageHeader.kMessageExpectsResponse); | 1511 bindings.MessageHeader.kMessageExpectsResponse, |
| 1512 callback); |
1469 } | 1513 } |
1470 dynamic openFile(String path,file_mojom.FileInterfaceRequest file,int openFlag
s,[Function responseFactory = null]) { | 1514 void openFile(String path,file_mojom.FileInterfaceRequest file,int openFlags,v
oid callback(types_mojom.Error error)) { |
1471 if (impl != null) { | 1515 if (impl != null) { |
1472 return new Future(() => impl.openFile(path,file,openFlags,_DirectoryStubCo
ntrol._directoryOpenFileResponseParamsFactory)); | 1516 impl.openFile(path,file,openFlags,callback); |
| 1517 return; |
1473 } | 1518 } |
1474 var params = new _DirectoryOpenFileParams(); | 1519 var params = new _DirectoryOpenFileParams(); |
1475 params.path = path; | 1520 params.path = path; |
1476 params.file = file; | 1521 params.file = file; |
1477 params.openFlags = openFlags; | 1522 params.openFlags = openFlags; |
1478 return ctrl.sendMessageWithRequestId( | 1523 ctrl.sendMessageWithRequestId( |
1479 params, | 1524 params, |
1480 _directoryMethodOpenFileName, | 1525 _directoryMethodOpenFileName, |
1481 -1, | 1526 -1, |
1482 bindings.MessageHeader.kMessageExpectsResponse); | 1527 bindings.MessageHeader.kMessageExpectsResponse, |
| 1528 callback); |
1483 } | 1529 } |
1484 dynamic openDirectory(String path,DirectoryInterfaceRequest directory,int open
Flags,[Function responseFactory = null]) { | 1530 void openDirectory(String path,DirectoryInterfaceRequest directory,int openFla
gs,void callback(types_mojom.Error error)) { |
1485 if (impl != null) { | 1531 if (impl != null) { |
1486 return new Future(() => impl.openDirectory(path,directory,openFlags,_Direc
toryStubControl._directoryOpenDirectoryResponseParamsFactory)); | 1532 impl.openDirectory(path,directory,openFlags,callback); |
| 1533 return; |
1487 } | 1534 } |
1488 var params = new _DirectoryOpenDirectoryParams(); | 1535 var params = new _DirectoryOpenDirectoryParams(); |
1489 params.path = path; | 1536 params.path = path; |
1490 params.directory = directory; | 1537 params.directory = directory; |
1491 params.openFlags = openFlags; | 1538 params.openFlags = openFlags; |
1492 return ctrl.sendMessageWithRequestId( | 1539 ctrl.sendMessageWithRequestId( |
1493 params, | 1540 params, |
1494 _directoryMethodOpenDirectoryName, | 1541 _directoryMethodOpenDirectoryName, |
1495 -1, | 1542 -1, |
1496 bindings.MessageHeader.kMessageExpectsResponse); | 1543 bindings.MessageHeader.kMessageExpectsResponse, |
| 1544 callback); |
1497 } | 1545 } |
1498 dynamic rename(String path,String newPath,[Function responseFactory = null]) { | 1546 void rename(String path,String newPath,void callback(types_mojom.Error error))
{ |
1499 if (impl != null) { | 1547 if (impl != null) { |
1500 return new Future(() => impl.rename(path,newPath,_DirectoryStubControl._di
rectoryRenameResponseParamsFactory)); | 1548 impl.rename(path,newPath,callback); |
| 1549 return; |
1501 } | 1550 } |
1502 var params = new _DirectoryRenameParams(); | 1551 var params = new _DirectoryRenameParams(); |
1503 params.path = path; | 1552 params.path = path; |
1504 params.newPath = newPath; | 1553 params.newPath = newPath; |
1505 return ctrl.sendMessageWithRequestId( | 1554 ctrl.sendMessageWithRequestId( |
1506 params, | 1555 params, |
1507 _directoryMethodRenameName, | 1556 _directoryMethodRenameName, |
1508 -1, | 1557 -1, |
1509 bindings.MessageHeader.kMessageExpectsResponse); | 1558 bindings.MessageHeader.kMessageExpectsResponse, |
| 1559 callback); |
1510 } | 1560 } |
1511 dynamic delete(String path,int deleteFlags,[Function responseFactory = null])
{ | 1561 void delete(String path,int deleteFlags,void callback(types_mojom.Error error)
) { |
1512 if (impl != null) { | 1562 if (impl != null) { |
1513 return new Future(() => impl.delete(path,deleteFlags,_DirectoryStubControl
._directoryDeleteResponseParamsFactory)); | 1563 impl.delete(path,deleteFlags,callback); |
| 1564 return; |
1514 } | 1565 } |
1515 var params = new _DirectoryDeleteParams(); | 1566 var params = new _DirectoryDeleteParams(); |
1516 params.path = path; | 1567 params.path = path; |
1517 params.deleteFlags = deleteFlags; | 1568 params.deleteFlags = deleteFlags; |
1518 return ctrl.sendMessageWithRequestId( | 1569 ctrl.sendMessageWithRequestId( |
1519 params, | 1570 params, |
1520 _directoryMethodDeleteName, | 1571 _directoryMethodDeleteName, |
1521 -1, | 1572 -1, |
1522 bindings.MessageHeader.kMessageExpectsResponse); | 1573 bindings.MessageHeader.kMessageExpectsResponse, |
| 1574 callback); |
1523 } | 1575 } |
1524 } | 1576 } |
1525 | 1577 |
1526 class _DirectoryStubControl | 1578 class _DirectoryStubControl |
1527 extends bindings.StubMessageHandler | 1579 extends bindings.StubMessageHandler |
1528 implements bindings.StubControl<Directory> { | 1580 implements bindings.StubControl<Directory> { |
1529 Directory _impl; | 1581 Directory _impl; |
1530 | 1582 |
1531 _DirectoryStubControl.fromEndpoint( | 1583 _DirectoryStubControl.fromEndpoint( |
1532 core.MojoMessagePipeEndpoint endpoint, [Directory impl]) | 1584 core.MojoMessagePipeEndpoint endpoint, [Directory impl]) |
1533 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 1585 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
1534 _impl = impl; | 1586 _impl = impl; |
1535 } | 1587 } |
1536 | 1588 |
1537 _DirectoryStubControl.fromHandle( | 1589 _DirectoryStubControl.fromHandle( |
1538 core.MojoHandle handle, [Directory impl]) | 1590 core.MojoHandle handle, [Directory impl]) |
1539 : super.fromHandle(handle, autoBegin: impl != null) { | 1591 : super.fromHandle(handle, autoBegin: impl != null) { |
1540 _impl = impl; | 1592 _impl = impl; |
1541 } | 1593 } |
1542 | 1594 |
1543 _DirectoryStubControl.unbound([this._impl]) : super.unbound(); | 1595 _DirectoryStubControl.unbound([this._impl]) : super.unbound(); |
1544 | 1596 |
1545 String get serviceName => Directory.serviceName; | 1597 String get serviceName => Directory.serviceName; |
1546 | 1598 |
1547 | 1599 |
1548 static DirectoryReadResponseParams _directoryReadResponseParamsFactory(types_m
ojom.Error error, List<types_mojom.DirectoryEntry> directoryContents) { | 1600 Function _directoryReadResponseParamsResponder( |
1549 var result = new DirectoryReadResponseParams(); | 1601 int requestId) { |
1550 result.error = error; | 1602 return (types_mojom.Error error, List<types_mojom.DirectoryEntry> directoryCon
tents) { |
1551 result.directoryContents = directoryContents; | 1603 var result = new DirectoryReadResponseParams(); |
1552 return result; | 1604 result.error = error; |
| 1605 result.directoryContents = directoryContents; |
| 1606 sendResponse(buildResponseWithId( |
| 1607 result, |
| 1608 _directoryMethodReadName, |
| 1609 requestId, |
| 1610 bindings.MessageHeader.kMessageIsResponse)); |
| 1611 }; |
1553 } | 1612 } |
1554 static DirectoryStatResponseParams _directoryStatResponseParamsFactory(types_m
ojom.Error error, types_mojom.FileInformation fileInformation) { | 1613 Function _directoryStatResponseParamsResponder( |
1555 var result = new DirectoryStatResponseParams(); | 1614 int requestId) { |
1556 result.error = error; | 1615 return (types_mojom.Error error, types_mojom.FileInformation fileInformation)
{ |
1557 result.fileInformation = fileInformation; | 1616 var result = new DirectoryStatResponseParams(); |
1558 return result; | 1617 result.error = error; |
| 1618 result.fileInformation = fileInformation; |
| 1619 sendResponse(buildResponseWithId( |
| 1620 result, |
| 1621 _directoryMethodStatName, |
| 1622 requestId, |
| 1623 bindings.MessageHeader.kMessageIsResponse)); |
| 1624 }; |
1559 } | 1625 } |
1560 static DirectoryTouchResponseParams _directoryTouchResponseParamsFactory(types
_mojom.Error error) { | 1626 Function _directoryTouchResponseParamsResponder( |
1561 var result = new DirectoryTouchResponseParams(); | 1627 int requestId) { |
1562 result.error = error; | 1628 return (types_mojom.Error error) { |
1563 return result; | 1629 var result = new DirectoryTouchResponseParams(); |
| 1630 result.error = error; |
| 1631 sendResponse(buildResponseWithId( |
| 1632 result, |
| 1633 _directoryMethodTouchName, |
| 1634 requestId, |
| 1635 bindings.MessageHeader.kMessageIsResponse)); |
| 1636 }; |
1564 } | 1637 } |
1565 static DirectoryOpenFileResponseParams _directoryOpenFileResponseParamsFactory
(types_mojom.Error error) { | 1638 Function _directoryOpenFileResponseParamsResponder( |
1566 var result = new DirectoryOpenFileResponseParams(); | 1639 int requestId) { |
1567 result.error = error; | 1640 return (types_mojom.Error error) { |
1568 return result; | 1641 var result = new DirectoryOpenFileResponseParams(); |
| 1642 result.error = error; |
| 1643 sendResponse(buildResponseWithId( |
| 1644 result, |
| 1645 _directoryMethodOpenFileName, |
| 1646 requestId, |
| 1647 bindings.MessageHeader.kMessageIsResponse)); |
| 1648 }; |
1569 } | 1649 } |
1570 static DirectoryOpenDirectoryResponseParams _directoryOpenDirectoryResponsePar
amsFactory(types_mojom.Error error) { | 1650 Function _directoryOpenDirectoryResponseParamsResponder( |
1571 var result = new DirectoryOpenDirectoryResponseParams(); | 1651 int requestId) { |
1572 result.error = error; | 1652 return (types_mojom.Error error) { |
1573 return result; | 1653 var result = new DirectoryOpenDirectoryResponseParams(); |
| 1654 result.error = error; |
| 1655 sendResponse(buildResponseWithId( |
| 1656 result, |
| 1657 _directoryMethodOpenDirectoryName, |
| 1658 requestId, |
| 1659 bindings.MessageHeader.kMessageIsResponse)); |
| 1660 }; |
1574 } | 1661 } |
1575 static DirectoryRenameResponseParams _directoryRenameResponseParamsFactory(typ
es_mojom.Error error) { | 1662 Function _directoryRenameResponseParamsResponder( |
1576 var result = new DirectoryRenameResponseParams(); | 1663 int requestId) { |
1577 result.error = error; | 1664 return (types_mojom.Error error) { |
1578 return result; | 1665 var result = new DirectoryRenameResponseParams(); |
| 1666 result.error = error; |
| 1667 sendResponse(buildResponseWithId( |
| 1668 result, |
| 1669 _directoryMethodRenameName, |
| 1670 requestId, |
| 1671 bindings.MessageHeader.kMessageIsResponse)); |
| 1672 }; |
1579 } | 1673 } |
1580 static DirectoryDeleteResponseParams _directoryDeleteResponseParamsFactory(typ
es_mojom.Error error) { | 1674 Function _directoryDeleteResponseParamsResponder( |
1581 var result = new DirectoryDeleteResponseParams(); | 1675 int requestId) { |
1582 result.error = error; | 1676 return (types_mojom.Error error) { |
1583 return result; | 1677 var result = new DirectoryDeleteResponseParams(); |
| 1678 result.error = error; |
| 1679 sendResponse(buildResponseWithId( |
| 1680 result, |
| 1681 _directoryMethodDeleteName, |
| 1682 requestId, |
| 1683 bindings.MessageHeader.kMessageIsResponse)); |
| 1684 }; |
1584 } | 1685 } |
1585 | 1686 |
1586 dynamic handleMessage(bindings.ServiceMessage message) { | 1687 void handleMessage(bindings.ServiceMessage message) { |
1587 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 1688 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
1588 return bindings.ControlMessageHandler.handleMessage(this, | 1689 bindings.ControlMessageHandler.handleMessage( |
1589 0, | 1690 this, 0, message); |
1590 message); | 1691 return; |
1591 } | 1692 } |
1592 if (_impl == null) { | 1693 if (_impl == null) { |
1593 throw new core.MojoApiError("$this has no implementation set"); | 1694 throw new core.MojoApiError("$this has no implementation set"); |
1594 } | 1695 } |
1595 switch (message.header.type) { | 1696 switch (message.header.type) { |
1596 case _directoryMethodReadName: | 1697 case _directoryMethodReadName: |
1597 var response = _impl.read(_directoryReadResponseParamsFactory); | 1698 _impl.read(_directoryReadResponseParamsResponder(message.header.requestI
d)); |
1598 if (response is Future) { | |
1599 return response.then((response) { | |
1600 if (response != null) { | |
1601 return buildResponseWithId( | |
1602 response, | |
1603 _directoryMethodReadName, | |
1604 message.header.requestId, | |
1605 bindings.MessageHeader.kMessageIsResponse); | |
1606 } | |
1607 }); | |
1608 } else if (response != null) { | |
1609 return buildResponseWithId( | |
1610 response, | |
1611 _directoryMethodReadName, | |
1612 message.header.requestId, | |
1613 bindings.MessageHeader.kMessageIsResponse); | |
1614 } | |
1615 break; | 1699 break; |
1616 case _directoryMethodStatName: | 1700 case _directoryMethodStatName: |
1617 var response = _impl.stat(_directoryStatResponseParamsFactory); | 1701 _impl.stat(_directoryStatResponseParamsResponder(message.header.requestI
d)); |
1618 if (response is Future) { | |
1619 return response.then((response) { | |
1620 if (response != null) { | |
1621 return buildResponseWithId( | |
1622 response, | |
1623 _directoryMethodStatName, | |
1624 message.header.requestId, | |
1625 bindings.MessageHeader.kMessageIsResponse); | |
1626 } | |
1627 }); | |
1628 } else if (response != null) { | |
1629 return buildResponseWithId( | |
1630 response, | |
1631 _directoryMethodStatName, | |
1632 message.header.requestId, | |
1633 bindings.MessageHeader.kMessageIsResponse); | |
1634 } | |
1635 break; | 1702 break; |
1636 case _directoryMethodTouchName: | 1703 case _directoryMethodTouchName: |
1637 var params = _DirectoryTouchParams.deserialize( | 1704 var params = _DirectoryTouchParams.deserialize( |
1638 message.payload); | 1705 message.payload); |
1639 var response = _impl.touch(params.atime,params.mtime,_directoryTouchResp
onseParamsFactory); | 1706 _impl.touch(params.atime, params.mtime, _directoryTouchResponseParamsRes
ponder(message.header.requestId)); |
1640 if (response is Future) { | |
1641 return response.then((response) { | |
1642 if (response != null) { | |
1643 return buildResponseWithId( | |
1644 response, | |
1645 _directoryMethodTouchName, | |
1646 message.header.requestId, | |
1647 bindings.MessageHeader.kMessageIsResponse); | |
1648 } | |
1649 }); | |
1650 } else if (response != null) { | |
1651 return buildResponseWithId( | |
1652 response, | |
1653 _directoryMethodTouchName, | |
1654 message.header.requestId, | |
1655 bindings.MessageHeader.kMessageIsResponse); | |
1656 } | |
1657 break; | 1707 break; |
1658 case _directoryMethodOpenFileName: | 1708 case _directoryMethodOpenFileName: |
1659 var params = _DirectoryOpenFileParams.deserialize( | 1709 var params = _DirectoryOpenFileParams.deserialize( |
1660 message.payload); | 1710 message.payload); |
1661 var response = _impl.openFile(params.path,params.file,params.openFlags,_
directoryOpenFileResponseParamsFactory); | 1711 _impl.openFile(params.path, params.file, params.openFlags, _directoryOpe
nFileResponseParamsResponder(message.header.requestId)); |
1662 if (response is Future) { | |
1663 return response.then((response) { | |
1664 if (response != null) { | |
1665 return buildResponseWithId( | |
1666 response, | |
1667 _directoryMethodOpenFileName, | |
1668 message.header.requestId, | |
1669 bindings.MessageHeader.kMessageIsResponse); | |
1670 } | |
1671 }); | |
1672 } else if (response != null) { | |
1673 return buildResponseWithId( | |
1674 response, | |
1675 _directoryMethodOpenFileName, | |
1676 message.header.requestId, | |
1677 bindings.MessageHeader.kMessageIsResponse); | |
1678 } | |
1679 break; | 1712 break; |
1680 case _directoryMethodOpenDirectoryName: | 1713 case _directoryMethodOpenDirectoryName: |
1681 var params = _DirectoryOpenDirectoryParams.deserialize( | 1714 var params = _DirectoryOpenDirectoryParams.deserialize( |
1682 message.payload); | 1715 message.payload); |
1683 var response = _impl.openDirectory(params.path,params.directory,params.o
penFlags,_directoryOpenDirectoryResponseParamsFactory); | 1716 _impl.openDirectory(params.path, params.directory, params.openFlags, _di
rectoryOpenDirectoryResponseParamsResponder(message.header.requestId)); |
1684 if (response is Future) { | |
1685 return response.then((response) { | |
1686 if (response != null) { | |
1687 return buildResponseWithId( | |
1688 response, | |
1689 _directoryMethodOpenDirectoryName, | |
1690 message.header.requestId, | |
1691 bindings.MessageHeader.kMessageIsResponse); | |
1692 } | |
1693 }); | |
1694 } else if (response != null) { | |
1695 return buildResponseWithId( | |
1696 response, | |
1697 _directoryMethodOpenDirectoryName, | |
1698 message.header.requestId, | |
1699 bindings.MessageHeader.kMessageIsResponse); | |
1700 } | |
1701 break; | 1717 break; |
1702 case _directoryMethodRenameName: | 1718 case _directoryMethodRenameName: |
1703 var params = _DirectoryRenameParams.deserialize( | 1719 var params = _DirectoryRenameParams.deserialize( |
1704 message.payload); | 1720 message.payload); |
1705 var response = _impl.rename(params.path,params.newPath,_directoryRenameR
esponseParamsFactory); | 1721 _impl.rename(params.path, params.newPath, _directoryRenameResponseParams
Responder(message.header.requestId)); |
1706 if (response is Future) { | |
1707 return response.then((response) { | |
1708 if (response != null) { | |
1709 return buildResponseWithId( | |
1710 response, | |
1711 _directoryMethodRenameName, | |
1712 message.header.requestId, | |
1713 bindings.MessageHeader.kMessageIsResponse); | |
1714 } | |
1715 }); | |
1716 } else if (response != null) { | |
1717 return buildResponseWithId( | |
1718 response, | |
1719 _directoryMethodRenameName, | |
1720 message.header.requestId, | |
1721 bindings.MessageHeader.kMessageIsResponse); | |
1722 } | |
1723 break; | 1722 break; |
1724 case _directoryMethodDeleteName: | 1723 case _directoryMethodDeleteName: |
1725 var params = _DirectoryDeleteParams.deserialize( | 1724 var params = _DirectoryDeleteParams.deserialize( |
1726 message.payload); | 1725 message.payload); |
1727 var response = _impl.delete(params.path,params.deleteFlags,_directoryDel
eteResponseParamsFactory); | 1726 _impl.delete(params.path, params.deleteFlags, _directoryDeleteResponsePa
ramsResponder(message.header.requestId)); |
1728 if (response is Future) { | |
1729 return response.then((response) { | |
1730 if (response != null) { | |
1731 return buildResponseWithId( | |
1732 response, | |
1733 _directoryMethodDeleteName, | |
1734 message.header.requestId, | |
1735 bindings.MessageHeader.kMessageIsResponse); | |
1736 } | |
1737 }); | |
1738 } else if (response != null) { | |
1739 return buildResponseWithId( | |
1740 response, | |
1741 _directoryMethodDeleteName, | |
1742 message.header.requestId, | |
1743 bindings.MessageHeader.kMessageIsResponse); | |
1744 } | |
1745 break; | 1727 break; |
1746 default: | 1728 default: |
1747 throw new bindings.MojoCodecError("Unexpected message name"); | 1729 throw new bindings.MojoCodecError("Unexpected message name"); |
1748 break; | 1730 break; |
1749 } | 1731 } |
1750 return null; | |
1751 } | 1732 } |
1752 | 1733 |
1753 Directory get impl => _impl; | 1734 Directory get impl => _impl; |
1754 set impl(Directory d) { | 1735 set impl(Directory d) { |
1755 if (d == null) { | 1736 if (d == null) { |
1756 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 1737 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
1757 } | 1738 } |
1758 if (isBound && (_impl == null)) { | 1739 if (isBound && (_impl == null)) { |
1759 beginHandlingEvents(); | 1740 beginHandlingEvents(); |
1760 } | 1741 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 core.MojoHandle handle, [Directory impl]) | 1775 core.MojoHandle handle, [Directory impl]) |
1795 : super(new _DirectoryStubControl.fromHandle(handle, impl)); | 1776 : super(new _DirectoryStubControl.fromHandle(handle, impl)); |
1796 | 1777 |
1797 static DirectoryStub newFromEndpoint( | 1778 static DirectoryStub newFromEndpoint( |
1798 core.MojoMessagePipeEndpoint endpoint) { | 1779 core.MojoMessagePipeEndpoint endpoint) { |
1799 assert(endpoint.setDescription("For DirectoryStub")); | 1780 assert(endpoint.setDescription("For DirectoryStub")); |
1800 return new DirectoryStub.fromEndpoint(endpoint); | 1781 return new DirectoryStub.fromEndpoint(endpoint); |
1801 } | 1782 } |
1802 | 1783 |
1803 | 1784 |
1804 dynamic read([Function responseFactory = null]) { | 1785 void read(void callback(types_mojom.Error error, List<types_mojom.DirectoryEnt
ry> directoryContents)) { |
1805 return impl.read(responseFactory); | 1786 return impl.read(callback); |
1806 } | 1787 } |
1807 dynamic stat([Function responseFactory = null]) { | 1788 void stat(void callback(types_mojom.Error error, types_mojom.FileInformation f
ileInformation)) { |
1808 return impl.stat(responseFactory); | 1789 return impl.stat(callback); |
1809 } | 1790 } |
1810 dynamic touch(types_mojom.TimespecOrNow atime,types_mojom.TimespecOrNow mtime,
[Function responseFactory = null]) { | 1791 void touch(types_mojom.TimespecOrNow atime,types_mojom.TimespecOrNow mtime,voi
d callback(types_mojom.Error error)) { |
1811 return impl.touch(atime,mtime,responseFactory); | 1792 return impl.touch(atime,mtime,callback); |
1812 } | 1793 } |
1813 dynamic openFile(String path,file_mojom.FileInterfaceRequest file,int openFlag
s,[Function responseFactory = null]) { | 1794 void openFile(String path,file_mojom.FileInterfaceRequest file,int openFlags,v
oid callback(types_mojom.Error error)) { |
1814 return impl.openFile(path,file,openFlags,responseFactory); | 1795 return impl.openFile(path,file,openFlags,callback); |
1815 } | 1796 } |
1816 dynamic openDirectory(String path,DirectoryInterfaceRequest directory,int open
Flags,[Function responseFactory = null]) { | 1797 void openDirectory(String path,DirectoryInterfaceRequest directory,int openFla
gs,void callback(types_mojom.Error error)) { |
1817 return impl.openDirectory(path,directory,openFlags,responseFactory); | 1798 return impl.openDirectory(path,directory,openFlags,callback); |
1818 } | 1799 } |
1819 dynamic rename(String path,String newPath,[Function responseFactory = null]) { | 1800 void rename(String path,String newPath,void callback(types_mojom.Error error))
{ |
1820 return impl.rename(path,newPath,responseFactory); | 1801 return impl.rename(path,newPath,callback); |
1821 } | 1802 } |
1822 dynamic delete(String path,int deleteFlags,[Function responseFactory = null])
{ | 1803 void delete(String path,int deleteFlags,void callback(types_mojom.Error error)
) { |
1823 return impl.delete(path,deleteFlags,responseFactory); | 1804 return impl.delete(path,deleteFlags,callback); |
1824 } | 1805 } |
1825 } | 1806 } |
1826 | 1807 |
1827 | 1808 |
1828 | 1809 |
OLD | NEW |