Index: mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart |
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart |
index 610d5289904a2d43140d1caba9ade24174435625..c9cb8b60d0d25989486f1709b433d184e71c5f70 100644 |
--- a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart |
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart |
@@ -5,11 +5,13 @@ |
library test_unions_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_for_test_only/mojo/test/test_included_unions.mojom.dart' as test_included_unions_mojom; |
- |
class AnEnum extends bindings.MojoEnum { |
static const AnEnum first = const AnEnum._(0); |
static const AnEnum second = const AnEnum._(1); |
@@ -54,12 +56,28 @@ class AnEnum extends bindings.MojoEnum { |
return 'AnEnum.first'; |
case second: |
return 'AnEnum.second'; |
+ default: |
+ return null; |
} |
} |
int toJson() => mojoEnumValue; |
} |
+mojom_types.MojomEnum _test_unions_AnEnum__() { |
+ return new mojom_types.MojomEnum() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'AnEnum' |
+ ..fullIdentifier = 'mojo.test.AnEnum') |
+ ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'First') |
+ ..enumTypeKey = '_test_unions_AnEnum__' |
+ ..intValue = 0,new mojom_types.EnumValue() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Second') |
+ ..enumTypeKey = '_test_unions_AnEnum__' |
+ ..intValue = 1,]; |
+} |
+ |
class StructOfUnions extends bindings.Struct { |
@@ -290,6 +308,64 @@ class StructOfUnions extends bindings.Struct { |
'Object containing handles cannot be encoded to JSON.'); |
} |
} |
+mojom_types.MojomStruct _test_unions_StructOfUnions__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'StructOfUnions' |
+ ..fullIdentifier = 'mojo.test.StructOfUnions') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'U') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_ObjectUnion__' |
+ ..typeKey = '_test_unions_ObjectUnion__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AOu') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_ObjectUnion__' |
+ ..typeKey = '_test_unions_ObjectUnion__' |
+ )))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AHu') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_HandleUnion__' |
+ ..typeKey = '_test_unions_HandleUnion__' |
+ )))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'MOu') |
+ ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType() |
+ ..keyType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64) |
+ ..valueType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_ObjectUnion__' |
+ ..typeKey = '_test_unions_ObjectUnion__' |
+ )))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'MHu') |
+ ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType() |
+ ..keyType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64) |
+ ..valueType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_HandleUnion__' |
+ ..typeKey = '_test_unions_HandleUnion__' |
+ )))), |
+ ]; |
+} |
class WrapperStruct extends bindings.Struct { |
@@ -372,6 +448,46 @@ class WrapperStruct extends bindings.Struct { |
'Object containing handles cannot be encoded to JSON.'); |
} |
} |
+mojom_types.MojomStruct _test_unions_WrapperStruct__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'WrapperStruct' |
+ ..fullIdentifier = 'mojo.test.WrapperStruct') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ObjectUnion') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_ObjectUnion__' |
+ ..typeKey = '_test_unions_ObjectUnion__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PodUnion') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'HandleUnion') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_HandleUnion__' |
+ ..typeKey = '_test_unions_HandleUnion__' |
+ )), |
+ ]; |
+} |
class DummyStruct extends bindings.Struct { |
@@ -439,6 +555,17 @@ class DummyStruct extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_DummyStruct__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'DummyStruct' |
+ ..fullIdentifier = 'mojo.test.DummyStruct') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt8') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8), |
+ ]; |
+} |
class SmallStruct extends bindings.Struct { |
@@ -736,6 +863,103 @@ class SmallStruct extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_SmallStruct__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'SmallStruct' |
+ ..fullIdentifier = 'mojo.test.SmallStruct') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'DummyStruct') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_DummyStruct__' |
+ ..typeKey = '_test_unions_DummyStruct__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PodUnion') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PodUnionArray') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..nullable = true |
+ |
+ ..elementType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'NullablePodUnionArray') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..nullable = true |
+ |
+ ..elementType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'SArray') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..nullable = true |
+ |
+ ..elementType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_DummyStruct__' |
+ ..typeKey = '_test_unions_DummyStruct__' |
+ )))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PodUnionMap') |
+ ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType() |
+ ..nullable = true |
+ |
+ ..keyType = (new mojom_types.Type() |
+..stringType = (new mojom_types.StringType()..nullable = false)) |
+ ..valueType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'NullablePodUnionMap') |
+ ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType() |
+ ..nullable = true |
+ |
+ ..keyType = (new mojom_types.Type() |
+..stringType = (new mojom_types.StringType()..nullable = false)) |
+ ..valueType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )))), |
+ ]; |
+} |
class SmallStructNonNullableUnion extends bindings.Struct { |
@@ -807,6 +1031,22 @@ class SmallStructNonNullableUnion extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_SmallStructNonNullableUnion__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'SmallStructNonNullableUnion' |
+ ..fullIdentifier = 'mojo.test.SmallStructNonNullableUnion') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PodUnion') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )), |
+ ]; |
+} |
class StructNullObjectUnion extends bindings.Struct { |
@@ -874,6 +1114,24 @@ class StructNullObjectUnion extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_StructNullObjectUnion__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'StructNullObjectUnion' |
+ ..fullIdentifier = 'mojo.test.StructNullObjectUnion') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ObjUnion') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_ObjectOnlyUnion__' |
+ ..typeKey = '_test_unions_ObjectOnlyUnion__' |
+ )), |
+ ]; |
+} |
class SmallObjStruct extends bindings.Struct { |
@@ -954,6 +1212,26 @@ class SmallObjStruct extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_SmallObjStruct__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'SmallObjStruct' |
+ ..fullIdentifier = 'mojo.test.SmallObjStruct') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ObjUnion') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_ObjectUnion__' |
+ ..typeKey = '_test_unions_ObjectUnion__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt8') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8), |
+ ]; |
+} |
class TryNonNullStruct extends bindings.Struct { |
@@ -1032,6 +1310,33 @@ class TryNonNullStruct extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_TryNonNullStruct__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'TryNonNullStruct' |
+ ..fullIdentifier = 'mojo.test.TryNonNullStruct') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Nullable') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_DummyStruct__' |
+ ..typeKey = '_test_unions_DummyStruct__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'NonNullable') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_DummyStruct__' |
+ ..typeKey = '_test_unions_DummyStruct__' |
+ )), |
+ ]; |
+} |
class IncludingStruct extends bindings.Struct { |
@@ -1103,6 +1408,22 @@ class IncludingStruct extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_IncludingStruct__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'IncludingStruct' |
+ ..fullIdentifier = 'mojo.test.IncludingStruct') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'A') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_included_unions_IncludedUnion__' |
+ ..typeKey = '_test_included_unions_IncludedUnion__' |
+ )), |
+ ]; |
+} |
class _SmallCacheSetIntValueParams extends bindings.Struct { |
@@ -1170,6 +1491,17 @@ class _SmallCacheSetIntValueParams extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_SmallCache_SetIntValue_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = '_SmallCacheSetIntValueParams' |
+ ..fullIdentifier = 'mojo.test._SmallCacheSetIntValueParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'IntValue') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64), |
+ ]; |
+} |
class _SmallCacheGetIntValueParams extends bindings.Struct { |
@@ -1228,6 +1560,13 @@ class _SmallCacheGetIntValueParams extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_SmallCache_GetIntValue_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = '_SmallCacheGetIntValueParams' |
+ ..fullIdentifier = 'mojo.test._SmallCacheGetIntValueParams') |
+ ..fields = <mojom_types.StructField>[]; |
+} |
class SmallCacheGetIntValueResponseParams extends bindings.Struct { |
@@ -1295,6 +1634,17 @@ class SmallCacheGetIntValueResponseParams extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_SmallCache_GetIntValue_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'SmallCacheGetIntValueResponseParams' |
+ ..fullIdentifier = 'mojo.test.SmallCacheGetIntValueResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'IntValue') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64), |
+ ]; |
+} |
class _UnionInterfaceEchoParams extends bindings.Struct { |
@@ -1366,6 +1716,22 @@ class _UnionInterfaceEchoParams extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_UnionInterface_Echo_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = '_UnionInterfaceEchoParams' |
+ ..fullIdentifier = 'mojo.test._UnionInterfaceEchoParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'InVal') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )), |
+ ]; |
+} |
class UnionInterfaceEchoResponseParams extends bindings.Struct { |
@@ -1437,6 +1803,22 @@ class UnionInterfaceEchoResponseParams extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _test_unions_UnionInterface_Echo_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'UnionInterfaceEchoResponseParams' |
+ ..fullIdentifier = 'mojo.test.UnionInterfaceEchoResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'OutVal') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )), |
+ ]; |
+} |
@@ -1823,6 +2205,84 @@ class PodUnion extends bindings.Union { |
} |
} |
+mojom_types.MojomUnion _test_unions_PodUnion__() { |
+ return new mojom_types.MojomUnion() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'PodUnion' |
+ ..fullIdentifier = 'mojo.test.PodUnion') |
+ ..fields = <mojom_types.UnionField>[ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt8') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8) |
+ ..tag = 0, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt8Other') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8) |
+ ..tag = 1, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FUint8') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint8) |
+ ..tag = 2, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt16') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int16) |
+ ..tag = 3, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FUint16') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint16) |
+ ..tag = 4, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt32') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int32) |
+ ..tag = 5, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FUint32') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint32) |
+ ..tag = 6, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt64') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64) |
+ ..tag = 7, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FUint64') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint64) |
+ ..tag = 8, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FFloat') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.float) |
+ ..tag = 9, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FDouble') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.double) |
+ ..tag = 10, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FBool') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.bool) |
+ ..tag = 11, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FEnum') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_AnEnum__' |
+ ..typeKey = '_test_unions_AnEnum__' |
+ )) |
+ ..tag = 12, |
+ ]; |
+} |
+ |
enum UnionOfUnionsTag { |
u, |
@@ -2130,6 +2590,70 @@ class UnionOfUnions extends bindings.Union { |
} |
} |
+mojom_types.MojomUnion _test_unions_UnionOfUnions__() { |
+ return new mojom_types.MojomUnion() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'UnionOfUnions' |
+ ..fullIdentifier = 'mojo.test.UnionOfUnions') |
+ ..fields = <mojom_types.UnionField>[ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'U') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_ObjectUnion__' |
+ ..typeKey = '_test_unions_ObjectUnion__' |
+ )) |
+ ..tag = 0, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AOu') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_ObjectUnion__' |
+ ..typeKey = '_test_unions_ObjectUnion__' |
+ )))) |
+ ..tag = 1, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AHu') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_HandleUnion__' |
+ ..typeKey = '_test_unions_HandleUnion__' |
+ )))) |
+ ..tag = 2, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'MOu') |
+ ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType() |
+ ..keyType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64) |
+ ..valueType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_ObjectUnion__' |
+ ..typeKey = '_test_unions_ObjectUnion__' |
+ )))) |
+ ..tag = 3, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'MHu') |
+ ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType() |
+ ..keyType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64) |
+ ..valueType = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_HandleUnion__' |
+ ..typeKey = '_test_unions_HandleUnion__' |
+ )))) |
+ ..tag = 4, |
+ ]; |
+} |
+ |
enum ObjectUnionTag { |
fInt8, |
@@ -2401,6 +2925,71 @@ class ObjectUnion extends bindings.Union { |
} |
} |
+mojom_types.MojomUnion _test_unions_ObjectUnion__() { |
+ return new mojom_types.MojomUnion() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'ObjectUnion' |
+ ..fullIdentifier = 'mojo.test.ObjectUnion') |
+ ..fields = <mojom_types.UnionField>[ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt8') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8) |
+ ..tag = 0, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FString') |
+ ..type = (new mojom_types.Type() |
+..stringType = (new mojom_types.StringType()..nullable = false)) |
+ ..tag = 1, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FDummy') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_DummyStruct__' |
+ ..typeKey = '_test_unions_DummyStruct__' |
+ )) |
+ ..tag = 2, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FNullable') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_test_unions_DummyStruct__' |
+ ..typeKey = '_test_unions_DummyStruct__' |
+ )) |
+ ..tag = 3, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FArrayInt8') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8))) |
+ ..tag = 4, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FMapInt8') |
+ ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType() |
+ ..keyType = (new mojom_types.Type() |
+..stringType = (new mojom_types.StringType()..nullable = false)) |
+ ..valueType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8))) |
+ ..tag = 5, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FPodUnion') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_PodUnion__' |
+ ..typeKey = '_test_unions_PodUnion__' |
+ )) |
+ ..tag = 6, |
+ ]; |
+} |
+ |
enum HandleUnionTag { |
fHandle, |
@@ -2606,6 +3195,64 @@ class HandleUnion extends bindings.Union { |
} |
} |
+mojom_types.MojomUnion _test_unions_HandleUnion__() { |
+ return new mojom_types.MojomUnion() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'HandleUnion' |
+ ..fullIdentifier = 'mojo.test.HandleUnion') |
+ ..fields = <mojom_types.UnionField>[ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FHandle') |
+ ..type = (new mojom_types.Type() |
+..handleType = (new mojom_types.HandleType() |
+..kind = mojom_types.HandleTypeKind.unspecified |
+..nullable = false)) |
+ ..tag = 0, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FMessagePipe') |
+ ..type = (new mojom_types.Type() |
+..handleType = (new mojom_types.HandleType() |
+..kind = mojom_types.HandleTypeKind.messagePipe |
+..nullable = false)) |
+ ..tag = 1, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FDataPipeConsumer') |
+ ..type = (new mojom_types.Type() |
+..handleType = (new mojom_types.HandleType() |
+..kind = mojom_types.HandleTypeKind.dataPipeConsumer |
+..nullable = false)) |
+ ..tag = 2, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FDataPipeProducer') |
+ ..type = (new mojom_types.Type() |
+..handleType = (new mojom_types.HandleType() |
+..kind = mojom_types.HandleTypeKind.dataPipeProducer |
+..nullable = false)) |
+ ..tag = 3, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FSharedBuffer') |
+ ..type = (new mojom_types.Type() |
+..handleType = (new mojom_types.HandleType() |
+..kind = mojom_types.HandleTypeKind.sharedBuffer |
+..nullable = false)) |
+ ..tag = 4, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FSmallCache') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_SmallCache__' |
+ ..typeKey = '_test_unions_SmallCache__' |
+ )) |
+ ..tag = 5, |
+ ]; |
+} |
+ |
enum ObjectOnlyUnionTag { |
dummy1, |
@@ -2687,6 +3334,24 @@ class ObjectOnlyUnion extends bindings.Union { |
} |
} |
+mojom_types.MojomUnion _test_unions_ObjectOnlyUnion__() { |
+ return new mojom_types.MojomUnion() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'ObjectOnlyUnion' |
+ ..fullIdentifier = 'mojo.test.ObjectOnlyUnion') |
+ ..fields = <mojom_types.UnionField>[ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Dummy1') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_test_unions_DummyStruct__' |
+ ..typeKey = '_test_unions_DummyStruct__' |
+ )) |
+ ..tag = 0, |
+ ]; |
+} |
+ |
enum OldUnionTag { |
fInt8, |
@@ -2767,6 +3432,19 @@ class OldUnion extends bindings.Union { |
} |
} |
+mojom_types.MojomUnion _test_unions_OldUnion__() { |
+ return new mojom_types.MojomUnion() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'OldUnion' |
+ ..fullIdentifier = 'mojo.test.OldUnion') |
+ ..fields = <mojom_types.UnionField>[ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt8') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8) |
+ ..tag = 0, |
+ ]; |
+} |
+ |
enum NewUnionTag { |
fInt8, |
@@ -2871,9 +3549,56 @@ class NewUnion extends bindings.Union { |
return result; |
} |
} |
+ |
+mojom_types.MojomUnion _test_unions_NewUnion__() { |
+ return new mojom_types.MojomUnion() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'NewUnion' |
+ ..fullIdentifier = 'mojo.test.NewUnion') |
+ ..fields = <mojom_types.UnionField>[ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt8') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int8) |
+ ..tag = 0, |
+ |
+ new mojom_types.UnionField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FInt16') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int16) |
+ ..tag = 1, |
+ ]; |
+} |
+ |
const int _SmallCache_setIntValueName = 0; |
const int _SmallCache_getIntValueName = 1; |
+mojom_types.MojomInterface _test_unions_SmallCache__() { |
+ return new mojom_types.MojomInterface() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'SmallCache' |
+ ..fullIdentifier = 'mojo.test.SmallCache') |
+ ..interfaceName = 'SmallCache' |
+ ..methods = <int, mojom_types.MojomMethod>{ |
+_SmallCache_setIntValueName: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'SetIntValue') |
+ ..ordinal = _SmallCache_setIntValueName..parameters = _test_unions_SmallCache_SetIntValue_Params__(),_SmallCache_getIntValueName: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'GetIntValue') |
+ ..ordinal = _SmallCache_getIntValueName |
+ ..responseParams = _test_unions_SmallCache_GetIntValue_ResponseParams__()..parameters = _test_unions_SmallCache_GetIntValue_Params__(), |
+ }; |
+} |
+ |
+class _SmallCacheServiceDescription implements service_describer.ServiceDescription { |
+dynamic getTopLevelInterface([Function responseFactory = null]) { |
+ return _test_unions_SmallCache__(); |
+ } |
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions()[typeKey]; |
+ } |
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions(); |
+ } |
+} |
+ |
abstract class SmallCache { |
static const String serviceName = null; |
void setIntValue(int intValue); |
@@ -2896,6 +3621,9 @@ class _SmallCacheProxyImpl extends bindings.Proxy { |
return new _SmallCacheProxyImpl.fromEndpoint(endpoint); |
} |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _SmallCacheServiceDescription(); |
+ |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
case _SmallCache_getIntValueName: |
@@ -3094,10 +3822,40 @@ class SmallCacheStub extends bindings.Stub { |
} |
int get version => 0; |
+ |
+ |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _SmallCacheServiceDescription(); |
} |
const int _UnionInterface_echoName = 0; |
+mojom_types.MojomInterface _test_unions_UnionInterface__() { |
+ return new mojom_types.MojomInterface() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'UnionInterface' |
+ ..fullIdentifier = 'mojo.test.UnionInterface') |
+ ..interfaceName = 'UnionInterface' |
+ ..methods = <int, mojom_types.MojomMethod>{ |
+_UnionInterface_echoName: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Echo') |
+ ..ordinal = _UnionInterface_echoName |
+ ..responseParams = _test_unions_UnionInterface_Echo_ResponseParams__()..parameters = _test_unions_UnionInterface_Echo_Params__(), |
+ }; |
+} |
+ |
+class _UnionInterfaceServiceDescription implements service_describer.ServiceDescription { |
+dynamic getTopLevelInterface([Function responseFactory = null]) { |
+ return _test_unions_UnionInterface__(); |
+ } |
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions()[typeKey]; |
+ } |
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions(); |
+ } |
+} |
+ |
abstract class UnionInterface { |
static const String serviceName = null; |
dynamic echo(PodUnion inVal,[Function responseFactory = null]); |
@@ -3119,6 +3877,9 @@ class _UnionInterfaceProxyImpl extends bindings.Proxy { |
return new _UnionInterfaceProxyImpl.fromEndpoint(endpoint); |
} |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _UnionInterfaceServiceDescription(); |
+ |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
case _UnionInterface_echoName: |
@@ -3304,6 +4065,104 @@ class UnionInterfaceStub extends bindings.Stub { |
} |
int get version => 0; |
+ |
+ |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _UnionInterfaceServiceDescription(); |
} |
+ |
+ |
+ |
+ |
+ |
+Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
+ var map = new HashMap<String, mojom_types.UserDefinedType>(); |
+map["_test_unions_AnEnum__"] = |
+ new mojom_types.UserDefinedType() |
+ ..enumType = _test_unions_AnEnum__(); |
+map["_test_unions_StructOfUnions__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_StructOfUnions__(); |
+map["_test_unions_WrapperStruct__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_WrapperStruct__(); |
+map["_test_unions_DummyStruct__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_DummyStruct__(); |
+map["_test_unions_SmallStruct__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_SmallStruct__(); |
+map["_test_unions_SmallStructNonNullableUnion__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_SmallStructNonNullableUnion__(); |
+map["_test_unions_StructNullObjectUnion__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_StructNullObjectUnion__(); |
+map["_test_unions_SmallObjStruct__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_SmallObjStruct__(); |
+map["_test_unions_TryNonNullStruct__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_TryNonNullStruct__(); |
+map["_test_unions_IncludingStruct__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_IncludingStruct__(); |
+map["_test_unions_SmallCache_SetIntValue_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_SmallCache_SetIntValue_Params__(); |
+map["_test_unions_SmallCache_GetIntValue_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_SmallCache_GetIntValue_Params__(); |
+map["_test_unions_SmallCache_GetIntValue_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_SmallCache_GetIntValue_ResponseParams__(); |
+map["_test_unions_UnionInterface_Echo_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_UnionInterface_Echo_Params__(); |
+map["_test_unions_UnionInterface_Echo_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _test_unions_UnionInterface_Echo_ResponseParams__(); |
+map["_test_unions_PodUnion__"] = |
+ new mojom_types.UserDefinedType() |
+ ..unionType = _test_unions_PodUnion__(); |
+map["_test_unions_UnionOfUnions__"] = |
+ new mojom_types.UserDefinedType() |
+ ..unionType = _test_unions_UnionOfUnions__(); |
+map["_test_unions_ObjectUnion__"] = |
+ new mojom_types.UserDefinedType() |
+ ..unionType = _test_unions_ObjectUnion__(); |
+map["_test_unions_HandleUnion__"] = |
+ new mojom_types.UserDefinedType() |
+ ..unionType = _test_unions_HandleUnion__(); |
+map["_test_unions_ObjectOnlyUnion__"] = |
+ new mojom_types.UserDefinedType() |
+ ..unionType = _test_unions_ObjectOnlyUnion__(); |
+map["_test_unions_OldUnion__"] = |
+ new mojom_types.UserDefinedType() |
+ ..unionType = _test_unions_OldUnion__(); |
+map["_test_unions_NewUnion__"] = |
+ new mojom_types.UserDefinedType() |
+ ..unionType = _test_unions_NewUnion__(); |
+map["_test_unions_SmallCache__"] = |
+ new mojom_types.UserDefinedType() |
+ ..interfaceType = _test_unions_SmallCache__(); |
+map["_test_unions_UnionInterface__"] = |
+ new mojom_types.UserDefinedType() |
+ ..interfaceType = _test_unions_UnionInterface__(); |
+test_included_unions_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; |
+} |
+ |