| Index: mojo/dart/packages/mojo_services/lib/mojo/device_info.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/mojo/device_info.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/device_info.mojom.dart
|
| index cc9bdd2ed300cb0436440bc067367dc9bbe32288..a19b444d5a7407cd555116207a7cd4d9d6820080 100644
|
| --- a/mojo/dart/packages/mojo_services/lib/mojo/device_info.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/device_info.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;
|
|
|
|
|
|
|
| @@ -68,6 +70,12 @@ class DeviceInfoGetDeviceTypeParams extends bindings.Struct {
|
| }
|
| }
|
|
|
| +mojom_types.MojomStruct _device_info_DeviceInfo_GetDeviceType_Params__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'DeviceInfoGetDeviceTypeParams')
|
| + ..fields = <mojom_types.StructField>[];
|
| +}
|
| +
|
|
|
| class DeviceInfoGetDeviceTypeResponseParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| @@ -139,6 +147,22 @@ class DeviceInfoGetDeviceTypeResponseParams extends bindings.Struct {
|
| }
|
| }
|
|
|
| +mojom_types.MojomStruct _device_info_DeviceInfo_GetDeviceType_ResponseParams__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'DeviceInfoGetDeviceTypeResponseParams')
|
| + ..fields = <mojom_types.StructField>[
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'DeviceType')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..identifier = '_device_info_DeviceType__'
|
| + ..typeKey = '_device_info_DeviceType__'
|
| + )),
|
| + ];
|
| +}
|
| +
|
| +
|
| const int kDeviceInfo_getDeviceType_name = 0;
|
|
|
| const String DeviceInfoName =
|
| @@ -222,12 +246,67 @@ const String DeviceInfoName =
|
| return 'DeviceInfoDeviceType.DESKTOP';
|
| case TV:
|
| return 'DeviceInfoDeviceType.TV';
|
| + default:
|
| + return null;
|
| }
|
| }
|
|
|
| int toJson() => value;
|
| }
|
|
|
| +mojom_types.MojomEnum _device_info_DeviceType__() {
|
| + return new mojom_types.MojomEnum()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "DeviceInfoDeviceType")
|
| + ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "UNKNOWN")
|
| + ..enumTypeKey = '_device_info_DeviceType__'
|
| + ..intValue = 0,new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "HEADLESS")
|
| + ..enumTypeKey = '_device_info_DeviceType__'
|
| + ..intValue = 1,new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "WATCH")
|
| + ..enumTypeKey = '_device_info_DeviceType__'
|
| + ..intValue = 2,new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "PHONE")
|
| + ..enumTypeKey = '_device_info_DeviceType__'
|
| + ..intValue = 3,new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "TABLET")
|
| + ..enumTypeKey = '_device_info_DeviceType__'
|
| + ..intValue = 4,new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "DESKTOP")
|
| + ..enumTypeKey = '_device_info_DeviceType__'
|
| + ..intValue = 5,new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "TV")
|
| + ..enumTypeKey = '_device_info_DeviceType__'
|
| + ..intValue = 6,];
|
| +}
|
| +
|
| +mojom_types.MojomInterface _device_info_DeviceInfo__() {
|
| + return new mojom_types.MojomInterface()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "DeviceInfo")
|
| + ..interfaceName = "DeviceInfo"
|
| + ..methods = <int, mojom_types.MojomMethod>{
|
| +kDeviceInfo_getDeviceType_name: new mojom_types.MojomMethod()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "GetDeviceType")
|
| + ..ordinal = kDeviceInfo_getDeviceType_name
|
| + ..responseParams = _device_info_DeviceInfo_GetDeviceType_ResponseParams__()..parameters = _device_info_DeviceInfo_GetDeviceType_Params__(),
|
| + };
|
| +}
|
| +
|
| +class _DeviceInfoServiceDescription extends service_describer.ServiceDescription {
|
| + // Avoid infinite loop by overriding serviceDescription field.
|
| + final service_describer.ServiceDescription serviceDescription = null;
|
| +dynamic getTopLevelInterface([Function responseFactory = null]) {
|
| + return _device_info_DeviceInfo__();
|
| + }
|
| + dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
|
| + return getAllMojomTypeDefinitions()[typeKey];
|
| + }
|
| + dynamic getAllTypeDefinitions([Function responseFactory = null]) {
|
| + return getAllMojomTypeDefinitions();
|
| + }
|
| +}
|
| +
|
| abstract class DeviceInfo {
|
| dynamic getDeviceType([Function responseFactory = null]);
|
|
|
| @@ -251,6 +330,9 @@ class DeviceInfoProxyImpl extends bindings.Proxy {
|
|
|
| String get name => DeviceInfoName;
|
|
|
| + service_describer.ServiceDescription get serviceDescription =>
|
| + new _DeviceInfoServiceDescription();
|
| +
|
| void handleResponse(bindings.ServiceMessage message) {
|
| switch (message.header.type) {
|
| case kDeviceInfo_getDeviceType_name:
|
| @@ -436,6 +518,51 @@ class DeviceInfoStub extends bindings.Stub {
|
| }
|
|
|
| int get version => 0;
|
| +
|
| + service_describer.ServiceDescription get serviceDescription =>
|
| + new _DeviceInfoServiceDescription();
|
| +}
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +var _MojomDesc__ = _initDescriptions();
|
| +
|
| +Map<String, mojom_types.UserDefinedType> _initDescriptions() {
|
| + var map = new Map<String, mojom_types.UserDefinedType>();
|
| +
|
| + map["_device_info_DeviceInfo_GetDeviceType_Params__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..structType = _device_info_DeviceInfo_GetDeviceType_Params__();
|
| +
|
| +
|
| +
|
| + map["_device_info_DeviceInfo_GetDeviceType_ResponseParams__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..structType = _device_info_DeviceInfo_GetDeviceType_ResponseParams__();
|
| +
|
| +
|
| + map["_device_info_DeviceType__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..enumType = _device_info_DeviceType__();
|
| +
|
| +
|
| +
|
| +
|
| + map["_device_info_DeviceInfo__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..interfaceType = _device_info_DeviceInfo__();
|
| +
|
| +
|
| + return map;
|
| +}
|
| +
|
| +Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
|
| + return _MojomDesc__;
|
| }
|
|
|
|
|
|
|