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 geocoder_mojom; | 5 library geocoder_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/location.mojom.dart' as location_mojom; | 10 import 'package:mojo_services/mojo/location.mojom.dart' as location_mojom; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 return "LocationType("")"; | 66 return "LocationType("")"; |
67 } | 67 } |
68 | 68 |
69 Map toJson() { | 69 Map toJson() { |
70 Map map = new Map(); | 70 Map map = new Map(); |
71 return map; | 71 return map; |
72 } | 72 } |
73 } | 73 } |
74 | 74 |
75 | 75 |
76 | |
77 | |
78 class Bounds extends bindings.Struct { | 76 class Bounds extends bindings.Struct { |
79 static const List<bindings.StructDataHeader> kVersions = const [ | 77 static const List<bindings.StructDataHeader> kVersions = const [ |
80 const bindings.StructDataHeader(24, 0) | 78 const bindings.StructDataHeader(24, 0) |
81 ]; | 79 ]; |
82 location_mojom.Location northeast = null; | 80 location_mojom.Location northeast = null; |
83 location_mojom.Location southwest = null; | 81 location_mojom.Location southwest = null; |
84 | 82 |
85 Bounds() : super(kVersions.last.size); | 83 Bounds() : super(kVersions.last.size); |
86 | 84 |
87 static Bounds deserialize(bindings.Message message) { | 85 static Bounds deserialize(bindings.Message message) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 154 |
157 Map toJson() { | 155 Map toJson() { |
158 Map map = new Map(); | 156 Map map = new Map(); |
159 map["northeast"] = northeast; | 157 map["northeast"] = northeast; |
160 map["southwest"] = southwest; | 158 map["southwest"] = southwest; |
161 return map; | 159 return map; |
162 } | 160 } |
163 } | 161 } |
164 | 162 |
165 | 163 |
166 | |
167 | |
168 class ComponentRestrictions extends bindings.Struct { | 164 class ComponentRestrictions extends bindings.Struct { |
169 static const List<bindings.StructDataHeader> kVersions = const [ | 165 static const List<bindings.StructDataHeader> kVersions = const [ |
170 const bindings.StructDataHeader(48, 0) | 166 const bindings.StructDataHeader(48, 0) |
171 ]; | 167 ]; |
172 String administrativeArea = null; | 168 String administrativeArea = null; |
173 String country = null; | 169 String country = null; |
174 String locality = null; | 170 String locality = null; |
175 String postalCode = null; | 171 String postalCode = null; |
176 String route = null; | 172 String route = null; |
177 | 173 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 map["administrativeArea"] = administrativeArea; | 282 map["administrativeArea"] = administrativeArea; |
287 map["country"] = country; | 283 map["country"] = country; |
288 map["locality"] = locality; | 284 map["locality"] = locality; |
289 map["postalCode"] = postalCode; | 285 map["postalCode"] = postalCode; |
290 map["route"] = route; | 286 map["route"] = route; |
291 return map; | 287 return map; |
292 } | 288 } |
293 } | 289 } |
294 | 290 |
295 | 291 |
296 | |
297 | |
298 class Options extends bindings.Struct { | 292 class Options extends bindings.Struct { |
299 static const List<bindings.StructDataHeader> kVersions = const [ | 293 static const List<bindings.StructDataHeader> kVersions = const [ |
300 const bindings.StructDataHeader(32, 0) | 294 const bindings.StructDataHeader(32, 0) |
301 ]; | 295 ]; |
302 ComponentRestrictions restrictions = null; | 296 ComponentRestrictions restrictions = null; |
303 location_mojom.Location location = null; | 297 location_mojom.Location location = null; |
304 String region = null; | 298 String region = null; |
305 | 299 |
306 Options() : super(kVersions.last.size); | 300 Options() : super(kVersions.last.size); |
307 | 301 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 Map toJson() { | 384 Map toJson() { |
391 Map map = new Map(); | 385 Map map = new Map(); |
392 map["restrictions"] = restrictions; | 386 map["restrictions"] = restrictions; |
393 map["location"] = location; | 387 map["location"] = location; |
394 map["region"] = region; | 388 map["region"] = region; |
395 return map; | 389 return map; |
396 } | 390 } |
397 } | 391 } |
398 | 392 |
399 | 393 |
400 | |
401 | |
402 class Geometry extends bindings.Struct { | 394 class Geometry extends bindings.Struct { |
403 static const List<bindings.StructDataHeader> kVersions = const [ | 395 static const List<bindings.StructDataHeader> kVersions = const [ |
404 const bindings.StructDataHeader(40, 0) | 396 const bindings.StructDataHeader(40, 0) |
405 ]; | 397 ]; |
406 location_mojom.Location location = null; | 398 location_mojom.Location location = null; |
407 LocationType locationType = null; | 399 LocationType locationType = null; |
408 Bounds viewport = null; | 400 Bounds viewport = null; |
409 Bounds bounds = null; | 401 Bounds bounds = null; |
410 | 402 |
411 Geometry() : super(kVersions.last.size); | 403 Geometry() : super(kVersions.last.size); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 Map map = new Map(); | 502 Map map = new Map(); |
511 map["location"] = location; | 503 map["location"] = location; |
512 map["locationType"] = locationType; | 504 map["locationType"] = locationType; |
513 map["viewport"] = viewport; | 505 map["viewport"] = viewport; |
514 map["bounds"] = bounds; | 506 map["bounds"] = bounds; |
515 return map; | 507 return map; |
516 } | 508 } |
517 } | 509 } |
518 | 510 |
519 | 511 |
520 | |
521 | |
522 class Result extends bindings.Struct { | 512 class Result extends bindings.Struct { |
523 static const List<bindings.StructDataHeader> kVersions = const [ | 513 static const List<bindings.StructDataHeader> kVersions = const [ |
524 const bindings.StructDataHeader(40, 0) | 514 const bindings.StructDataHeader(40, 0) |
525 ]; | 515 ]; |
526 bool partialMatch = false; | 516 bool partialMatch = false; |
527 Geometry geometry = null; | 517 Geometry geometry = null; |
528 String formattedAddress = null; | 518 String formattedAddress = null; |
529 List<String> types = null; | 519 List<String> types = null; |
530 | 520 |
531 Result() : super(kVersions.last.size); | 521 Result() : super(kVersions.last.size); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 Map map = new Map(); | 632 Map map = new Map(); |
643 map["partialMatch"] = partialMatch; | 633 map["partialMatch"] = partialMatch; |
644 map["geometry"] = geometry; | 634 map["geometry"] = geometry; |
645 map["formattedAddress"] = formattedAddress; | 635 map["formattedAddress"] = formattedAddress; |
646 map["types"] = types; | 636 map["types"] = types; |
647 return map; | 637 return map; |
648 } | 638 } |
649 } | 639 } |
650 | 640 |
651 | 641 |
652 | |
653 | |
654 class Status extends bindings.Struct { | 642 class Status extends bindings.Struct { |
655 static const List<bindings.StructDataHeader> kVersions = const [ | 643 static const List<bindings.StructDataHeader> kVersions = const [ |
656 const bindings.StructDataHeader(8, 0) | 644 const bindings.StructDataHeader(8, 0) |
657 ]; | 645 ]; |
658 static const String ok = "OK"; | 646 static const String ok = "OK"; |
659 static const String zeroResults = "ZERO_RESULTS"; | 647 static const String zeroResults = "ZERO_RESULTS"; |
660 static const String overQueryLimit = "OVER_QUERY_LIMIT"; | 648 static const String overQueryLimit = "OVER_QUERY_LIMIT"; |
661 static const String requestDenied = "REQUEST_DENIED"; | 649 static const String requestDenied = "REQUEST_DENIED"; |
662 static const String invalidRequest = "INVALID_REQUEST"; | 650 static const String invalidRequest = "INVALID_REQUEST"; |
663 | 651 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 return "Status("")"; | 695 return "Status("")"; |
708 } | 696 } |
709 | 697 |
710 Map toJson() { | 698 Map toJson() { |
711 Map map = new Map(); | 699 Map map = new Map(); |
712 return map; | 700 return map; |
713 } | 701 } |
714 } | 702 } |
715 | 703 |
716 | 704 |
717 | |
718 | |
719 class _GeocoderAddressToLocationParams extends bindings.Struct { | 705 class _GeocoderAddressToLocationParams extends bindings.Struct { |
720 static const List<bindings.StructDataHeader> kVersions = const [ | 706 static const List<bindings.StructDataHeader> kVersions = const [ |
721 const bindings.StructDataHeader(24, 0) | 707 const bindings.StructDataHeader(24, 0) |
722 ]; | 708 ]; |
723 String address = null; | 709 String address = null; |
724 Options options = null; | 710 Options options = null; |
725 | 711 |
726 _GeocoderAddressToLocationParams() : super(kVersions.last.size); | 712 _GeocoderAddressToLocationParams() : super(kVersions.last.size); |
727 | 713 |
728 static _GeocoderAddressToLocationParams deserialize(bindings.Message message)
{ | 714 static _GeocoderAddressToLocationParams deserialize(bindings.Message message)
{ |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 | 782 |
797 Map toJson() { | 783 Map toJson() { |
798 Map map = new Map(); | 784 Map map = new Map(); |
799 map["address"] = address; | 785 map["address"] = address; |
800 map["options"] = options; | 786 map["options"] = options; |
801 return map; | 787 return map; |
802 } | 788 } |
803 } | 789 } |
804 | 790 |
805 | 791 |
806 | |
807 | |
808 class GeocoderAddressToLocationResponseParams extends bindings.Struct { | 792 class GeocoderAddressToLocationResponseParams extends bindings.Struct { |
809 static const List<bindings.StructDataHeader> kVersions = const [ | 793 static const List<bindings.StructDataHeader> kVersions = const [ |
810 const bindings.StructDataHeader(24, 0) | 794 const bindings.StructDataHeader(24, 0) |
811 ]; | 795 ]; |
812 String status = null; | 796 String status = null; |
813 List<Result> results = null; | 797 List<Result> results = null; |
814 | 798 |
815 GeocoderAddressToLocationResponseParams() : super(kVersions.last.size); | 799 GeocoderAddressToLocationResponseParams() : super(kVersions.last.size); |
816 | 800 |
817 static GeocoderAddressToLocationResponseParams deserialize(bindings.Message me
ssage) { | 801 static GeocoderAddressToLocationResponseParams deserialize(bindings.Message me
ssage) { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 | 886 |
903 Map toJson() { | 887 Map toJson() { |
904 Map map = new Map(); | 888 Map map = new Map(); |
905 map["status"] = status; | 889 map["status"] = status; |
906 map["results"] = results; | 890 map["results"] = results; |
907 return map; | 891 return map; |
908 } | 892 } |
909 } | 893 } |
910 | 894 |
911 | 895 |
912 | |
913 | |
914 class _GeocoderLocationToAddressParams extends bindings.Struct { | 896 class _GeocoderLocationToAddressParams extends bindings.Struct { |
915 static const List<bindings.StructDataHeader> kVersions = const [ | 897 static const List<bindings.StructDataHeader> kVersions = const [ |
916 const bindings.StructDataHeader(24, 0) | 898 const bindings.StructDataHeader(24, 0) |
917 ]; | 899 ]; |
918 location_mojom.Location location = null; | 900 location_mojom.Location location = null; |
919 Options options = null; | 901 Options options = null; |
920 | 902 |
921 _GeocoderLocationToAddressParams() : super(kVersions.last.size); | 903 _GeocoderLocationToAddressParams() : super(kVersions.last.size); |
922 | 904 |
923 static _GeocoderLocationToAddressParams deserialize(bindings.Message message)
{ | 905 static _GeocoderLocationToAddressParams deserialize(bindings.Message message)
{ |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 | 974 |
993 Map toJson() { | 975 Map toJson() { |
994 Map map = new Map(); | 976 Map map = new Map(); |
995 map["location"] = location; | 977 map["location"] = location; |
996 map["options"] = options; | 978 map["options"] = options; |
997 return map; | 979 return map; |
998 } | 980 } |
999 } | 981 } |
1000 | 982 |
1001 | 983 |
1002 | |
1003 | |
1004 class GeocoderLocationToAddressResponseParams extends bindings.Struct { | 984 class GeocoderLocationToAddressResponseParams extends bindings.Struct { |
1005 static const List<bindings.StructDataHeader> kVersions = const [ | 985 static const List<bindings.StructDataHeader> kVersions = const [ |
1006 const bindings.StructDataHeader(24, 0) | 986 const bindings.StructDataHeader(24, 0) |
1007 ]; | 987 ]; |
1008 String status = null; | 988 String status = null; |
1009 List<Result> results = null; | 989 List<Result> results = null; |
1010 | 990 |
1011 GeocoderLocationToAddressResponseParams() : super(kVersions.last.size); | 991 GeocoderLocationToAddressResponseParams() : super(kVersions.last.size); |
1012 | 992 |
1013 static GeocoderLocationToAddressResponseParams deserialize(bindings.Message me
ssage) { | 993 static GeocoderLocationToAddressResponseParams deserialize(bindings.Message me
ssage) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 } | 1077 } |
1098 | 1078 |
1099 Map toJson() { | 1079 Map toJson() { |
1100 Map map = new Map(); | 1080 Map map = new Map(); |
1101 map["status"] = status; | 1081 map["status"] = status; |
1102 map["results"] = results; | 1082 map["results"] = results; |
1103 return map; | 1083 return map; |
1104 } | 1084 } |
1105 } | 1085 } |
1106 | 1086 |
1107 | |
1108 | |
1109 | |
1110 const int _Geocoder_addressToLocationName = 0; | 1087 const int _Geocoder_addressToLocationName = 0; |
1111 const int _Geocoder_locationToAddressName = 1; | 1088 const int _Geocoder_locationToAddressName = 1; |
1112 | 1089 |
1113 | |
1114 | |
1115 class _GeocoderServiceDescription implements service_describer.ServiceDescriptio
n { | 1090 class _GeocoderServiceDescription implements service_describer.ServiceDescriptio
n { |
1116 dynamic getTopLevelInterface([Function responseFactory]) => | 1091 dynamic getTopLevelInterface([Function responseFactory]) => |
1117 responseFactory(null); | 1092 responseFactory(null); |
1118 | 1093 |
1119 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1094 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
1120 responseFactory(null); | 1095 responseFactory(null); |
1121 | 1096 |
1122 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1097 dynamic getAllTypeDefinitions([Function responseFactory]) => |
1123 responseFactory(null); | 1098 responseFactory(null); |
1124 } | 1099 } |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 static service_describer.ServiceDescription get serviceDescription { | 1373 static service_describer.ServiceDescription get serviceDescription { |
1399 if (_cachedServiceDescription == null) { | 1374 if (_cachedServiceDescription == null) { |
1400 _cachedServiceDescription = new _GeocoderServiceDescription(); | 1375 _cachedServiceDescription = new _GeocoderServiceDescription(); |
1401 } | 1376 } |
1402 return _cachedServiceDescription; | 1377 return _cachedServiceDescription; |
1403 } | 1378 } |
1404 } | 1379 } |
1405 | 1380 |
1406 | 1381 |
1407 | 1382 |
OLD | NEW |