Index: mojo/dart/packages/_mojo_for_test_only/lib/math/math_calculator.mojom.dart |
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/math/math_calculator.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/math/math_calculator.mojom.dart |
index 5ba2c35c865b744a21eab9c07fd7b0c53baeb353..b4948c833f2be29c6cf386689f1d76305618e53d 100644 |
--- a/mojo/dart/packages/_mojo_for_test_only/lib/math/math_calculator.mojom.dart |
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/math/math_calculator.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 CalculatorClearParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _math_calculator_Calculator_Clear_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CalculatorClearParams') |
+ ..fields = <mojom_types.StructField>[]; |
+} |
+ |
class CalculatorClearResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -135,6 +143,16 @@ class CalculatorClearResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _math_calculator_Calculator_Clear_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CalculatorClearResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Value') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.DOUBLE), |
+ ]; |
+} |
+ |
class CalculatorAddParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -202,6 +220,16 @@ class CalculatorAddParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _math_calculator_Calculator_Add_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CalculatorAddParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Value') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.DOUBLE), |
+ ]; |
+} |
+ |
class CalculatorAddResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -269,6 +297,16 @@ class CalculatorAddResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _math_calculator_Calculator_Add_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CalculatorAddResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Value') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.DOUBLE), |
+ ]; |
+} |
+ |
class CalculatorMultiplyParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -336,6 +374,16 @@ class CalculatorMultiplyParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _math_calculator_Calculator_Multiply_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CalculatorMultiplyParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Value') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.DOUBLE), |
+ ]; |
+} |
+ |
class CalculatorMultiplyResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -403,6 +451,17 @@ class CalculatorMultiplyResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _math_calculator_Calculator_Multiply_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CalculatorMultiplyResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Value') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.DOUBLE), |
+ ]; |
+} |
+ |
+ |
const int kCalculator_clear_name = 0; |
const int kCalculator_add_name = 1; |
const int kCalculator_multiply_name = 2; |
@@ -410,6 +469,38 @@ const int kCalculator_multiply_name = 2; |
const String CalculatorName = |
'math::Calculator'; |
+mojom_types.MojomInterface _math_calculator_Calculator__() { |
+ return new mojom_types.MojomInterface() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Calculator") |
+ ..interfaceName = "Calculator" |
+ ..methods = <int, mojom_types.MojomMethod>{ |
+kCalculator_clear_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Clear") |
+ ..ordinal = kCalculator_clear_name |
+ ..responseParams = _math_calculator_Calculator_Clear_ResponseParams__()..parameters = _math_calculator_Calculator_Clear_Params__(),kCalculator_add_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Add") |
+ ..ordinal = kCalculator_add_name |
+ ..responseParams = _math_calculator_Calculator_Add_ResponseParams__()..parameters = _math_calculator_Calculator_Add_Params__(),kCalculator_multiply_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Multiply") |
+ ..ordinal = kCalculator_multiply_name |
+ ..responseParams = _math_calculator_Calculator_Multiply_ResponseParams__()..parameters = _math_calculator_Calculator_Multiply_Params__(), |
+ }; |
+} |
+ |
+class _CalculatorServiceDescription extends service_describer.ServiceDescription { |
+ // Avoid infinite loop by overriding serviceDescription field. |
+ final service_describer.ServiceDescription serviceDescription = null; |
+dynamic getTopLevelInterface([Function responseFactory = null]) { |
+ return _math_calculator_Calculator__(); |
+ } |
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions()[typeKey]; |
+ } |
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions(); |
+ } |
+} |
+ |
abstract class Calculator { |
dynamic clear([Function responseFactory = null]); |
dynamic add(double value,[Function responseFactory = null]); |
@@ -435,6 +526,9 @@ class CalculatorProxyImpl extends bindings.Proxy { |
String get name => CalculatorName; |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _CalculatorServiceDescription(); |
+ |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
case kCalculator_clear_name: |
@@ -732,6 +826,78 @@ class CalculatorStub extends bindings.Stub { |
} |
int get version => 0; |
+ |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _CalculatorServiceDescription(); |
+} |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+var _MojomDesc__ = _initDescriptions(); |
+ |
+Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
+ var map = new Map<String, mojom_types.UserDefinedType>(); |
+ |
+ map["_math_calculator_Calculator_Clear_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _math_calculator_Calculator_Clear_Params__(); |
+ |
+ |
+ |
+ map["_math_calculator_Calculator_Clear_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _math_calculator_Calculator_Clear_ResponseParams__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_math_calculator_Calculator_Add_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _math_calculator_Calculator_Add_Params__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_math_calculator_Calculator_Add_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _math_calculator_Calculator_Add_ResponseParams__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_math_calculator_Calculator_Multiply_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _math_calculator_Calculator_Multiply_Params__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_math_calculator_Calculator_Multiply_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _math_calculator_Calculator_Multiply_ResponseParams__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_math_calculator_Calculator__"] = |
+ new mojom_types.UserDefinedType() |
+ ..interfaceType = _math_calculator_Calculator__(); |
+ |
+ return map; |
+} |
+ |
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
+ return _MojomDesc__; |
} |