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

Unified Diff: mojo/dart/packages/mojo_services/lib/contacts/contacts.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/contacts/contacts.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart b/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart
index 8824f1c74fa5c5926a7d364a0a5f27226243d5a5..a8e61865cc403481e7c42c8673a11e48825f9f76 100644
--- a/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart
@@ -5,9 +5,12 @@
library contacts_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;
@@ -85,6 +88,22 @@ class Contact extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_Contact__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Contact'
+ ..fullIdentifier = 'contacts.Contact')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Id')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Name')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+ ];
+}
class _ContactsServiceGetCountParams extends bindings.Struct {
@@ -152,6 +171,18 @@ class _ContactsServiceGetCountParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetCount_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_ContactsServiceGetCountParams'
+ ..fullIdentifier = 'contacts._ContactsServiceGetCountParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Filter')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+ ];
+}
class ContactsServiceGetCountResponseParams extends bindings.Struct {
@@ -219,6 +250,17 @@ class ContactsServiceGetCountResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetCount_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'ContactsServiceGetCountResponseParams'
+ ..fullIdentifier = 'contacts.ContactsServiceGetCountResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Count')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint64),
+ ];
+}
class _ContactsServiceGetParams extends bindings.Struct {
@@ -304,6 +346,26 @@ class _ContactsServiceGetParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_ContactsService_Get_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_ContactsServiceGetParams'
+ ..fullIdentifier = 'contacts._ContactsServiceGetParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Filter')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Offset')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint32),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Limit')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint32),
+ ];
+}
class ContactsServiceGetResponseParams extends bindings.Struct {
@@ -388,6 +450,23 @@ class ContactsServiceGetResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_ContactsService_Get_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'ContactsServiceGetResponseParams'
+ ..fullIdentifier = 'contacts.ContactsServiceGetResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Contacts')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..elementType = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_contacts_Contact__'
+ ..typeKey = '_contacts_Contact__'
+ )))),
+ ];
+}
class _ContactsServiceGetEmailsParams extends bindings.Struct {
@@ -455,6 +534,17 @@ class _ContactsServiceGetEmailsParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetEmails_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_ContactsServiceGetEmailsParams'
+ ..fullIdentifier = 'contacts._ContactsServiceGetEmailsParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Id')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64),
+ ];
+}
class ContactsServiceGetEmailsResponseParams extends bindings.Struct {
@@ -538,6 +628,19 @@ class ContactsServiceGetEmailsResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetEmails_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'ContactsServiceGetEmailsResponseParams'
+ ..fullIdentifier = 'contacts.ContactsServiceGetEmailsResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Emails')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..elementType = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)))),
+ ];
+}
class _ContactsServiceGetPhotoParams extends bindings.Struct {
@@ -614,6 +717,21 @@ class _ContactsServiceGetPhotoParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetPhoto_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_ContactsServiceGetPhotoParams'
+ ..fullIdentifier = 'contacts._ContactsServiceGetPhotoParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Id')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.int64),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'HighResolution')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.bool),
+ ];
+}
class ContactsServiceGetPhotoResponseParams extends bindings.Struct {
@@ -681,12 +799,60 @@ class ContactsServiceGetPhotoResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetPhoto_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'ContactsServiceGetPhotoResponseParams'
+ ..fullIdentifier = 'contacts.ContactsServiceGetPhotoResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PhotoUrl')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+ ];
+}
+
const int _ContactsService_getCountName = 0;
const int _ContactsService_getName = 1;
const int _ContactsService_getEmailsName = 2;
const int _ContactsService_getPhotoName = 3;
+mojom_types.MojomInterface _contacts_ContactsService__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'ContactsService'
+ ..fullIdentifier = 'contacts.ContactsService')
+ ..interfaceName = 'ContactsService'
+ ..methods = <int, mojom_types.MojomMethod>{
+_ContactsService_getCountName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'GetCount')
+ ..ordinal = _ContactsService_getCountName
+ ..responseParams = _contacts_ContactsService_GetCount_ResponseParams__()..parameters = _contacts_ContactsService_GetCount_Params__(),_ContactsService_getName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Get')
+ ..ordinal = _ContactsService_getName
+ ..responseParams = _contacts_ContactsService_Get_ResponseParams__()..parameters = _contacts_ContactsService_Get_Params__(),_ContactsService_getEmailsName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'GetEmails')
+ ..ordinal = _ContactsService_getEmailsName
+ ..responseParams = _contacts_ContactsService_GetEmails_ResponseParams__()..parameters = _contacts_ContactsService_GetEmails_Params__(),_ContactsService_getPhotoName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'GetPhoto')
+ ..ordinal = _ContactsService_getPhotoName
+ ..responseParams = _contacts_ContactsService_GetPhoto_ResponseParams__()..parameters = _contacts_ContactsService_GetPhoto_Params__(),
+ };
+}
+
+class _ContactsServiceServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _contacts_ContactsService__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class ContactsService {
static const String serviceName = "contacts::ContactsService";
dynamic getCount(String filter,[Function responseFactory = null]);
@@ -711,6 +877,9 @@ class _ContactsServiceProxyImpl extends bindings.Proxy {
return new _ContactsServiceProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ContactsServiceServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case _ContactsService_getCountName:
@@ -1067,6 +1236,59 @@ class ContactsServiceStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ContactsServiceServiceDescription();
}
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_contacts_Contact__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_Contact__();
+map["_contacts_ContactsService_GetCount_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_ContactsService_GetCount_Params__();
+map["_contacts_ContactsService_GetCount_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_ContactsService_GetCount_ResponseParams__();
+map["_contacts_ContactsService_Get_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_ContactsService_Get_Params__();
+map["_contacts_ContactsService_Get_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_ContactsService_Get_ResponseParams__();
+map["_contacts_ContactsService_GetEmails_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_ContactsService_GetEmails_Params__();
+map["_contacts_ContactsService_GetEmails_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_ContactsService_GetEmails_ResponseParams__();
+map["_contacts_ContactsService_GetPhoto_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_ContactsService_GetPhoto_Params__();
+map["_contacts_ContactsService_GetPhoto_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _contacts_ContactsService_GetPhoto_ResponseParams__();
+map["_contacts_ContactsService__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _contacts_ContactsService__();
+
+ 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