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 directory_mojom; | 5 library directory_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 import 'package:mojo_services/mojo/files/file.mojom.dart' as file_mojom; | 10 import 'package:mojo_services/mojo/files/file.mojom.dart' as file_mojom; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return "_DirectoryReadParams("")"; | 63 return "_DirectoryReadParams("")"; |
64 } | 64 } |
65 | 65 |
66 Map toJson() { | 66 Map toJson() { |
67 Map map = new Map(); | 67 Map map = new Map(); |
68 return map; | 68 return map; |
69 } | 69 } |
70 } | 70 } |
71 | 71 |
72 | 72 |
73 | |
74 | |
75 class DirectoryReadResponseParams extends bindings.Struct { | 73 class DirectoryReadResponseParams extends bindings.Struct { |
76 static const List<bindings.StructDataHeader> kVersions = const [ | 74 static const List<bindings.StructDataHeader> kVersions = const [ |
77 const bindings.StructDataHeader(24, 0) | 75 const bindings.StructDataHeader(24, 0) |
78 ]; | 76 ]; |
79 types_mojom.Error error = null; | 77 types_mojom.Error error = null; |
80 List<types_mojom.DirectoryEntry> directoryContents = null; | 78 List<types_mojom.DirectoryEntry> directoryContents = null; |
81 | 79 |
82 DirectoryReadResponseParams() : super(kVersions.last.size); | 80 DirectoryReadResponseParams() : super(kVersions.last.size); |
83 | 81 |
84 static DirectoryReadResponseParams deserialize(bindings.Message message) { | 82 static DirectoryReadResponseParams deserialize(bindings.Message message) { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 171 |
174 Map toJson() { | 172 Map toJson() { |
175 Map map = new Map(); | 173 Map map = new Map(); |
176 map["error"] = error; | 174 map["error"] = error; |
177 map["directoryContents"] = directoryContents; | 175 map["directoryContents"] = directoryContents; |
178 return map; | 176 return map; |
179 } | 177 } |
180 } | 178 } |
181 | 179 |
182 | 180 |
183 | |
184 | |
185 class _DirectoryStatParams extends bindings.Struct { | 181 class _DirectoryStatParams extends bindings.Struct { |
186 static const List<bindings.StructDataHeader> kVersions = const [ | 182 static const List<bindings.StructDataHeader> kVersions = const [ |
187 const bindings.StructDataHeader(8, 0) | 183 const bindings.StructDataHeader(8, 0) |
188 ]; | 184 ]; |
189 | 185 |
190 _DirectoryStatParams() : super(kVersions.last.size); | 186 _DirectoryStatParams() : super(kVersions.last.size); |
191 | 187 |
192 static _DirectoryStatParams deserialize(bindings.Message message) { | 188 static _DirectoryStatParams deserialize(bindings.Message message) { |
193 var decoder = new bindings.Decoder(message); | 189 var decoder = new bindings.Decoder(message); |
194 var result = decode(decoder); | 190 var result = decode(decoder); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return "_DirectoryStatParams("")"; | 229 return "_DirectoryStatParams("")"; |
234 } | 230 } |
235 | 231 |
236 Map toJson() { | 232 Map toJson() { |
237 Map map = new Map(); | 233 Map map = new Map(); |
238 return map; | 234 return map; |
239 } | 235 } |
240 } | 236 } |
241 | 237 |
242 | 238 |
243 | |
244 | |
245 class DirectoryStatResponseParams extends bindings.Struct { | 239 class DirectoryStatResponseParams extends bindings.Struct { |
246 static const List<bindings.StructDataHeader> kVersions = const [ | 240 static const List<bindings.StructDataHeader> kVersions = const [ |
247 const bindings.StructDataHeader(24, 0) | 241 const bindings.StructDataHeader(24, 0) |
248 ]; | 242 ]; |
249 types_mojom.Error error = null; | 243 types_mojom.Error error = null; |
250 types_mojom.FileInformation fileInformation = null; | 244 types_mojom.FileInformation fileInformation = null; |
251 | 245 |
252 DirectoryStatResponseParams() : super(kVersions.last.size); | 246 DirectoryStatResponseParams() : super(kVersions.last.size); |
253 | 247 |
254 static DirectoryStatResponseParams deserialize(bindings.Message message) { | 248 static DirectoryStatResponseParams deserialize(bindings.Message message) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 320 |
327 Map toJson() { | 321 Map toJson() { |
328 Map map = new Map(); | 322 Map map = new Map(); |
329 map["error"] = error; | 323 map["error"] = error; |
330 map["fileInformation"] = fileInformation; | 324 map["fileInformation"] = fileInformation; |
331 return map; | 325 return map; |
332 } | 326 } |
333 } | 327 } |
334 | 328 |
335 | 329 |
336 | |
337 | |
338 class _DirectoryTouchParams extends bindings.Struct { | 330 class _DirectoryTouchParams extends bindings.Struct { |
339 static const List<bindings.StructDataHeader> kVersions = const [ | 331 static const List<bindings.StructDataHeader> kVersions = const [ |
340 const bindings.StructDataHeader(24, 0) | 332 const bindings.StructDataHeader(24, 0) |
341 ]; | 333 ]; |
342 types_mojom.TimespecOrNow atime = null; | 334 types_mojom.TimespecOrNow atime = null; |
343 types_mojom.TimespecOrNow mtime = null; | 335 types_mojom.TimespecOrNow mtime = null; |
344 | 336 |
345 _DirectoryTouchParams() : super(kVersions.last.size); | 337 _DirectoryTouchParams() : super(kVersions.last.size); |
346 | 338 |
347 static _DirectoryTouchParams deserialize(bindings.Message message) { | 339 static _DirectoryTouchParams deserialize(bindings.Message message) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 408 |
417 Map toJson() { | 409 Map toJson() { |
418 Map map = new Map(); | 410 Map map = new Map(); |
419 map["atime"] = atime; | 411 map["atime"] = atime; |
420 map["mtime"] = mtime; | 412 map["mtime"] = mtime; |
421 return map; | 413 return map; |
422 } | 414 } |
423 } | 415 } |
424 | 416 |
425 | 417 |
426 | |
427 | |
428 class DirectoryTouchResponseParams extends bindings.Struct { | 418 class DirectoryTouchResponseParams extends bindings.Struct { |
429 static const List<bindings.StructDataHeader> kVersions = const [ | 419 static const List<bindings.StructDataHeader> kVersions = const [ |
430 const bindings.StructDataHeader(16, 0) | 420 const bindings.StructDataHeader(16, 0) |
431 ]; | 421 ]; |
432 types_mojom.Error error = null; | 422 types_mojom.Error error = null; |
433 | 423 |
434 DirectoryTouchResponseParams() : super(kVersions.last.size); | 424 DirectoryTouchResponseParams() : super(kVersions.last.size); |
435 | 425 |
436 static DirectoryTouchResponseParams deserialize(bindings.Message message) { | 426 static DirectoryTouchResponseParams deserialize(bindings.Message message) { |
437 var decoder = new bindings.Decoder(message); | 427 var decoder = new bindings.Decoder(message); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 } | 484 } |
495 | 485 |
496 Map toJson() { | 486 Map toJson() { |
497 Map map = new Map(); | 487 Map map = new Map(); |
498 map["error"] = error; | 488 map["error"] = error; |
499 return map; | 489 return map; |
500 } | 490 } |
501 } | 491 } |
502 | 492 |
503 | 493 |
504 | |
505 | |
506 class _DirectoryOpenFileParams extends bindings.Struct { | 494 class _DirectoryOpenFileParams extends bindings.Struct { |
507 static const List<bindings.StructDataHeader> kVersions = const [ | 495 static const List<bindings.StructDataHeader> kVersions = const [ |
508 const bindings.StructDataHeader(24, 0) | 496 const bindings.StructDataHeader(24, 0) |
509 ]; | 497 ]; |
510 String path = null; | 498 String path = null; |
511 Object file = null; | 499 Object file = null; |
512 int openFlags = 0; | 500 int openFlags = 0; |
513 | 501 |
514 _DirectoryOpenFileParams() : super(kVersions.last.size); | 502 _DirectoryOpenFileParams() : super(kVersions.last.size); |
515 | 503 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 "openFlags: $openFlags" ")"; | 581 "openFlags: $openFlags" ")"; |
594 } | 582 } |
595 | 583 |
596 Map toJson() { | 584 Map toJson() { |
597 throw new bindings.MojoCodecError( | 585 throw new bindings.MojoCodecError( |
598 'Object containing handles cannot be encoded to JSON.'); | 586 'Object containing handles cannot be encoded to JSON.'); |
599 } | 587 } |
600 } | 588 } |
601 | 589 |
602 | 590 |
603 | |
604 | |
605 class DirectoryOpenFileResponseParams extends bindings.Struct { | 591 class DirectoryOpenFileResponseParams extends bindings.Struct { |
606 static const List<bindings.StructDataHeader> kVersions = const [ | 592 static const List<bindings.StructDataHeader> kVersions = const [ |
607 const bindings.StructDataHeader(16, 0) | 593 const bindings.StructDataHeader(16, 0) |
608 ]; | 594 ]; |
609 types_mojom.Error error = null; | 595 types_mojom.Error error = null; |
610 | 596 |
611 DirectoryOpenFileResponseParams() : super(kVersions.last.size); | 597 DirectoryOpenFileResponseParams() : super(kVersions.last.size); |
612 | 598 |
613 static DirectoryOpenFileResponseParams deserialize(bindings.Message message) { | 599 static DirectoryOpenFileResponseParams deserialize(bindings.Message message) { |
614 var decoder = new bindings.Decoder(message); | 600 var decoder = new bindings.Decoder(message); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 } | 657 } |
672 | 658 |
673 Map toJson() { | 659 Map toJson() { |
674 Map map = new Map(); | 660 Map map = new Map(); |
675 map["error"] = error; | 661 map["error"] = error; |
676 return map; | 662 return map; |
677 } | 663 } |
678 } | 664 } |
679 | 665 |
680 | 666 |
681 | |
682 | |
683 class _DirectoryOpenDirectoryParams extends bindings.Struct { | 667 class _DirectoryOpenDirectoryParams extends bindings.Struct { |
684 static const List<bindings.StructDataHeader> kVersions = const [ | 668 static const List<bindings.StructDataHeader> kVersions = const [ |
685 const bindings.StructDataHeader(24, 0) | 669 const bindings.StructDataHeader(24, 0) |
686 ]; | 670 ]; |
687 String path = null; | 671 String path = null; |
688 Object directory = null; | 672 Object directory = null; |
689 int openFlags = 0; | 673 int openFlags = 0; |
690 | 674 |
691 _DirectoryOpenDirectoryParams() : super(kVersions.last.size); | 675 _DirectoryOpenDirectoryParams() : super(kVersions.last.size); |
692 | 676 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 "openFlags: $openFlags" ")"; | 754 "openFlags: $openFlags" ")"; |
771 } | 755 } |
772 | 756 |
773 Map toJson() { | 757 Map toJson() { |
774 throw new bindings.MojoCodecError( | 758 throw new bindings.MojoCodecError( |
775 'Object containing handles cannot be encoded to JSON.'); | 759 'Object containing handles cannot be encoded to JSON.'); |
776 } | 760 } |
777 } | 761 } |
778 | 762 |
779 | 763 |
780 | |
781 | |
782 class DirectoryOpenDirectoryResponseParams extends bindings.Struct { | 764 class DirectoryOpenDirectoryResponseParams extends bindings.Struct { |
783 static const List<bindings.StructDataHeader> kVersions = const [ | 765 static const List<bindings.StructDataHeader> kVersions = const [ |
784 const bindings.StructDataHeader(16, 0) | 766 const bindings.StructDataHeader(16, 0) |
785 ]; | 767 ]; |
786 types_mojom.Error error = null; | 768 types_mojom.Error error = null; |
787 | 769 |
788 DirectoryOpenDirectoryResponseParams() : super(kVersions.last.size); | 770 DirectoryOpenDirectoryResponseParams() : super(kVersions.last.size); |
789 | 771 |
790 static DirectoryOpenDirectoryResponseParams deserialize(bindings.Message messa
ge) { | 772 static DirectoryOpenDirectoryResponseParams deserialize(bindings.Message messa
ge) { |
791 var decoder = new bindings.Decoder(message); | 773 var decoder = new bindings.Decoder(message); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 } | 830 } |
849 | 831 |
850 Map toJson() { | 832 Map toJson() { |
851 Map map = new Map(); | 833 Map map = new Map(); |
852 map["error"] = error; | 834 map["error"] = error; |
853 return map; | 835 return map; |
854 } | 836 } |
855 } | 837 } |
856 | 838 |
857 | 839 |
858 | |
859 | |
860 class _DirectoryRenameParams extends bindings.Struct { | 840 class _DirectoryRenameParams extends bindings.Struct { |
861 static const List<bindings.StructDataHeader> kVersions = const [ | 841 static const List<bindings.StructDataHeader> kVersions = const [ |
862 const bindings.StructDataHeader(24, 0) | 842 const bindings.StructDataHeader(24, 0) |
863 ]; | 843 ]; |
864 String path = null; | 844 String path = null; |
865 String newPath = null; | 845 String newPath = null; |
866 | 846 |
867 _DirectoryRenameParams() : super(kVersions.last.size); | 847 _DirectoryRenameParams() : super(kVersions.last.size); |
868 | 848 |
869 static _DirectoryRenameParams deserialize(bindings.Message message) { | 849 static _DirectoryRenameParams deserialize(bindings.Message message) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 | 916 |
937 Map toJson() { | 917 Map toJson() { |
938 Map map = new Map(); | 918 Map map = new Map(); |
939 map["path"] = path; | 919 map["path"] = path; |
940 map["newPath"] = newPath; | 920 map["newPath"] = newPath; |
941 return map; | 921 return map; |
942 } | 922 } |
943 } | 923 } |
944 | 924 |
945 | 925 |
946 | |
947 | |
948 class DirectoryRenameResponseParams extends bindings.Struct { | 926 class DirectoryRenameResponseParams extends bindings.Struct { |
949 static const List<bindings.StructDataHeader> kVersions = const [ | 927 static const List<bindings.StructDataHeader> kVersions = const [ |
950 const bindings.StructDataHeader(16, 0) | 928 const bindings.StructDataHeader(16, 0) |
951 ]; | 929 ]; |
952 types_mojom.Error error = null; | 930 types_mojom.Error error = null; |
953 | 931 |
954 DirectoryRenameResponseParams() : super(kVersions.last.size); | 932 DirectoryRenameResponseParams() : super(kVersions.last.size); |
955 | 933 |
956 static DirectoryRenameResponseParams deserialize(bindings.Message message) { | 934 static DirectoryRenameResponseParams deserialize(bindings.Message message) { |
957 var decoder = new bindings.Decoder(message); | 935 var decoder = new bindings.Decoder(message); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 } | 992 } |
1015 | 993 |
1016 Map toJson() { | 994 Map toJson() { |
1017 Map map = new Map(); | 995 Map map = new Map(); |
1018 map["error"] = error; | 996 map["error"] = error; |
1019 return map; | 997 return map; |
1020 } | 998 } |
1021 } | 999 } |
1022 | 1000 |
1023 | 1001 |
1024 | |
1025 | |
1026 class _DirectoryDeleteParams extends bindings.Struct { | 1002 class _DirectoryDeleteParams extends bindings.Struct { |
1027 static const List<bindings.StructDataHeader> kVersions = const [ | 1003 static const List<bindings.StructDataHeader> kVersions = const [ |
1028 const bindings.StructDataHeader(24, 0) | 1004 const bindings.StructDataHeader(24, 0) |
1029 ]; | 1005 ]; |
1030 String path = null; | 1006 String path = null; |
1031 int deleteFlags = 0; | 1007 int deleteFlags = 0; |
1032 | 1008 |
1033 _DirectoryDeleteParams() : super(kVersions.last.size); | 1009 _DirectoryDeleteParams() : super(kVersions.last.size); |
1034 | 1010 |
1035 static _DirectoryDeleteParams deserialize(bindings.Message message) { | 1011 static _DirectoryDeleteParams deserialize(bindings.Message message) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 | 1078 |
1103 Map toJson() { | 1079 Map toJson() { |
1104 Map map = new Map(); | 1080 Map map = new Map(); |
1105 map["path"] = path; | 1081 map["path"] = path; |
1106 map["deleteFlags"] = deleteFlags; | 1082 map["deleteFlags"] = deleteFlags; |
1107 return map; | 1083 return map; |
1108 } | 1084 } |
1109 } | 1085 } |
1110 | 1086 |
1111 | 1087 |
1112 | |
1113 | |
1114 class DirectoryDeleteResponseParams extends bindings.Struct { | 1088 class DirectoryDeleteResponseParams extends bindings.Struct { |
1115 static const List<bindings.StructDataHeader> kVersions = const [ | 1089 static const List<bindings.StructDataHeader> kVersions = const [ |
1116 const bindings.StructDataHeader(16, 0) | 1090 const bindings.StructDataHeader(16, 0) |
1117 ]; | 1091 ]; |
1118 types_mojom.Error error = null; | 1092 types_mojom.Error error = null; |
1119 | 1093 |
1120 DirectoryDeleteResponseParams() : super(kVersions.last.size); | 1094 DirectoryDeleteResponseParams() : super(kVersions.last.size); |
1121 | 1095 |
1122 static DirectoryDeleteResponseParams deserialize(bindings.Message message) { | 1096 static DirectoryDeleteResponseParams deserialize(bindings.Message message) { |
1123 var decoder = new bindings.Decoder(message); | 1097 var decoder = new bindings.Decoder(message); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 "error: $error" ")"; | 1153 "error: $error" ")"; |
1180 } | 1154 } |
1181 | 1155 |
1182 Map toJson() { | 1156 Map toJson() { |
1183 Map map = new Map(); | 1157 Map map = new Map(); |
1184 map["error"] = error; | 1158 map["error"] = error; |
1185 return map; | 1159 return map; |
1186 } | 1160 } |
1187 } | 1161 } |
1188 | 1162 |
1189 | |
1190 | |
1191 | |
1192 const int _Directory_readName = 0; | 1163 const int _Directory_readName = 0; |
1193 const int _Directory_statName = 1; | 1164 const int _Directory_statName = 1; |
1194 const int _Directory_touchName = 2; | 1165 const int _Directory_touchName = 2; |
1195 const int _Directory_openFileName = 3; | 1166 const int _Directory_openFileName = 3; |
1196 const int _Directory_openDirectoryName = 4; | 1167 const int _Directory_openDirectoryName = 4; |
1197 const int _Directory_renameName = 5; | 1168 const int _Directory_renameName = 5; |
1198 const int _Directory_deleteName = 6; | 1169 const int _Directory_deleteName = 6; |
1199 | 1170 |
1200 | |
1201 | |
1202 class _DirectoryServiceDescription implements service_describer.ServiceDescripti
on { | 1171 class _DirectoryServiceDescription implements service_describer.ServiceDescripti
on { |
1203 dynamic getTopLevelInterface([Function responseFactory]) => | 1172 dynamic getTopLevelInterface([Function responseFactory]) => |
1204 responseFactory(null); | 1173 responseFactory(null); |
1205 | 1174 |
1206 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1175 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
1207 responseFactory(null); | 1176 responseFactory(null); |
1208 | 1177 |
1209 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1178 dynamic getAllTypeDefinitions([Function responseFactory]) => |
1210 responseFactory(null); | 1179 responseFactory(null); |
1211 } | 1180 } |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1769 static service_describer.ServiceDescription get serviceDescription { | 1738 static service_describer.ServiceDescription get serviceDescription { |
1770 if (_cachedServiceDescription == null) { | 1739 if (_cachedServiceDescription == null) { |
1771 _cachedServiceDescription = new _DirectoryServiceDescription(); | 1740 _cachedServiceDescription = new _DirectoryServiceDescription(); |
1772 } | 1741 } |
1773 return _cachedServiceDescription; | 1742 return _cachedServiceDescription; |
1774 } | 1743 } |
1775 } | 1744 } |
1776 | 1745 |
1777 | 1746 |
1778 | 1747 |
OLD | NEW |