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

Unified Diff: mojo/dart/packages/mojo_services/lib/contacts/contacts.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_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 ecab7c1e74463725c02502f88ddc7bdaeee48f7b..362b5a840393dc10088ffba89887792ced182968 100644
--- a/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/contacts/contacts.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;
@@ -86,6 +88,21 @@ class Contact extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_Contact__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -153,6 +170,17 @@ class ContactsServiceGetCountParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetCount_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -220,6 +248,16 @@ class ContactsServiceGetCountResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetCount_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -305,6 +343,25 @@ class ContactsServiceGetParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_ContactsService_Get_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -389,6 +446,22 @@ class ContactsServiceGetResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_ContactsService_Get_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -456,6 +529,16 @@ class ContactsServiceGetEmailsParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetEmails_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -539,6 +622,18 @@ class ContactsServiceGetEmailsResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetEmails_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -615,6 +710,20 @@ class ContactsServiceGetPhotoParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetPhoto_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -682,6 +791,18 @@ class ContactsServiceGetPhotoResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _contacts_ContactsService_GetPhoto_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 kContactsService_getCount_name = 0;
const int kContactsService_get_name = 1;
const int kContactsService_getEmails_name = 2;
@@ -690,6 +811,41 @@ const int kContactsService_getPhoto_name = 3;
const String ContactsServiceName =
'contacts::ContactsService';
+mojom_types.MojomInterface _contacts_ContactsService__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "ContactsService")
+ ..interfaceName = "ContactsService"
+ ..methods = <int, mojom_types.MojomMethod>{
+kContactsService_getCount_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "GetCount")
+ ..ordinal = kContactsService_getCount_name
+ ..responseParams = _contacts_ContactsService_GetCount_ResponseParams__()..parameters = _contacts_ContactsService_GetCount_Params__(),kContactsService_get_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Get")
+ ..ordinal = kContactsService_get_name
+ ..responseParams = _contacts_ContactsService_Get_ResponseParams__()..parameters = _contacts_ContactsService_Get_Params__(),kContactsService_getEmails_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "GetEmails")
+ ..ordinal = kContactsService_getEmails_name
+ ..responseParams = _contacts_ContactsService_GetEmails_ResponseParams__()..parameters = _contacts_ContactsService_GetEmails_Params__(),kContactsService_getPhoto_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "GetPhoto")
+ ..ordinal = kContactsService_getPhoto_name
+ ..responseParams = _contacts_ContactsService_GetPhoto_ResponseParams__()..parameters = _contacts_ContactsService_GetPhoto_Params__(),
+ };
+}
+
+class _ContactsServiceServiceDescription extends service_describer.ServiceDescription {
+ // Avoid infinite loop by overriding serviceDescription field.
+ final service_describer.ServiceDescription serviceDescription = null;
+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 {
dynamic getCount(String filter,[Function responseFactory = null]);
dynamic get(String filter,int offset,int limit,[Function responseFactory = null]);
@@ -716,6 +872,9 @@ class ContactsServiceProxyImpl extends bindings.Proxy {
String get name => ContactsServiceName;
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ContactsServiceServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case kContactsService_getCount_name:
@@ -1073,6 +1232,112 @@ class ContactsServiceStub extends bindings.Stub {
}
int get version => 0;
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ContactsServiceServiceDescription();
+}
+
+
+
+
+
+
+
+
+var _MojomDesc__ = _initDescriptions();
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new Map<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;
+}
+
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ return _MojomDesc__;
}

Powered by Google App Engine
This is Rietveld 408576698