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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/files/types.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/files/types.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/files/types.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/files/types.mojom.dart
index 31028cbffc74471c73598d20625ae9cc4294e815..ee83625b0b539d0a49f316448a672dd8df6c029c 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/files/types.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/files/types.mojom.dart
@@ -5,9 +5,12 @@
library types_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;
+
const int kOpenFlagRead = 1;
const int kOpenFlagWrite = 2;
const int kOpenFlagCreate = 4;
@@ -17,7 +20,6 @@ const int kOpenFlagTruncate = 32;
const int kDeleteFlagFileOnly = 1;
const int kDeleteFlagDirectoryOnly = 2;
const int kDeleteFlagRecursive = 4;
-
class Error extends bindings.MojoEnum {
static const Error ok = const Error._(0);
static const Error unknown = const Error._(1);
@@ -111,12 +113,48 @@ class Error extends bindings.MojoEnum {
return 'Error.unavailable';
case internal:
return 'Error.internal';
+ default:
+ return null;
}
}
int toJson() => mojoEnumValue;
}
+mojom_types.MojomEnum _types_Error__() {
+ return new mojom_types.MojomEnum()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Error'
+ ..fullIdentifier = 'mojo.files.Error')
+ ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Ok')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 0,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Unknown')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 1,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'InvalidArgument')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 2,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PermissionDenied')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 3,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'OutOfRange')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 4,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Unimplemented')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 5,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Closed')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 6,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Unavailable')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 7,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Internal')
+ ..enumTypeKey = '_types_Error__'
+ ..intValue = 8,];
+}
class Whence extends bindings.MojoEnum {
static const Whence fromCurrent = const Whence._(0);
static const Whence fromStart = const Whence._(1);
@@ -168,12 +206,30 @@ class Whence extends bindings.MojoEnum {
return 'Whence.fromStart';
case fromEnd:
return 'Whence.fromEnd';
+ default:
+ return null;
}
}
int toJson() => mojoEnumValue;
}
+mojom_types.MojomEnum _types_Whence__() {
+ return new mojom_types.MojomEnum()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Whence'
+ ..fullIdentifier = 'mojo.files.Whence')
+ ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FromCurrent')
+ ..enumTypeKey = '_types_Whence__'
+ ..intValue = 0,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FromStart')
+ ..enumTypeKey = '_types_Whence__'
+ ..intValue = 1,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'FromEnd')
+ ..enumTypeKey = '_types_Whence__'
+ ..intValue = 2,];
+}
class FileType extends bindings.MojoEnum {
static const FileType unknown = const FileType._(0);
static const FileType regularFile = const FileType._(1);
@@ -225,12 +281,31 @@ class FileType extends bindings.MojoEnum {
return 'FileType.regularFile';
case directory:
return 'FileType.directory';
+ default:
+ return null;
}
}
int toJson() => mojoEnumValue;
}
+mojom_types.MojomEnum _types_FileType__() {
+ return new mojom_types.MojomEnum()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'FileType'
+ ..fullIdentifier = 'mojo.files.FileType')
+ ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Unknown')
+ ..enumTypeKey = '_types_FileType__'
+ ..intValue = 0,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'RegularFile')
+ ..enumTypeKey = '_types_FileType__'
+ ..intValue = 1,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Directory')
+ ..enumTypeKey = '_types_FileType__'
+ ..intValue = 2,];
+}
+
class Timespec extends bindings.Struct {
@@ -307,6 +382,21 @@ class Timespec extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _types_Timespec__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Timespec'
+ ..fullIdentifier = 'mojo.files.Timespec')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Seconds')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Nanoseconds')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int32),
+ ];
+}
class TimespecOrNow extends bindings.Struct {
@@ -384,6 +474,28 @@ class TimespecOrNow extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _types_TimespecOrNow__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'TimespecOrNow'
+ ..fullIdentifier = 'mojo.files.TimespecOrNow')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Now')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.bool),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Timespec')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_types_Timespec__'
+ ..typeKey = '_types_Timespec__'
+ )),
+ ];
+}
class FileInformation extends bindings.Struct {
@@ -484,6 +596,48 @@ class FileInformation extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _types_FileInformation__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'FileInformation'
+ ..fullIdentifier = 'mojo.files.FileInformation')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Type')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_types_FileType__'
+ ..typeKey = '_types_FileType__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Size')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Atime')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_types_Timespec__'
+ ..typeKey = '_types_Timespec__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Mtime')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_types_Timespec__'
+ ..typeKey = '_types_Timespec__'
+ )),
+ ];
+}
class DirectoryEntry extends bindings.Struct {
@@ -564,5 +718,67 @@ class DirectoryEntry extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _types_DirectoryEntry__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'DirectoryEntry'
+ ..fullIdentifier = 'mojo.files.DirectoryEntry')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Type')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_types_FileType__'
+ ..typeKey = '_types_FileType__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Name')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+ ];
+}
+
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_types_Error__"] =
+ new mojom_types.UserDefinedType()
+ ..enumType = _types_Error__();
+map["_types_Whence__"] =
+ new mojom_types.UserDefinedType()
+ ..enumType = _types_Whence__();
+map["_types_FileType__"] =
+ new mojom_types.UserDefinedType()
+ ..enumType = _types_FileType__();
+map["_types_Timespec__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _types_Timespec__();
+map["_types_TimespecOrNow__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _types_TimespecOrNow__();
+map["_types_FileInformation__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _types_FileInformation__();
+map["_types_DirectoryEntry__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _types_DirectoryEntry__();
+
+ 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