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

Unified Diff: mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart

Issue 1433183002: Generate Mojom Types for Dart (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Simplify identifier_store for Go and Dart Created 5 years, 1 month 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/dart_to_cpp/dart_to_cpp.mojom.dart
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart
index c9710958b65807f9e7bddd8fc20a6e47911c1e6a..9e23c102e0bb3203817feae2a65c5ece3fc6480d 100644
--- a/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.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;
@@ -230,6 +232,95 @@ class EchoArgs extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_EchoArgs__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'EchoArgs')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Si64')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.INT64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Si32')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.INT32),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Si16')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.INT16),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Si8')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.INT8),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Ui64')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Ui32')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT32),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Ui16')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT16),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Ui8')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FloatVal')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.FLOAT),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FloatInf')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.FLOAT),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FloatNan')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.FLOAT),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'DoubleVal')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.DOUBLE),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'DoubleInf')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.DOUBLE),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'DoubleNan')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.DOUBLE),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Name')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'StringArray')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..nullable = true
+
+ ..elementType = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)))),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'MessageHandle')
+ ..type = (new mojom_types.Type()
+..handleType = (new mojom_types.HandleType()
+..kind = mojom_types.HandleTypeKind.MESSAGE_PIPE
+..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'DataHandle')
+ ..type = (new mojom_types.Type()
+..handleType = (new mojom_types.HandleType()
+..kind = mojom_types.HandleTypeKind.DATA_PIPE_CONSUMER
+..nullable = true)),
+ ];
+}
+
class EchoArgsList extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -306,6 +397,34 @@ class EchoArgsList extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_EchoArgsList__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'EchoArgsList')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Next')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_dart_to_cpp_EchoArgsList__'
+ ..typeKey = '_dart_to_cpp_EchoArgsList__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Item')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_dart_to_cpp_EchoArgs__'
+ ..typeKey = '_dart_to_cpp_EchoArgs__'
+ )),
+ ];
+}
+
class CppSideStartTestParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -364,6 +483,12 @@ class CppSideStartTestParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_CppSide_StartTest_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CppSideStartTestParams')
+ ..fields = <mojom_types.StructField>[];
+}
+
class CppSideTestFinishedParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -422,6 +547,12 @@ class CppSideTestFinishedParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_CppSide_TestFinished_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CppSideTestFinishedParams')
+ ..fields = <mojom_types.StructField>[];
+}
+
class CppSidePingResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -480,6 +611,12 @@ class CppSidePingResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_CppSide_PingResponse_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CppSidePingResponseParams')
+ ..fields = <mojom_types.StructField>[];
+}
+
class CppSideEchoResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -547,6 +684,21 @@ class CppSideEchoResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_CppSide_EchoResponse_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CppSideEchoResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'List')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_dart_to_cpp_EchoArgsList__'
+ ..typeKey = '_dart_to_cpp_EchoArgsList__'
+ )),
+ ];
+}
+
class DartSideSetClientParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -613,6 +765,21 @@ class DartSideSetClientParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_DartSide_SetClient_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'DartSideSetClientParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CppSide')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_dart_to_cpp_CppSide__'
+ ..typeKey = '_dart_to_cpp_CppSide__'
+ )),
+ ];
+}
+
class DartSidePingParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -671,6 +838,12 @@ class DartSidePingParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_DartSide_Ping_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'DartSidePingParams')
+ ..fields = <mojom_types.StructField>[];
+}
+
class DartSideEchoParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -746,6 +919,26 @@ class DartSideEchoParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _dart_to_cpp_DartSide_Echo_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'DartSideEchoParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'NumIterations')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.INT32),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Arg')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_dart_to_cpp_EchoArgs__'
+ ..typeKey = '_dart_to_cpp_EchoArgs__'
+ )),
+ ];
+}
+
+
const int kCppSide_startTest_name = 88888888;
const int kCppSide_testFinished_name = 99999999;
const int kCppSide_pingResponse_name = 100000000;
@@ -754,6 +947,37 @@ const int kCppSide_echoResponse_name = 100000001;
const String CppSideName =
'dart_to_cpp::CppSide';
+mojom_types.MojomInterface _dart_to_cpp_CppSide__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "CppSide")
+ ..interfaceName = "CppSide"
+ ..methods = <int, mojom_types.MojomMethod>{
+kCppSide_startTest_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "StartTest")
+ ..ordinal = kCppSide_startTest_name..parameters = _dart_to_cpp_CppSide_StartTest_Params__(),kCppSide_testFinished_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "TestFinished")
+ ..ordinal = kCppSide_testFinished_name..parameters = _dart_to_cpp_CppSide_TestFinished_Params__(),kCppSide_pingResponse_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "PingResponse")
+ ..ordinal = kCppSide_pingResponse_name..parameters = _dart_to_cpp_CppSide_PingResponse_Params__(),kCppSide_echoResponse_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "EchoResponse")
+ ..ordinal = kCppSide_echoResponse_name..parameters = _dart_to_cpp_CppSide_EchoResponse_Params__(),
+ };
+}
+
+class _CppSideServiceDescription extends service_describer.ServiceDescription {
+ // Avoid infinite loop by overriding serviceDescription field.
+ final service_describer.ServiceDescription serviceDescription = null;
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _dart_to_cpp_CppSide__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class CppSide {
void startTest();
void testFinished();
@@ -780,6 +1004,9 @@ class CppSideProxyImpl extends bindings.Proxy {
String get name => CppSideName;
+ service_describer.ServiceDescription get serviceDescription =>
+ new _CppSideServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -967,6 +1194,9 @@ class CppSideStub extends bindings.Stub {
}
int get version => 0;
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _CppSideServiceDescription();
}
const int kDartSide_setClient_name = 0;
@@ -976,6 +1206,35 @@ const int kDartSide_echo_name = 2;
const String DartSideName =
'dart_to_cpp::DartSide';
+mojom_types.MojomInterface _dart_to_cpp_DartSide__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "DartSide")
+ ..interfaceName = "DartSide"
+ ..methods = <int, mojom_types.MojomMethod>{
+kDartSide_setClient_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "SetClient")
+ ..ordinal = kDartSide_setClient_name..parameters = _dart_to_cpp_DartSide_SetClient_Params__(),kDartSide_ping_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Ping")
+ ..ordinal = kDartSide_ping_name..parameters = _dart_to_cpp_DartSide_Ping_Params__(),kDartSide_echo_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Echo")
+ ..ordinal = kDartSide_echo_name..parameters = _dart_to_cpp_DartSide_Echo_Params__(),
+ };
+}
+
+class _DartSideServiceDescription extends service_describer.ServiceDescription {
+ // Avoid infinite loop by overriding serviceDescription field.
+ final service_describer.ServiceDescription serviceDescription = null;
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _dart_to_cpp_DartSide__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class DartSide {
void setClient(Object cppSide);
void ping();
@@ -1001,6 +1260,9 @@ class DartSideProxyImpl extends bindings.Proxy {
String get name => DartSideName;
+ service_describer.ServiceDescription get serviceDescription =>
+ new _DartSideServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -1176,6 +1438,139 @@ class DartSideStub extends bindings.Stub {
}
int get version => 0;
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _DartSideServiceDescription();
+}
+
+
+
+
+
+
+
+
+var _MojomDesc__ = _initDescriptions();
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new Map<String, mojom_types.UserDefinedType>();
+
+ map["_dart_to_cpp_EchoArgs__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_EchoArgs__();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_dart_to_cpp_EchoArgsList__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_EchoArgsList__();
+
+
+
+
+
+
+
+ map["_dart_to_cpp_CppSide_StartTest_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_CppSide_StartTest_Params__();
+
+
+
+ map["_dart_to_cpp_CppSide_TestFinished_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_CppSide_TestFinished_Params__();
+
+
+
+ map["_dart_to_cpp_CppSide_PingResponse_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_CppSide_PingResponse_Params__();
+
+
+
+ map["_dart_to_cpp_CppSide_EchoResponse_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_CppSide_EchoResponse_Params__();
+
+
+
+
+
+ map["_dart_to_cpp_DartSide_SetClient_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_DartSide_SetClient_Params__();
+
+
+ map["_dart_to_cpp_CppSide__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _dart_to_cpp_CppSide__();
+
+
+
+
+ map["_dart_to_cpp_DartSide_Ping_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_DartSide_Ping_Params__();
+
+
+
+ map["_dart_to_cpp_DartSide_Echo_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _dart_to_cpp_DartSide_Echo_Params__();
+
+
+
+
+
+
+
+
+ map["_dart_to_cpp_DartSide__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _dart_to_cpp_DartSide__();
+
+ return map;
+}
+
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ return _MojomDesc__;
}

Powered by Google App Engine
This is Rietveld 408576698