Index: mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart |
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart |
index ecbebec64f7f961debe86494cc7bc31d9bfa055d..c05fbd8a0211769780c889d2bd5021387ae7f0d4 100644 |
--- a/mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart |
+++ b/mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart |
@@ -8,6 +8,8 @@ import 'dart:async'; |
import 'package:mojo/bindings.dart' as bindings; |
import 'package:mojo/core.dart' as core; |
+import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types; |
+import 'package:mojo/mojo/service_describer.mojom.dart' as service_describer; |
import 'package:mojo_services/mojo/location.mojom.dart' as location_mojom; |
@@ -82,6 +84,21 @@ class LocationServiceGetNextLocationParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _location_service_LocationService_GetNextLocation_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'LocationServiceGetNextLocationParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Priority') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_location_service_UpdatePriority__' |
+ ..typeKey = '_location_service_UpdatePriority__' |
+ )), |
+ ]; |
+} |
+ |
class LocationServiceGetNextLocationResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -150,6 +167,24 @@ class LocationServiceGetNextLocationResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _location_service_LocationService_GetNextLocation_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'LocationServiceGetNextLocationResponseParams') |
+ ..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() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_location_Location__' |
+ ..typeKey = '_location_Location__' |
+ )), |
+ ]; |
+} |
+ |
+ |
const int kLocationService_getNextLocation_name = 0; |
const String LocationServiceName = |
@@ -212,12 +247,58 @@ const String LocationServiceName = |
return 'LocationServiceUpdatePriority.PRIORITY_LOW_POWER'; |
case PRIORITY_NO_POWER: |
return 'LocationServiceUpdatePriority.PRIORITY_NO_POWER'; |
+ default: |
+ return null; |
} |
} |
int toJson() => value; |
} |
+mojom_types.MojomEnum _location_service_UpdatePriority__() { |
+ return new mojom_types.MojomEnum() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "LocationServiceUpdatePriority") |
+ ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "PRIORITY_BALANCED_POWER_ACCURACY") |
+ ..enumTypeKey = '_location_service_UpdatePriority__' |
+ ..intValue = 0,new mojom_types.EnumValue() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "PRIORITY_HIGH_ACCURACY") |
+ ..enumTypeKey = '_location_service_UpdatePriority__' |
+ ..intValue = 1,new mojom_types.EnumValue() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "PRIORITY_LOW_POWER") |
+ ..enumTypeKey = '_location_service_UpdatePriority__' |
+ ..intValue = 2,new mojom_types.EnumValue() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "PRIORITY_NO_POWER") |
+ ..enumTypeKey = '_location_service_UpdatePriority__' |
+ ..intValue = 3,]; |
+} |
+ |
+mojom_types.MojomInterface _location_service_LocationService__() { |
+ return new mojom_types.MojomInterface() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "LocationService") |
+ ..interfaceName = "LocationService" |
+ ..methods = <int, mojom_types.MojomMethod>{ |
+kLocationService_getNextLocation_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "GetNextLocation") |
+ ..ordinal = kLocationService_getNextLocation_name |
+ ..responseParams = _location_service_LocationService_GetNextLocation_ResponseParams__()..parameters = _location_service_LocationService_GetNextLocation_Params__(), |
+ }; |
+} |
+ |
+class _LocationServiceServiceDescription extends service_describer.ServiceDescription { |
+ // Avoid infinite loop by overriding serviceDescription field. |
+ final service_describer.ServiceDescription serviceDescription = null; |
+dynamic getTopLevelInterface([Function responseFactory = null]) { |
+ return _location_service_LocationService__(); |
+ } |
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions()[typeKey]; |
+ } |
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions(); |
+ } |
+} |
+ |
abstract class LocationService { |
dynamic getNextLocation(LocationServiceUpdatePriority priority,[Function responseFactory = null]); |
@@ -241,6 +322,9 @@ class LocationServiceProxyImpl extends bindings.Proxy { |
String get name => LocationServiceName; |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _LocationServiceServiceDescription(); |
+ |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
case kLocationService_getNextLocation_name: |
@@ -427,6 +511,56 @@ class LocationServiceStub extends bindings.Stub { |
} |
int get version => 0; |
+ |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _LocationServiceServiceDescription(); |
+} |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+var _MojomDesc__ = _initDescriptions(); |
+ |
+Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
+ var map = new Map<String, mojom_types.UserDefinedType>(); |
+ |
+ map["_location_service_LocationService_GetNextLocation_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _location_service_LocationService_GetNextLocation_Params__(); |
+ |
+ |
+ map["_location_service_UpdatePriority__"] = |
+ new mojom_types.UserDefinedType() |
+ ..enumType = _location_service_UpdatePriority__(); |
+ |
+ |
+ |
+ |
+ map["_location_service_LocationService_GetNextLocation_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _location_service_LocationService_GetNextLocation_ResponseParams__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_location_service_LocationService__"] = |
+ new mojom_types.UserDefinedType() |
+ ..interfaceType = _location_service_LocationService__(); |
+ |
+ |
+location_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) { |
+ map[s] = udt; |
+}); |
+ return map; |
+} |
+ |
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
+ return _MojomDesc__; |
} |