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

Unified Diff: mojo/dart/packages/_mojo_for_test_only/lib/math/math_calculator.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_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 0d1358afc7b59a79ebf8c5805b392ac22a2af4cf..9e892ee21bd7dd1e0434e1b1efb5dd83575713d8 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
@@ -5,9 +5,12 @@
library math_calculator_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;
@@ -67,6 +70,13 @@ class _CalculatorClearParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _math_calculator_Calculator_Clear_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_CalculatorClearParams'
+ ..fullIdentifier = 'math._CalculatorClearParams')
+ ..fields = <mojom_types.StructField>[];
+}
class CalculatorClearResponseParams extends bindings.Struct {
@@ -134,6 +144,17 @@ class CalculatorClearResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _math_calculator_Calculator_Clear_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'CalculatorClearResponseParams'
+ ..fullIdentifier = 'math.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 {
@@ -201,6 +222,17 @@ class _CalculatorAddParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _math_calculator_Calculator_Add_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_CalculatorAddParams'
+ ..fullIdentifier = 'math._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 {
@@ -268,6 +300,17 @@ class CalculatorAddResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _math_calculator_Calculator_Add_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'CalculatorAddResponseParams'
+ ..fullIdentifier = 'math.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 {
@@ -335,6 +378,17 @@ class _CalculatorMultiplyParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _math_calculator_Calculator_Multiply_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_CalculatorMultiplyParams'
+ ..fullIdentifier = 'math._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 {
@@ -402,11 +456,55 @@ class CalculatorMultiplyResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _math_calculator_Calculator_Multiply_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'CalculatorMultiplyResponseParams'
+ ..fullIdentifier = 'math.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 _Calculator_clearName = 0;
const int _Calculator_addName = 1;
const int _Calculator_multiplyName = 2;
+mojom_types.MojomInterface _math_calculator_Calculator__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Calculator'
+ ..fullIdentifier = 'math.Calculator')
+ ..interfaceName = 'Calculator'
+ ..methods = <int, mojom_types.MojomMethod>{
+_Calculator_clearName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Clear')
+ ..ordinal = _Calculator_clearName
+ ..responseParams = _math_calculator_Calculator_Clear_ResponseParams__()..parameters = _math_calculator_Calculator_Clear_Params__(),_Calculator_addName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Add')
+ ..ordinal = _Calculator_addName
+ ..responseParams = _math_calculator_Calculator_Add_ResponseParams__()..parameters = _math_calculator_Calculator_Add_Params__(),_Calculator_multiplyName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Multiply')
+ ..ordinal = _Calculator_multiplyName
+ ..responseParams = _math_calculator_Calculator_Multiply_ResponseParams__()..parameters = _math_calculator_Calculator_Multiply_Params__(),
+ };
+}
+
+class _CalculatorServiceDescription implements service_describer.ServiceDescription {
+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 {
static const String serviceName = null;
dynamic clear([Function responseFactory = null]);
@@ -430,6 +528,9 @@ class _CalculatorProxyImpl extends bindings.Proxy {
return new _CalculatorProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _CalculatorServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case _Calculator_clearName:
@@ -726,6 +827,50 @@ class CalculatorStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _CalculatorServiceDescription();
+}
+
+
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<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;
}
+var _MojomDesc;
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ if (_MojomDesc == null) {
+ _MojomDesc = _initDescriptions();
+ }
+ return _MojomDesc;
+}

Powered by Google App Engine
This is Rietveld 408576698