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 file_mojom; | 5 library file_mojom; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:mojo/bindings.dart' as bindings; | 9 import 'package:mojo/bindings.dart' as bindings; |
10 import 'package:mojo/core.dart' as core; | 10 import 'package:mojo/core.dart' as core; |
| 11 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types; |
| 12 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
11 import 'package:mojo_services/mojo/files/types.mojom.dart' as types_mojom; | 13 import 'package:mojo_services/mojo/files/types.mojom.dart' as types_mojom; |
12 | 14 |
13 | 15 |
14 | 16 |
15 class _FileCloseParams extends bindings.Struct { | 17 class _FileCloseParams extends bindings.Struct { |
16 static const List<bindings.StructDataHeader> kVersions = const [ | 18 static const List<bindings.StructDataHeader> kVersions = const [ |
17 const bindings.StructDataHeader(8, 0) | 19 const bindings.StructDataHeader(8, 0) |
18 ]; | 20 ]; |
19 | 21 |
20 _FileCloseParams() : super(kVersions.last.size); | 22 _FileCloseParams() : super(kVersions.last.size); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return "_FileCloseParams("")"; | 65 return "_FileCloseParams("")"; |
64 } | 66 } |
65 | 67 |
66 Map toJson() { | 68 Map toJson() { |
67 Map map = new Map(); | 69 Map map = new Map(); |
68 return map; | 70 return map; |
69 } | 71 } |
70 } | 72 } |
71 | 73 |
72 | 74 |
| 75 |
| 76 |
73 class FileCloseResponseParams extends bindings.Struct { | 77 class FileCloseResponseParams extends bindings.Struct { |
74 static const List<bindings.StructDataHeader> kVersions = const [ | 78 static const List<bindings.StructDataHeader> kVersions = const [ |
75 const bindings.StructDataHeader(16, 0) | 79 const bindings.StructDataHeader(16, 0) |
76 ]; | 80 ]; |
77 types_mojom.Error err = null; | 81 types_mojom.Error err = null; |
78 | 82 |
79 FileCloseResponseParams() : super(kVersions.last.size); | 83 FileCloseResponseParams() : super(kVersions.last.size); |
80 | 84 |
81 static FileCloseResponseParams deserialize(bindings.Message message) { | 85 static FileCloseResponseParams deserialize(bindings.Message message) { |
82 var decoder = new bindings.Decoder(message); | 86 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } | 138 } |
135 | 139 |
136 Map toJson() { | 140 Map toJson() { |
137 Map map = new Map(); | 141 Map map = new Map(); |
138 map["err"] = err; | 142 map["err"] = err; |
139 return map; | 143 return map; |
140 } | 144 } |
141 } | 145 } |
142 | 146 |
143 | 147 |
| 148 |
| 149 |
144 class _FileReadParams extends bindings.Struct { | 150 class _FileReadParams extends bindings.Struct { |
145 static const List<bindings.StructDataHeader> kVersions = const [ | 151 static const List<bindings.StructDataHeader> kVersions = const [ |
146 const bindings.StructDataHeader(24, 0) | 152 const bindings.StructDataHeader(24, 0) |
147 ]; | 153 ]; |
148 int numBytesToRead = 0; | 154 int numBytesToRead = 0; |
149 types_mojom.Whence whence = null; | 155 types_mojom.Whence whence = null; |
150 int offset = 0; | 156 int offset = 0; |
151 | 157 |
152 _FileReadParams() : super(kVersions.last.size); | 158 _FileReadParams() : super(kVersions.last.size); |
153 | 159 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 Map toJson() { | 229 Map toJson() { |
224 Map map = new Map(); | 230 Map map = new Map(); |
225 map["numBytesToRead"] = numBytesToRead; | 231 map["numBytesToRead"] = numBytesToRead; |
226 map["whence"] = whence; | 232 map["whence"] = whence; |
227 map["offset"] = offset; | 233 map["offset"] = offset; |
228 return map; | 234 return map; |
229 } | 235 } |
230 } | 236 } |
231 | 237 |
232 | 238 |
| 239 |
| 240 |
233 class FileReadResponseParams extends bindings.Struct { | 241 class FileReadResponseParams extends bindings.Struct { |
234 static const List<bindings.StructDataHeader> kVersions = const [ | 242 static const List<bindings.StructDataHeader> kVersions = const [ |
235 const bindings.StructDataHeader(24, 0) | 243 const bindings.StructDataHeader(24, 0) |
236 ]; | 244 ]; |
237 types_mojom.Error error = null; | 245 types_mojom.Error error = null; |
238 List<int> bytesRead = null; | 246 List<int> bytesRead = null; |
239 | 247 |
240 FileReadResponseParams() : super(kVersions.last.size); | 248 FileReadResponseParams() : super(kVersions.last.size); |
241 | 249 |
242 static FileReadResponseParams deserialize(bindings.Message message) { | 250 static FileReadResponseParams deserialize(bindings.Message message) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 311 |
304 Map toJson() { | 312 Map toJson() { |
305 Map map = new Map(); | 313 Map map = new Map(); |
306 map["error"] = error; | 314 map["error"] = error; |
307 map["bytesRead"] = bytesRead; | 315 map["bytesRead"] = bytesRead; |
308 return map; | 316 return map; |
309 } | 317 } |
310 } | 318 } |
311 | 319 |
312 | 320 |
| 321 |
| 322 |
313 class _FileWriteParams extends bindings.Struct { | 323 class _FileWriteParams extends bindings.Struct { |
314 static const List<bindings.StructDataHeader> kVersions = const [ | 324 static const List<bindings.StructDataHeader> kVersions = const [ |
315 const bindings.StructDataHeader(32, 0) | 325 const bindings.StructDataHeader(32, 0) |
316 ]; | 326 ]; |
317 List<int> bytesToWrite = null; | 327 List<int> bytesToWrite = null; |
318 int offset = 0; | 328 int offset = 0; |
319 types_mojom.Whence whence = null; | 329 types_mojom.Whence whence = null; |
320 | 330 |
321 _FileWriteParams() : super(kVersions.last.size); | 331 _FileWriteParams() : super(kVersions.last.size); |
322 | 332 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 Map toJson() { | 402 Map toJson() { |
393 Map map = new Map(); | 403 Map map = new Map(); |
394 map["bytesToWrite"] = bytesToWrite; | 404 map["bytesToWrite"] = bytesToWrite; |
395 map["offset"] = offset; | 405 map["offset"] = offset; |
396 map["whence"] = whence; | 406 map["whence"] = whence; |
397 return map; | 407 return map; |
398 } | 408 } |
399 } | 409 } |
400 | 410 |
401 | 411 |
| 412 |
| 413 |
402 class FileWriteResponseParams extends bindings.Struct { | 414 class FileWriteResponseParams extends bindings.Struct { |
403 static const List<bindings.StructDataHeader> kVersions = const [ | 415 static const List<bindings.StructDataHeader> kVersions = const [ |
404 const bindings.StructDataHeader(16, 0) | 416 const bindings.StructDataHeader(16, 0) |
405 ]; | 417 ]; |
406 types_mojom.Error error = null; | 418 types_mojom.Error error = null; |
407 int numBytesWritten = 0; | 419 int numBytesWritten = 0; |
408 | 420 |
409 FileWriteResponseParams() : super(kVersions.last.size); | 421 FileWriteResponseParams() : super(kVersions.last.size); |
410 | 422 |
411 static FileWriteResponseParams deserialize(bindings.Message message) { | 423 static FileWriteResponseParams deserialize(bindings.Message message) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 | 484 |
473 Map toJson() { | 485 Map toJson() { |
474 Map map = new Map(); | 486 Map map = new Map(); |
475 map["error"] = error; | 487 map["error"] = error; |
476 map["numBytesWritten"] = numBytesWritten; | 488 map["numBytesWritten"] = numBytesWritten; |
477 return map; | 489 return map; |
478 } | 490 } |
479 } | 491 } |
480 | 492 |
481 | 493 |
| 494 |
| 495 |
482 class _FileReadToStreamParams extends bindings.Struct { | 496 class _FileReadToStreamParams extends bindings.Struct { |
483 static const List<bindings.StructDataHeader> kVersions = const [ | 497 static const List<bindings.StructDataHeader> kVersions = const [ |
484 const bindings.StructDataHeader(32, 0) | 498 const bindings.StructDataHeader(32, 0) |
485 ]; | 499 ]; |
486 core.MojoDataPipeProducer source = null; | 500 core.MojoDataPipeProducer source = null; |
487 types_mojom.Whence whence = null; | 501 types_mojom.Whence whence = null; |
488 int offset = 0; | 502 int offset = 0; |
489 int numBytesToRead = 0; | 503 int numBytesToRead = 0; |
490 | 504 |
491 _FileReadToStreamParams() : super(kVersions.last.size); | 505 _FileReadToStreamParams() : super(kVersions.last.size); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 "numBytesToRead: $numBytesToRead" ")"; | 580 "numBytesToRead: $numBytesToRead" ")"; |
567 } | 581 } |
568 | 582 |
569 Map toJson() { | 583 Map toJson() { |
570 throw new bindings.MojoCodecError( | 584 throw new bindings.MojoCodecError( |
571 'Object containing handles cannot be encoded to JSON.'); | 585 'Object containing handles cannot be encoded to JSON.'); |
572 } | 586 } |
573 } | 587 } |
574 | 588 |
575 | 589 |
| 590 |
| 591 |
576 class FileReadToStreamResponseParams extends bindings.Struct { | 592 class FileReadToStreamResponseParams extends bindings.Struct { |
577 static const List<bindings.StructDataHeader> kVersions = const [ | 593 static const List<bindings.StructDataHeader> kVersions = const [ |
578 const bindings.StructDataHeader(16, 0) | 594 const bindings.StructDataHeader(16, 0) |
579 ]; | 595 ]; |
580 types_mojom.Error error = null; | 596 types_mojom.Error error = null; |
581 | 597 |
582 FileReadToStreamResponseParams() : super(kVersions.last.size); | 598 FileReadToStreamResponseParams() : super(kVersions.last.size); |
583 | 599 |
584 static FileReadToStreamResponseParams deserialize(bindings.Message message) { | 600 static FileReadToStreamResponseParams deserialize(bindings.Message message) { |
585 var decoder = new bindings.Decoder(message); | 601 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 } | 653 } |
638 | 654 |
639 Map toJson() { | 655 Map toJson() { |
640 Map map = new Map(); | 656 Map map = new Map(); |
641 map["error"] = error; | 657 map["error"] = error; |
642 return map; | 658 return map; |
643 } | 659 } |
644 } | 660 } |
645 | 661 |
646 | 662 |
| 663 |
| 664 |
647 class _FileWriteFromStreamParams extends bindings.Struct { | 665 class _FileWriteFromStreamParams extends bindings.Struct { |
648 static const List<bindings.StructDataHeader> kVersions = const [ | 666 static const List<bindings.StructDataHeader> kVersions = const [ |
649 const bindings.StructDataHeader(24, 0) | 667 const bindings.StructDataHeader(24, 0) |
650 ]; | 668 ]; |
651 core.MojoDataPipeConsumer sink = null; | 669 core.MojoDataPipeConsumer sink = null; |
652 types_mojom.Whence whence = null; | 670 types_mojom.Whence whence = null; |
653 int offset = 0; | 671 int offset = 0; |
654 | 672 |
655 _FileWriteFromStreamParams() : super(kVersions.last.size); | 673 _FileWriteFromStreamParams() : super(kVersions.last.size); |
656 | 674 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 "offset: $offset" ")"; | 741 "offset: $offset" ")"; |
724 } | 742 } |
725 | 743 |
726 Map toJson() { | 744 Map toJson() { |
727 throw new bindings.MojoCodecError( | 745 throw new bindings.MojoCodecError( |
728 'Object containing handles cannot be encoded to JSON.'); | 746 'Object containing handles cannot be encoded to JSON.'); |
729 } | 747 } |
730 } | 748 } |
731 | 749 |
732 | 750 |
| 751 |
| 752 |
733 class FileWriteFromStreamResponseParams extends bindings.Struct { | 753 class FileWriteFromStreamResponseParams extends bindings.Struct { |
734 static const List<bindings.StructDataHeader> kVersions = const [ | 754 static const List<bindings.StructDataHeader> kVersions = const [ |
735 const bindings.StructDataHeader(16, 0) | 755 const bindings.StructDataHeader(16, 0) |
736 ]; | 756 ]; |
737 types_mojom.Error error = null; | 757 types_mojom.Error error = null; |
738 | 758 |
739 FileWriteFromStreamResponseParams() : super(kVersions.last.size); | 759 FileWriteFromStreamResponseParams() : super(kVersions.last.size); |
740 | 760 |
741 static FileWriteFromStreamResponseParams deserialize(bindings.Message message)
{ | 761 static FileWriteFromStreamResponseParams deserialize(bindings.Message message)
{ |
742 var decoder = new bindings.Decoder(message); | 762 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 } | 814 } |
795 | 815 |
796 Map toJson() { | 816 Map toJson() { |
797 Map map = new Map(); | 817 Map map = new Map(); |
798 map["error"] = error; | 818 map["error"] = error; |
799 return map; | 819 return map; |
800 } | 820 } |
801 } | 821 } |
802 | 822 |
803 | 823 |
| 824 |
| 825 |
804 class _FileTellParams extends bindings.Struct { | 826 class _FileTellParams extends bindings.Struct { |
805 static const List<bindings.StructDataHeader> kVersions = const [ | 827 static const List<bindings.StructDataHeader> kVersions = const [ |
806 const bindings.StructDataHeader(8, 0) | 828 const bindings.StructDataHeader(8, 0) |
807 ]; | 829 ]; |
808 | 830 |
809 _FileTellParams() : super(kVersions.last.size); | 831 _FileTellParams() : super(kVersions.last.size); |
810 | 832 |
811 static _FileTellParams deserialize(bindings.Message message) { | 833 static _FileTellParams deserialize(bindings.Message message) { |
812 var decoder = new bindings.Decoder(message); | 834 var decoder = new bindings.Decoder(message); |
813 var result = decode(decoder); | 835 var result = decode(decoder); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 return "_FileTellParams("")"; | 874 return "_FileTellParams("")"; |
853 } | 875 } |
854 | 876 |
855 Map toJson() { | 877 Map toJson() { |
856 Map map = new Map(); | 878 Map map = new Map(); |
857 return map; | 879 return map; |
858 } | 880 } |
859 } | 881 } |
860 | 882 |
861 | 883 |
| 884 |
| 885 |
862 class FileTellResponseParams extends bindings.Struct { | 886 class FileTellResponseParams extends bindings.Struct { |
863 static const List<bindings.StructDataHeader> kVersions = const [ | 887 static const List<bindings.StructDataHeader> kVersions = const [ |
864 const bindings.StructDataHeader(24, 0) | 888 const bindings.StructDataHeader(24, 0) |
865 ]; | 889 ]; |
866 types_mojom.Error error = null; | 890 types_mojom.Error error = null; |
867 int position = 0; | 891 int position = 0; |
868 | 892 |
869 FileTellResponseParams() : super(kVersions.last.size); | 893 FileTellResponseParams() : super(kVersions.last.size); |
870 | 894 |
871 static FileTellResponseParams deserialize(bindings.Message message) { | 895 static FileTellResponseParams deserialize(bindings.Message message) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 | 956 |
933 Map toJson() { | 957 Map toJson() { |
934 Map map = new Map(); | 958 Map map = new Map(); |
935 map["error"] = error; | 959 map["error"] = error; |
936 map["position"] = position; | 960 map["position"] = position; |
937 return map; | 961 return map; |
938 } | 962 } |
939 } | 963 } |
940 | 964 |
941 | 965 |
| 966 |
| 967 |
942 class _FileSeekParams extends bindings.Struct { | 968 class _FileSeekParams extends bindings.Struct { |
943 static const List<bindings.StructDataHeader> kVersions = const [ | 969 static const List<bindings.StructDataHeader> kVersions = const [ |
944 const bindings.StructDataHeader(24, 0) | 970 const bindings.StructDataHeader(24, 0) |
945 ]; | 971 ]; |
946 int offset = 0; | 972 int offset = 0; |
947 types_mojom.Whence whence = null; | 973 types_mojom.Whence whence = null; |
948 | 974 |
949 _FileSeekParams() : super(kVersions.last.size); | 975 _FileSeekParams() : super(kVersions.last.size); |
950 | 976 |
951 static _FileSeekParams deserialize(bindings.Message message) { | 977 static _FileSeekParams deserialize(bindings.Message message) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 | 1038 |
1013 Map toJson() { | 1039 Map toJson() { |
1014 Map map = new Map(); | 1040 Map map = new Map(); |
1015 map["offset"] = offset; | 1041 map["offset"] = offset; |
1016 map["whence"] = whence; | 1042 map["whence"] = whence; |
1017 return map; | 1043 return map; |
1018 } | 1044 } |
1019 } | 1045 } |
1020 | 1046 |
1021 | 1047 |
| 1048 |
| 1049 |
1022 class FileSeekResponseParams extends bindings.Struct { | 1050 class FileSeekResponseParams extends bindings.Struct { |
1023 static const List<bindings.StructDataHeader> kVersions = const [ | 1051 static const List<bindings.StructDataHeader> kVersions = const [ |
1024 const bindings.StructDataHeader(24, 0) | 1052 const bindings.StructDataHeader(24, 0) |
1025 ]; | 1053 ]; |
1026 types_mojom.Error error = null; | 1054 types_mojom.Error error = null; |
1027 int position = 0; | 1055 int position = 0; |
1028 | 1056 |
1029 FileSeekResponseParams() : super(kVersions.last.size); | 1057 FileSeekResponseParams() : super(kVersions.last.size); |
1030 | 1058 |
1031 static FileSeekResponseParams deserialize(bindings.Message message) { | 1059 static FileSeekResponseParams deserialize(bindings.Message message) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 | 1120 |
1093 Map toJson() { | 1121 Map toJson() { |
1094 Map map = new Map(); | 1122 Map map = new Map(); |
1095 map["error"] = error; | 1123 map["error"] = error; |
1096 map["position"] = position; | 1124 map["position"] = position; |
1097 return map; | 1125 return map; |
1098 } | 1126 } |
1099 } | 1127 } |
1100 | 1128 |
1101 | 1129 |
| 1130 |
| 1131 |
1102 class _FileStatParams extends bindings.Struct { | 1132 class _FileStatParams extends bindings.Struct { |
1103 static const List<bindings.StructDataHeader> kVersions = const [ | 1133 static const List<bindings.StructDataHeader> kVersions = const [ |
1104 const bindings.StructDataHeader(8, 0) | 1134 const bindings.StructDataHeader(8, 0) |
1105 ]; | 1135 ]; |
1106 | 1136 |
1107 _FileStatParams() : super(kVersions.last.size); | 1137 _FileStatParams() : super(kVersions.last.size); |
1108 | 1138 |
1109 static _FileStatParams deserialize(bindings.Message message) { | 1139 static _FileStatParams deserialize(bindings.Message message) { |
1110 var decoder = new bindings.Decoder(message); | 1140 var decoder = new bindings.Decoder(message); |
1111 var result = decode(decoder); | 1141 var result = decode(decoder); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 return "_FileStatParams("")"; | 1180 return "_FileStatParams("")"; |
1151 } | 1181 } |
1152 | 1182 |
1153 Map toJson() { | 1183 Map toJson() { |
1154 Map map = new Map(); | 1184 Map map = new Map(); |
1155 return map; | 1185 return map; |
1156 } | 1186 } |
1157 } | 1187 } |
1158 | 1188 |
1159 | 1189 |
| 1190 |
| 1191 |
1160 class FileStatResponseParams extends bindings.Struct { | 1192 class FileStatResponseParams extends bindings.Struct { |
1161 static const List<bindings.StructDataHeader> kVersions = const [ | 1193 static const List<bindings.StructDataHeader> kVersions = const [ |
1162 const bindings.StructDataHeader(24, 0) | 1194 const bindings.StructDataHeader(24, 0) |
1163 ]; | 1195 ]; |
1164 types_mojom.Error error = null; | 1196 types_mojom.Error error = null; |
1165 types_mojom.FileInformation fileInformation = null; | 1197 types_mojom.FileInformation fileInformation = null; |
1166 | 1198 |
1167 FileStatResponseParams() : super(kVersions.last.size); | 1199 FileStatResponseParams() : super(kVersions.last.size); |
1168 | 1200 |
1169 static FileStatResponseParams deserialize(bindings.Message message) { | 1201 static FileStatResponseParams deserialize(bindings.Message message) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 | 1263 |
1232 Map toJson() { | 1264 Map toJson() { |
1233 Map map = new Map(); | 1265 Map map = new Map(); |
1234 map["error"] = error; | 1266 map["error"] = error; |
1235 map["fileInformation"] = fileInformation; | 1267 map["fileInformation"] = fileInformation; |
1236 return map; | 1268 return map; |
1237 } | 1269 } |
1238 } | 1270 } |
1239 | 1271 |
1240 | 1272 |
| 1273 |
| 1274 |
1241 class _FileTruncateParams extends bindings.Struct { | 1275 class _FileTruncateParams extends bindings.Struct { |
1242 static const List<bindings.StructDataHeader> kVersions = const [ | 1276 static const List<bindings.StructDataHeader> kVersions = const [ |
1243 const bindings.StructDataHeader(16, 0) | 1277 const bindings.StructDataHeader(16, 0) |
1244 ]; | 1278 ]; |
1245 int size = 0; | 1279 int size = 0; |
1246 | 1280 |
1247 _FileTruncateParams() : super(kVersions.last.size); | 1281 _FileTruncateParams() : super(kVersions.last.size); |
1248 | 1282 |
1249 static _FileTruncateParams deserialize(bindings.Message message) { | 1283 static _FileTruncateParams deserialize(bindings.Message message) { |
1250 var decoder = new bindings.Decoder(message); | 1284 var decoder = new bindings.Decoder(message); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 } | 1332 } |
1299 | 1333 |
1300 Map toJson() { | 1334 Map toJson() { |
1301 Map map = new Map(); | 1335 Map map = new Map(); |
1302 map["size"] = size; | 1336 map["size"] = size; |
1303 return map; | 1337 return map; |
1304 } | 1338 } |
1305 } | 1339 } |
1306 | 1340 |
1307 | 1341 |
| 1342 |
| 1343 |
1308 class FileTruncateResponseParams extends bindings.Struct { | 1344 class FileTruncateResponseParams extends bindings.Struct { |
1309 static const List<bindings.StructDataHeader> kVersions = const [ | 1345 static const List<bindings.StructDataHeader> kVersions = const [ |
1310 const bindings.StructDataHeader(16, 0) | 1346 const bindings.StructDataHeader(16, 0) |
1311 ]; | 1347 ]; |
1312 types_mojom.Error error = null; | 1348 types_mojom.Error error = null; |
1313 | 1349 |
1314 FileTruncateResponseParams() : super(kVersions.last.size); | 1350 FileTruncateResponseParams() : super(kVersions.last.size); |
1315 | 1351 |
1316 static FileTruncateResponseParams deserialize(bindings.Message message) { | 1352 static FileTruncateResponseParams deserialize(bindings.Message message) { |
1317 var decoder = new bindings.Decoder(message); | 1353 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 } | 1405 } |
1370 | 1406 |
1371 Map toJson() { | 1407 Map toJson() { |
1372 Map map = new Map(); | 1408 Map map = new Map(); |
1373 map["error"] = error; | 1409 map["error"] = error; |
1374 return map; | 1410 return map; |
1375 } | 1411 } |
1376 } | 1412 } |
1377 | 1413 |
1378 | 1414 |
| 1415 |
| 1416 |
1379 class _FileTouchParams extends bindings.Struct { | 1417 class _FileTouchParams extends bindings.Struct { |
1380 static const List<bindings.StructDataHeader> kVersions = const [ | 1418 static const List<bindings.StructDataHeader> kVersions = const [ |
1381 const bindings.StructDataHeader(24, 0) | 1419 const bindings.StructDataHeader(24, 0) |
1382 ]; | 1420 ]; |
1383 types_mojom.TimespecOrNow atime = null; | 1421 types_mojom.TimespecOrNow atime = null; |
1384 types_mojom.TimespecOrNow mtime = null; | 1422 types_mojom.TimespecOrNow mtime = null; |
1385 | 1423 |
1386 _FileTouchParams() : super(kVersions.last.size); | 1424 _FileTouchParams() : super(kVersions.last.size); |
1387 | 1425 |
1388 static _FileTouchParams deserialize(bindings.Message message) { | 1426 static _FileTouchParams deserialize(bindings.Message message) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 | 1485 |
1448 Map toJson() { | 1486 Map toJson() { |
1449 Map map = new Map(); | 1487 Map map = new Map(); |
1450 map["atime"] = atime; | 1488 map["atime"] = atime; |
1451 map["mtime"] = mtime; | 1489 map["mtime"] = mtime; |
1452 return map; | 1490 return map; |
1453 } | 1491 } |
1454 } | 1492 } |
1455 | 1493 |
1456 | 1494 |
| 1495 |
| 1496 |
1457 class FileTouchResponseParams extends bindings.Struct { | 1497 class FileTouchResponseParams extends bindings.Struct { |
1458 static const List<bindings.StructDataHeader> kVersions = const [ | 1498 static const List<bindings.StructDataHeader> kVersions = const [ |
1459 const bindings.StructDataHeader(16, 0) | 1499 const bindings.StructDataHeader(16, 0) |
1460 ]; | 1500 ]; |
1461 types_mojom.Error error = null; | 1501 types_mojom.Error error = null; |
1462 | 1502 |
1463 FileTouchResponseParams() : super(kVersions.last.size); | 1503 FileTouchResponseParams() : super(kVersions.last.size); |
1464 | 1504 |
1465 static FileTouchResponseParams deserialize(bindings.Message message) { | 1505 static FileTouchResponseParams deserialize(bindings.Message message) { |
1466 var decoder = new bindings.Decoder(message); | 1506 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 } | 1558 } |
1519 | 1559 |
1520 Map toJson() { | 1560 Map toJson() { |
1521 Map map = new Map(); | 1561 Map map = new Map(); |
1522 map["error"] = error; | 1562 map["error"] = error; |
1523 return map; | 1563 return map; |
1524 } | 1564 } |
1525 } | 1565 } |
1526 | 1566 |
1527 | 1567 |
| 1568 |
| 1569 |
1528 class _FileDupParams extends bindings.Struct { | 1570 class _FileDupParams extends bindings.Struct { |
1529 static const List<bindings.StructDataHeader> kVersions = const [ | 1571 static const List<bindings.StructDataHeader> kVersions = const [ |
1530 const bindings.StructDataHeader(16, 0) | 1572 const bindings.StructDataHeader(16, 0) |
1531 ]; | 1573 ]; |
1532 Object file = null; | 1574 Object file = null; |
1533 | 1575 |
1534 _FileDupParams() : super(kVersions.last.size); | 1576 _FileDupParams() : super(kVersions.last.size); |
1535 | 1577 |
1536 static _FileDupParams deserialize(bindings.Message message) { | 1578 static _FileDupParams deserialize(bindings.Message message) { |
1537 var decoder = new bindings.Decoder(message); | 1579 var decoder = new bindings.Decoder(message); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 "file: $file" ")"; | 1626 "file: $file" ")"; |
1585 } | 1627 } |
1586 | 1628 |
1587 Map toJson() { | 1629 Map toJson() { |
1588 throw new bindings.MojoCodecError( | 1630 throw new bindings.MojoCodecError( |
1589 'Object containing handles cannot be encoded to JSON.'); | 1631 'Object containing handles cannot be encoded to JSON.'); |
1590 } | 1632 } |
1591 } | 1633 } |
1592 | 1634 |
1593 | 1635 |
| 1636 |
| 1637 |
1594 class FileDupResponseParams extends bindings.Struct { | 1638 class FileDupResponseParams extends bindings.Struct { |
1595 static const List<bindings.StructDataHeader> kVersions = const [ | 1639 static const List<bindings.StructDataHeader> kVersions = const [ |
1596 const bindings.StructDataHeader(16, 0) | 1640 const bindings.StructDataHeader(16, 0) |
1597 ]; | 1641 ]; |
1598 types_mojom.Error error = null; | 1642 types_mojom.Error error = null; |
1599 | 1643 |
1600 FileDupResponseParams() : super(kVersions.last.size); | 1644 FileDupResponseParams() : super(kVersions.last.size); |
1601 | 1645 |
1602 static FileDupResponseParams deserialize(bindings.Message message) { | 1646 static FileDupResponseParams deserialize(bindings.Message message) { |
1603 var decoder = new bindings.Decoder(message); | 1647 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 } | 1699 } |
1656 | 1700 |
1657 Map toJson() { | 1701 Map toJson() { |
1658 Map map = new Map(); | 1702 Map map = new Map(); |
1659 map["error"] = error; | 1703 map["error"] = error; |
1660 return map; | 1704 return map; |
1661 } | 1705 } |
1662 } | 1706 } |
1663 | 1707 |
1664 | 1708 |
| 1709 |
| 1710 |
1665 class _FileReopenParams extends bindings.Struct { | 1711 class _FileReopenParams extends bindings.Struct { |
1666 static const List<bindings.StructDataHeader> kVersions = const [ | 1712 static const List<bindings.StructDataHeader> kVersions = const [ |
1667 const bindings.StructDataHeader(16, 0) | 1713 const bindings.StructDataHeader(16, 0) |
1668 ]; | 1714 ]; |
1669 Object file = null; | 1715 Object file = null; |
1670 int openFlags = 0; | 1716 int openFlags = 0; |
1671 | 1717 |
1672 _FileReopenParams() : super(kVersions.last.size); | 1718 _FileReopenParams() : super(kVersions.last.size); |
1673 | 1719 |
1674 static _FileReopenParams deserialize(bindings.Message message) { | 1720 static _FileReopenParams deserialize(bindings.Message message) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 "openFlags: $openFlags" ")"; | 1775 "openFlags: $openFlags" ")"; |
1730 } | 1776 } |
1731 | 1777 |
1732 Map toJson() { | 1778 Map toJson() { |
1733 throw new bindings.MojoCodecError( | 1779 throw new bindings.MojoCodecError( |
1734 'Object containing handles cannot be encoded to JSON.'); | 1780 'Object containing handles cannot be encoded to JSON.'); |
1735 } | 1781 } |
1736 } | 1782 } |
1737 | 1783 |
1738 | 1784 |
| 1785 |
| 1786 |
1739 class FileReopenResponseParams extends bindings.Struct { | 1787 class FileReopenResponseParams extends bindings.Struct { |
1740 static const List<bindings.StructDataHeader> kVersions = const [ | 1788 static const List<bindings.StructDataHeader> kVersions = const [ |
1741 const bindings.StructDataHeader(16, 0) | 1789 const bindings.StructDataHeader(16, 0) |
1742 ]; | 1790 ]; |
1743 types_mojom.Error error = null; | 1791 types_mojom.Error error = null; |
1744 | 1792 |
1745 FileReopenResponseParams() : super(kVersions.last.size); | 1793 FileReopenResponseParams() : super(kVersions.last.size); |
1746 | 1794 |
1747 static FileReopenResponseParams deserialize(bindings.Message message) { | 1795 static FileReopenResponseParams deserialize(bindings.Message message) { |
1748 var decoder = new bindings.Decoder(message); | 1796 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1800 } | 1848 } |
1801 | 1849 |
1802 Map toJson() { | 1850 Map toJson() { |
1803 Map map = new Map(); | 1851 Map map = new Map(); |
1804 map["error"] = error; | 1852 map["error"] = error; |
1805 return map; | 1853 return map; |
1806 } | 1854 } |
1807 } | 1855 } |
1808 | 1856 |
1809 | 1857 |
| 1858 |
| 1859 |
1810 class _FileAsBufferParams extends bindings.Struct { | 1860 class _FileAsBufferParams extends bindings.Struct { |
1811 static const List<bindings.StructDataHeader> kVersions = const [ | 1861 static const List<bindings.StructDataHeader> kVersions = const [ |
1812 const bindings.StructDataHeader(8, 0) | 1862 const bindings.StructDataHeader(8, 0) |
1813 ]; | 1863 ]; |
1814 | 1864 |
1815 _FileAsBufferParams() : super(kVersions.last.size); | 1865 _FileAsBufferParams() : super(kVersions.last.size); |
1816 | 1866 |
1817 static _FileAsBufferParams deserialize(bindings.Message message) { | 1867 static _FileAsBufferParams deserialize(bindings.Message message) { |
1818 var decoder = new bindings.Decoder(message); | 1868 var decoder = new bindings.Decoder(message); |
1819 var result = decode(decoder); | 1869 var result = decode(decoder); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 return "_FileAsBufferParams("")"; | 1908 return "_FileAsBufferParams("")"; |
1859 } | 1909 } |
1860 | 1910 |
1861 Map toJson() { | 1911 Map toJson() { |
1862 Map map = new Map(); | 1912 Map map = new Map(); |
1863 return map; | 1913 return map; |
1864 } | 1914 } |
1865 } | 1915 } |
1866 | 1916 |
1867 | 1917 |
| 1918 |
| 1919 |
1868 class FileAsBufferResponseParams extends bindings.Struct { | 1920 class FileAsBufferResponseParams extends bindings.Struct { |
1869 static const List<bindings.StructDataHeader> kVersions = const [ | 1921 static const List<bindings.StructDataHeader> kVersions = const [ |
1870 const bindings.StructDataHeader(16, 0) | 1922 const bindings.StructDataHeader(16, 0) |
1871 ]; | 1923 ]; |
1872 types_mojom.Error error = null; | 1924 types_mojom.Error error = null; |
1873 core.MojoSharedBuffer buffer = null; | 1925 core.MojoSharedBuffer buffer = null; |
1874 | 1926 |
1875 FileAsBufferResponseParams() : super(kVersions.last.size); | 1927 FileAsBufferResponseParams() : super(kVersions.last.size); |
1876 | 1928 |
1877 static FileAsBufferResponseParams deserialize(bindings.Message message) { | 1929 static FileAsBufferResponseParams deserialize(bindings.Message message) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 "buffer: $buffer" ")"; | 1988 "buffer: $buffer" ")"; |
1937 } | 1989 } |
1938 | 1990 |
1939 Map toJson() { | 1991 Map toJson() { |
1940 throw new bindings.MojoCodecError( | 1992 throw new bindings.MojoCodecError( |
1941 'Object containing handles cannot be encoded to JSON.'); | 1993 'Object containing handles cannot be encoded to JSON.'); |
1942 } | 1994 } |
1943 } | 1995 } |
1944 | 1996 |
1945 | 1997 |
| 1998 |
| 1999 |
1946 class _FileIoctlParams extends bindings.Struct { | 2000 class _FileIoctlParams extends bindings.Struct { |
1947 static const List<bindings.StructDataHeader> kVersions = const [ | 2001 static const List<bindings.StructDataHeader> kVersions = const [ |
1948 const bindings.StructDataHeader(24, 0) | 2002 const bindings.StructDataHeader(24, 0) |
1949 ]; | 2003 ]; |
1950 int request = 0; | 2004 int request = 0; |
1951 List<int> inValues = null; | 2005 List<int> inValues = null; |
1952 | 2006 |
1953 _FileIoctlParams() : super(kVersions.last.size); | 2007 _FileIoctlParams() : super(kVersions.last.size); |
1954 | 2008 |
1955 static _FileIoctlParams deserialize(bindings.Message message) { | 2009 static _FileIoctlParams deserialize(bindings.Message message) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 | 2066 |
2013 Map toJson() { | 2067 Map toJson() { |
2014 Map map = new Map(); | 2068 Map map = new Map(); |
2015 map["request"] = request; | 2069 map["request"] = request; |
2016 map["inValues"] = inValues; | 2070 map["inValues"] = inValues; |
2017 return map; | 2071 return map; |
2018 } | 2072 } |
2019 } | 2073 } |
2020 | 2074 |
2021 | 2075 |
| 2076 |
| 2077 |
2022 class FileIoctlResponseParams extends bindings.Struct { | 2078 class FileIoctlResponseParams extends bindings.Struct { |
2023 static const List<bindings.StructDataHeader> kVersions = const [ | 2079 static const List<bindings.StructDataHeader> kVersions = const [ |
2024 const bindings.StructDataHeader(24, 0) | 2080 const bindings.StructDataHeader(24, 0) |
2025 ]; | 2081 ]; |
2026 types_mojom.Error error = null; | 2082 types_mojom.Error error = null; |
2027 List<int> outValues = null; | 2083 List<int> outValues = null; |
2028 | 2084 |
2029 FileIoctlResponseParams() : super(kVersions.last.size); | 2085 FileIoctlResponseParams() : super(kVersions.last.size); |
2030 | 2086 |
2031 static FileIoctlResponseParams deserialize(bindings.Message message) { | 2087 static FileIoctlResponseParams deserialize(bindings.Message message) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 } | 2147 } |
2092 | 2148 |
2093 Map toJson() { | 2149 Map toJson() { |
2094 Map map = new Map(); | 2150 Map map = new Map(); |
2095 map["error"] = error; | 2151 map["error"] = error; |
2096 map["outValues"] = outValues; | 2152 map["outValues"] = outValues; |
2097 return map; | 2153 return map; |
2098 } | 2154 } |
2099 } | 2155 } |
2100 | 2156 |
| 2157 |
| 2158 |
| 2159 |
2101 const int _File_closeName = 0; | 2160 const int _File_closeName = 0; |
2102 const int _File_readName = 1; | 2161 const int _File_readName = 1; |
2103 const int _File_writeName = 2; | 2162 const int _File_writeName = 2; |
2104 const int _File_readToStreamName = 3; | 2163 const int _File_readToStreamName = 3; |
2105 const int _File_writeFromStreamName = 4; | 2164 const int _File_writeFromStreamName = 4; |
2106 const int _File_tellName = 5; | 2165 const int _File_tellName = 5; |
2107 const int _File_seekName = 6; | 2166 const int _File_seekName = 6; |
2108 const int _File_statName = 7; | 2167 const int _File_statName = 7; |
2109 const int _File_truncateName = 8; | 2168 const int _File_truncateName = 8; |
2110 const int _File_touchName = 9; | 2169 const int _File_touchName = 9; |
2111 const int _File_dupName = 10; | 2170 const int _File_dupName = 10; |
2112 const int _File_reopenName = 11; | 2171 const int _File_reopenName = 11; |
2113 const int _File_asBufferName = 12; | 2172 const int _File_asBufferName = 12; |
2114 const int _File_ioctlName = 13; | 2173 const int _File_ioctlName = 13; |
2115 | 2174 |
| 2175 |
| 2176 |
| 2177 class _FileServiceDescription implements service_describer.ServiceDescription { |
| 2178 dynamic getTopLevelInterface([Function responseFactory]) => null; |
| 2179 |
| 2180 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; |
| 2181 |
| 2182 dynamic getAllTypeDefinitions([Function responseFactory]) => null; |
| 2183 } |
| 2184 |
2116 abstract class File { | 2185 abstract class File { |
2117 static const String serviceName = null; | 2186 static const String serviceName = null; |
2118 dynamic close([Function responseFactory = null]); | 2187 dynamic close([Function responseFactory = null]); |
2119 dynamic read(int numBytesToRead,int offset,types_mojom.Whence whence,[Function
responseFactory = null]); | 2188 dynamic read(int numBytesToRead,int offset,types_mojom.Whence whence,[Function
responseFactory = null]); |
2120 dynamic write(List<int> bytesToWrite,int offset,types_mojom.Whence whence,[Fun
ction responseFactory = null]); | 2189 dynamic write(List<int> bytesToWrite,int offset,types_mojom.Whence whence,[Fun
ction responseFactory = null]); |
2121 dynamic readToStream(core.MojoDataPipeProducer source,int offset,types_mojom.W
hence whence,int numBytesToRead,[Function responseFactory = null]); | 2190 dynamic readToStream(core.MojoDataPipeProducer source,int offset,types_mojom.W
hence whence,int numBytesToRead,[Function responseFactory = null]); |
2122 dynamic writeFromStream(core.MojoDataPipeConsumer sink,int offset,types_mojom.
Whence whence,[Function responseFactory = null]); | 2191 dynamic writeFromStream(core.MojoDataPipeConsumer sink,int offset,types_mojom.
Whence whence,[Function responseFactory = null]); |
2123 dynamic tell([Function responseFactory = null]); | 2192 dynamic tell([Function responseFactory = null]); |
2124 dynamic seek(int offset,types_mojom.Whence whence,[Function responseFactory =
null]); | 2193 dynamic seek(int offset,types_mojom.Whence whence,[Function responseFactory =
null]); |
2125 dynamic stat([Function responseFactory = null]); | 2194 dynamic stat([Function responseFactory = null]); |
(...skipping 14 matching lines...) Expand all Loading... |
2140 super.fromHandle(handle); | 2209 super.fromHandle(handle); |
2141 | 2210 |
2142 _FileProxyImpl.unbound() : super.unbound(); | 2211 _FileProxyImpl.unbound() : super.unbound(); |
2143 | 2212 |
2144 static _FileProxyImpl newFromEndpoint( | 2213 static _FileProxyImpl newFromEndpoint( |
2145 core.MojoMessagePipeEndpoint endpoint) { | 2214 core.MojoMessagePipeEndpoint endpoint) { |
2146 assert(endpoint.setDescription("For _FileProxyImpl")); | 2215 assert(endpoint.setDescription("For _FileProxyImpl")); |
2147 return new _FileProxyImpl.fromEndpoint(endpoint); | 2216 return new _FileProxyImpl.fromEndpoint(endpoint); |
2148 } | 2217 } |
2149 | 2218 |
| 2219 service_describer.ServiceDescription get serviceDescription => |
| 2220 new _FileServiceDescription(); |
| 2221 |
2150 void handleResponse(bindings.ServiceMessage message) { | 2222 void handleResponse(bindings.ServiceMessage message) { |
2151 switch (message.header.type) { | 2223 switch (message.header.type) { |
2152 case _File_closeName: | 2224 case _File_closeName: |
2153 var r = FileCloseResponseParams.deserialize( | 2225 var r = FileCloseResponseParams.deserialize( |
2154 message.payload); | 2226 message.payload); |
2155 if (!message.header.hasRequestId) { | 2227 if (!message.header.hasRequestId) { |
2156 proxyError("Expected a message with a valid request Id."); | 2228 proxyError("Expected a message with a valid request Id."); |
2157 return; | 2229 return; |
2158 } | 2230 } |
2159 Completer c = completerMap[message.header.requestId]; | 2231 Completer c = completerMap[message.header.requestId]; |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3069 assert(_impl == null); | 3141 assert(_impl == null); |
3070 _impl = d; | 3142 _impl = d; |
3071 } | 3143 } |
3072 | 3144 |
3073 String toString() { | 3145 String toString() { |
3074 var superString = super.toString(); | 3146 var superString = super.toString(); |
3075 return "FileStub($superString)"; | 3147 return "FileStub($superString)"; |
3076 } | 3148 } |
3077 | 3149 |
3078 int get version => 0; | 3150 int get version => 0; |
| 3151 |
| 3152 service_describer.ServiceDescription get serviceDescription => |
| 3153 new _FileServiceDescription(); |
3079 } | 3154 } |
3080 | 3155 |
3081 | 3156 |
| 3157 |
OLD | NEW |