Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/geocoder.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Update to master and regenerate mojoms Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/dart/packages/mojo_services/lib/mojo/geocoder.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/geocoder.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/geocoder.mojom.dart
index c8939f7b7d1828dc08a4f5adde3a65729bd8f79b..a78682e6c79357bb14817a020d06cc81a22cf738 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/geocoder.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/geocoder.mojom.dart
@@ -5,9 +5,12 @@
library geocoder_mojom;
import 'dart:async';
+import 'dart:collection';
import 'package:mojo/bindings.dart' as bindings;
import 'package:mojo/core.dart' as core;
+import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
+import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as service_describer;
import 'package:mojo_services/mojo/location.mojom.dart' as location_mojom;
@@ -72,6 +75,13 @@ class LocationType extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_LocationType__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'LocationType'
+ ..fullIdentifier = 'mojo.LocationType')
+ ..fields = <mojom_types.StructField>[];
+}
class Bounds extends bindings.Struct {
@@ -150,6 +160,31 @@ class Bounds extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Bounds__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Bounds'
+ ..fullIdentifier = 'mojo.Bounds')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Northeast')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_location_Location__'
+ ..typeKey = '_location_Location__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Southwest')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_location_Location__'
+ ..typeKey = '_location_Location__'
+ )),
+ ];
+}
class ComponentRestrictions extends bindings.Struct {
@@ -253,6 +288,38 @@ class ComponentRestrictions extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_ComponentRestrictions__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'ComponentRestrictions'
+ ..fullIdentifier = 'mojo.ComponentRestrictions')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AdministrativeArea')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Country')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Locality')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PostalCode')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Route')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+ ];
+}
class Options extends bindings.Struct {
@@ -340,6 +407,40 @@ class Options extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Options__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Options'
+ ..fullIdentifier = 'mojo.Options')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Restrictions')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_geocoder_ComponentRestrictions__'
+ ..typeKey = '_geocoder_ComponentRestrictions__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Location')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_location_Location__'
+ ..typeKey = '_location_Location__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Region')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+ ];
+}
class Geometry extends bindings.Struct {
@@ -438,6 +539,51 @@ class Geometry extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Geometry__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Geometry'
+ ..fullIdentifier = 'mojo.Geometry')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Location')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_location_Location__'
+ ..typeKey = '_location_Location__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'LocationType')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_geocoder_LocationType__'
+ ..typeKey = '_geocoder_LocationType__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Viewport')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_geocoder_Bounds__'
+ ..typeKey = '_geocoder_Bounds__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Bounds')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_geocoder_Bounds__'
+ ..typeKey = '_geocoder_Bounds__'
+ )),
+ ];
+}
class Result extends bindings.Struct {
@@ -549,6 +695,37 @@ class Result extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Result__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Result'
+ ..fullIdentifier = 'mojo.Result')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PartialMatch')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.bool),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Geometry')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_geocoder_Geometry__'
+ ..typeKey = '_geocoder_Geometry__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FormattedAddress')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Types')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..elementType = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)))),
+ ];
+}
class Status extends bindings.Struct {
@@ -612,6 +789,13 @@ class Status extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Status__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Status'
+ ..fullIdentifier = 'mojo.Status')
+ ..fields = <mojom_types.StructField>[];
+}
class _GeocoderAddressToLocationParams extends bindings.Struct {
@@ -689,6 +873,29 @@ class _GeocoderAddressToLocationParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Geocoder_AddressToLocation_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_GeocoderAddressToLocationParams'
+ ..fullIdentifier = 'mojo._GeocoderAddressToLocationParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Address')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Options')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_geocoder_Options__'
+ ..typeKey = '_geocoder_Options__'
+ )),
+ ];
+}
class GeocoderAddressToLocationResponseParams extends bindings.Struct {
@@ -784,6 +991,30 @@ class GeocoderAddressToLocationResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Geocoder_AddressToLocation_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'GeocoderAddressToLocationResponseParams'
+ ..fullIdentifier = 'mojo.GeocoderAddressToLocationResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Status')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Results')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..nullable = true
+
+ ..elementType = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_geocoder_Result__'
+ ..typeKey = '_geocoder_Result__'
+ )))),
+ ];
+}
class _GeocoderLocationToAddressParams extends bindings.Struct {
@@ -862,6 +1093,33 @@ class _GeocoderLocationToAddressParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Geocoder_LocationToAddress_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_GeocoderLocationToAddressParams'
+ ..fullIdentifier = 'mojo._GeocoderLocationToAddressParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Location')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_location_Location__'
+ ..typeKey = '_location_Location__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Options')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_geocoder_Options__'
+ ..typeKey = '_geocoder_Options__'
+ )),
+ ];
+}
class GeocoderLocationToAddressResponseParams extends bindings.Struct {
@@ -957,10 +1215,64 @@ class GeocoderLocationToAddressResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _geocoder_Geocoder_LocationToAddress_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'GeocoderLocationToAddressResponseParams'
+ ..fullIdentifier = 'mojo.GeocoderLocationToAddressResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Status')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Results')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..nullable = true
+
+ ..elementType = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_geocoder_Result__'
+ ..typeKey = '_geocoder_Result__'
+ )))),
+ ];
+}
+
const int _Geocoder_addressToLocationName = 0;
const int _Geocoder_locationToAddressName = 1;
+mojom_types.MojomInterface _geocoder_Geocoder__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Geocoder'
+ ..fullIdentifier = 'mojo.Geocoder')
+ ..interfaceName = 'Geocoder'
+ ..methods = <int, mojom_types.MojomMethod>{
+_Geocoder_addressToLocationName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AddressToLocation')
+ ..ordinal = _Geocoder_addressToLocationName
+ ..responseParams = _geocoder_Geocoder_AddressToLocation_ResponseParams__()..parameters = _geocoder_Geocoder_AddressToLocation_Params__(),_Geocoder_locationToAddressName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'LocationToAddress')
+ ..ordinal = _Geocoder_locationToAddressName
+ ..responseParams = _geocoder_Geocoder_LocationToAddress_ResponseParams__()..parameters = _geocoder_Geocoder_LocationToAddress_Params__(),
+ };
+}
+
+class _GeocoderServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _geocoder_Geocoder__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class Geocoder {
static const String serviceName = null;
dynamic addressToLocation(String address,Options options,[Function responseFactory = null]);
@@ -983,6 +1295,9 @@ class _GeocoderProxyImpl extends bindings.Proxy {
return new _GeocoderProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _GeocoderServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case _Geocoder_addressToLocationName:
@@ -1228,6 +1543,68 @@ class GeocoderStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _GeocoderServiceDescription();
+}
+
+
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_geocoder_LocationType__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_LocationType__();
+map["_geocoder_Bounds__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Bounds__();
+map["_geocoder_ComponentRestrictions__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_ComponentRestrictions__();
+map["_geocoder_Options__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Options__();
+map["_geocoder_Geometry__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Geometry__();
+map["_geocoder_Result__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Result__();
+map["_geocoder_Status__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Status__();
+map["_geocoder_Geocoder_AddressToLocation_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Geocoder_AddressToLocation_Params__();
+map["_geocoder_Geocoder_AddressToLocation_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Geocoder_AddressToLocation_ResponseParams__();
+map["_geocoder_Geocoder_LocationToAddress_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Geocoder_LocationToAddress_Params__();
+map["_geocoder_Geocoder_LocationToAddress_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _geocoder_Geocoder_LocationToAddress_ResponseParams__();
+map["_geocoder_Geocoder__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _geocoder_Geocoder__();
+location_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
+ map[s] = udt;
+});
+
+ return map;
}
+var _MojomDesc;
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ if (_MojomDesc == null) {
+ _MojomDesc = _initDescriptions();
+ }
+ return _MojomDesc;
+}

Powered by Google App Engine
This is Rietveld 408576698