Index: mojo/dart/packages/_mojo_for_test_only/lib/mojo/examples/echo.mojom.dart |
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/examples/echo.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/examples/echo.mojom.dart |
index f456ad6b68b4e740b1e93bb57226df862d846fdb..957baae62a1411a01ab7a26dab1a8bdfc7f4d0cc 100644 |
--- a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/examples/echo.mojom.dart |
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/examples/echo.mojom.dart |
@@ -5,9 +5,12 @@ |
library echo_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; |
@@ -76,6 +79,18 @@ class _EchoEchoStringParams extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _echo_Echo_EchoString_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = '_EchoEchoStringParams' |
+ ..fullIdentifier = 'mojo.examples._EchoEchoStringParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Value') |
+ ..type = (new mojom_types.Type() |
+..stringType = (new mojom_types.StringType()..nullable = true)), |
+ ]; |
+} |
class EchoEchoStringResponseParams extends bindings.Struct { |
@@ -143,9 +158,48 @@ class EchoEchoStringResponseParams extends bindings.Struct { |
return map; |
} |
} |
+mojom_types.MojomStruct _echo_Echo_EchoString_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'EchoEchoStringResponseParams' |
+ ..fullIdentifier = 'mojo.examples.EchoEchoStringResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Value') |
+ ..type = (new mojom_types.Type() |
+..stringType = (new mojom_types.StringType()..nullable = true)), |
+ ]; |
+} |
+ |
const int _Echo_echoStringName = 0; |
+mojom_types.MojomInterface _echo_Echo__() { |
+ return new mojom_types.MojomInterface() |
+ ..declData = (new mojom_types.DeclarationData() |
+ ..shortName = 'Echo' |
+ ..fullIdentifier = 'mojo.examples.Echo') |
+ ..interfaceName = 'Echo' |
+ ..methods = <int, mojom_types.MojomMethod>{ |
+_Echo_echoStringName: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'EchoString') |
+ ..ordinal = _Echo_echoStringName |
+ ..responseParams = _echo_Echo_EchoString_ResponseParams__()..parameters = _echo_Echo_EchoString_Params__(), |
+ }; |
+} |
+ |
+class _EchoServiceDescription implements service_describer.ServiceDescription { |
+dynamic getTopLevelInterface([Function responseFactory = null]) { |
+ return _echo_Echo__(); |
+ } |
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions()[typeKey]; |
+ } |
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions(); |
+ } |
+} |
+ |
abstract class Echo { |
static const String serviceName = "mojo::examples::Echo"; |
dynamic echoString(String value,[Function responseFactory = null]); |
@@ -167,6 +221,9 @@ class _EchoProxyImpl extends bindings.Proxy { |
return new _EchoProxyImpl.fromEndpoint(endpoint); |
} |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _EchoServiceDescription(); |
+ |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
case _Echo_echoStringName: |
@@ -352,6 +409,38 @@ class EchoStub extends bindings.Stub { |
} |
int get version => 0; |
+ |
+ |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _EchoServiceDescription(); |
+} |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
+ var map = new HashMap<String, mojom_types.UserDefinedType>(); |
+map["_echo_Echo_EchoString_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _echo_Echo_EchoString_Params__(); |
+map["_echo_Echo_EchoString_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _echo_Echo_EchoString_ResponseParams__(); |
+map["_echo_Echo__"] = |
+ new mojom_types.UserDefinedType() |
+ ..interfaceType = _echo_Echo__(); |
+ |
+ return map; |
} |
+var _MojomDesc; |
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
+ if (_MojomDesc == null) { |
+ _MojomDesc = _initDescriptions(); |
+ } |
+ return _MojomDesc; |
+} |