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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.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_services/lib/mojo/media/media_pipe.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart
index 2ec483615d1587d94027303da812d82b0635fe96..45e1d1b5c4882c09a5d7da2aca9e50e9c6c30b9f 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart
@@ -5,9 +5,12 @@
library media_pipe_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_services/mojo/media/media_common.mojom.dart' as media_common_mojom;
@@ -86,6 +89,21 @@ class MediaPacketRegion extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _media_pipe_MediaPacketRegion__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'MediaPacketRegion'
+ ..fullIdentifier = 'mojo.media.MediaPacketRegion')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Offset')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Length')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint64),
+ ];
+}
class MediaPacket extends bindings.Struct {
@@ -210,6 +228,46 @@ class MediaPacket extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _media_pipe_MediaPacket__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'MediaPacket'
+ ..fullIdentifier = 'mojo.media.MediaPacket')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Pts')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Duration')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'EndOfStream')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.bool),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Payload')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_media_pipe_MediaPacketRegion__'
+ ..typeKey = '_media_pipe_MediaPacketRegion__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ExtraPayload')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..nullable = true
+
+ ..elementType = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_media_pipe_MediaPacketRegion__'
+ ..typeKey = '_media_pipe_MediaPacketRegion__'
+ )))),
+ ];
+}
class MediaPipeState extends bindings.Struct {
@@ -285,6 +343,24 @@ class MediaPipeState extends bindings.Struct {
'Object containing handles cannot be encoded to JSON.');
}
}
+mojom_types.MojomStruct _media_pipe_MediaPipeState__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'MediaPipeState'
+ ..fullIdentifier = 'mojo.media.MediaPipeState')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PayloadBuffer')
+ ..type = (new mojom_types.Type()
+..handleType = (new mojom_types.HandleType()
+..kind = mojom_types.HandleTypeKind.sharedBuffer
+..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PayloadBufferLen')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint64),
+ ];
+}
class _MediaPipeGetStateParams extends bindings.Struct {
@@ -343,6 +419,13 @@ class _MediaPipeGetStateParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _media_pipe_MediaPipe_GetState_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_MediaPipeGetStateParams'
+ ..fullIdentifier = 'mojo.media._MediaPipeGetStateParams')
+ ..fields = <mojom_types.StructField>[];
+}
class MediaPipeGetStateResponseParams extends bindings.Struct {
@@ -410,6 +493,22 @@ class MediaPipeGetStateResponseParams extends bindings.Struct {
'Object containing handles cannot be encoded to JSON.');
}
}
+mojom_types.MojomStruct _media_pipe_MediaPipe_GetState_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'MediaPipeGetStateResponseParams'
+ ..fullIdentifier = 'mojo.media.MediaPipeGetStateResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'State')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_media_pipe_MediaPipeState__'
+ ..typeKey = '_media_pipe_MediaPipeState__'
+ )),
+ ];
+}
class _MediaPipeSendPacketParams extends bindings.Struct {
@@ -478,6 +577,22 @@ class _MediaPipeSendPacketParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _media_pipe_MediaPipe_SendPacket_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_MediaPipeSendPacketParams'
+ ..fullIdentifier = 'mojo.media._MediaPipeSendPacketParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Packet')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_media_pipe_MediaPacket__'
+ ..typeKey = '_media_pipe_MediaPacket__'
+ )),
+ ];
+}
class MediaPipeSendPacketResponseParams extends bindings.Struct {
@@ -549,6 +664,22 @@ class MediaPipeSendPacketResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _media_pipe_MediaPipe_SendPacket_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'MediaPipeSendPacketResponseParams'
+ ..fullIdentifier = 'mojo.media.MediaPipeSendPacketResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Result')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_media_common_MediaResult__'
+ ..typeKey = '_media_common_MediaResult__'
+ )),
+ ];
+}
class _MediaPipeFlushParams extends bindings.Struct {
@@ -607,6 +738,13 @@ class _MediaPipeFlushParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _media_pipe_MediaPipe_Flush_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_MediaPipeFlushParams'
+ ..fullIdentifier = 'mojo.media._MediaPipeFlushParams')
+ ..fields = <mojom_types.StructField>[];
+}
class MediaPipeFlushResponseParams extends bindings.Struct {
@@ -678,11 +816,60 @@ class MediaPipeFlushResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _media_pipe_MediaPipe_Flush_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'MediaPipeFlushResponseParams'
+ ..fullIdentifier = 'mojo.media.MediaPipeFlushResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Result')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_media_common_MediaResult__'
+ ..typeKey = '_media_common_MediaResult__'
+ )),
+ ];
+}
+
const int _MediaPipe_getStateName = 0;
const int _MediaPipe_sendPacketName = 1;
const int _MediaPipe_flushName = 2;
+mojom_types.MojomInterface _media_pipe_MediaPipe__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'MediaPipe'
+ ..fullIdentifier = 'mojo.media.MediaPipe')
+ ..interfaceName = 'MediaPipe'
+ ..methods = <int, mojom_types.MojomMethod>{
+_MediaPipe_getStateName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'GetState')
+ ..ordinal = _MediaPipe_getStateName
+ ..responseParams = _media_pipe_MediaPipe_GetState_ResponseParams__()..parameters = _media_pipe_MediaPipe_GetState_Params__(),_MediaPipe_sendPacketName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'SendPacket')
+ ..ordinal = _MediaPipe_sendPacketName
+ ..responseParams = _media_pipe_MediaPipe_SendPacket_ResponseParams__()..parameters = _media_pipe_MediaPipe_SendPacket_Params__(),_MediaPipe_flushName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Flush')
+ ..ordinal = _MediaPipe_flushName
+ ..responseParams = _media_pipe_MediaPipe_Flush_ResponseParams__()..parameters = _media_pipe_MediaPipe_Flush_Params__(),
+ };
+}
+
+class _MediaPipeServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _media_pipe_MediaPipe__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class MediaPipe {
static const String serviceName = null;
dynamic getState([Function responseFactory = null]);
@@ -706,6 +893,9 @@ class _MediaPipeProxyImpl extends bindings.Proxy {
return new _MediaPipeProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _MediaPipeServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case _MediaPipe_getStateName:
@@ -1001,6 +1191,62 @@ class MediaPipeStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _MediaPipeServiceDescription();
+}
+
+
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_media_pipe_MediaPacketRegion__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPacketRegion__();
+map["_media_pipe_MediaPacket__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPacket__();
+map["_media_pipe_MediaPipeState__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPipeState__();
+map["_media_pipe_MediaPipe_GetState_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPipe_GetState_Params__();
+map["_media_pipe_MediaPipe_GetState_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPipe_GetState_ResponseParams__();
+map["_media_pipe_MediaPipe_SendPacket_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPipe_SendPacket_Params__();
+map["_media_pipe_MediaPipe_SendPacket_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPipe_SendPacket_ResponseParams__();
+map["_media_pipe_MediaPipe_Flush_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPipe_Flush_Params__();
+map["_media_pipe_MediaPipe_Flush_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _media_pipe_MediaPipe_Flush_ResponseParams__();
+map["_media_pipe_MediaPipe__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _media_pipe_MediaPipe__();
+media_common_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;
+}

Powered by Google App Engine
This is Rietveld 408576698