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

Side by Side Diff: mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/versioning/versioning_test_client.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 library versioning_test_client_mojom; 5 library versioning_test_client_mojom;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection';
8 9
9 import 'package:mojo/bindings.dart' as bindings; 10 import 'package:mojo/bindings.dart' as bindings;
10 import 'package:mojo/core.dart' as core; 11 import 'package:mojo/core.dart' as core;
12 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
13 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
11 14
12 class Department extends bindings.MojoEnum { 15 class Department extends bindings.MojoEnum {
13 static const Department sales = const Department._(0); 16 static const Department sales = const Department._(0);
14 static const Department dev = const Department._(1); 17 static const Department dev = const Department._(1);
15 18
16 const Department._(int v) : super(v); 19 const Department._(int v) : super(v);
17 20
18 static const Map<String, Department> valuesMap = const { 21 static const Map<String, Department> valuesMap = const {
19 "sales": sales, 22 "sales": sales,
20 "dev": dev, 23 "dev": dev,
(...skipping 25 matching lines...) Expand all
46 } 49 }
47 return result; 50 return result;
48 } 51 }
49 52
50 String toString() { 53 String toString() {
51 switch(this) { 54 switch(this) {
52 case sales: 55 case sales:
53 return 'Department.sales'; 56 return 'Department.sales';
54 case dev: 57 case dev:
55 return 'Department.dev'; 58 return 'Department.dev';
59 default:
60 return null;
56 } 61 }
57 } 62 }
58 63
59 int toJson() => mojoEnumValue; 64 int toJson() => mojoEnumValue;
60 } 65 }
61 66
67 mojom_types.MojomEnum _versioningTestClientDepartment() {
68 return new mojom_types.MojomEnum()
69 ..declData = (new mojom_types.DeclarationData()
70 ..shortName = 'Department'
71 ..fullIdentifier = 'mojo.test.versioning.Department')
72 ..values = <mojom_types.EnumValue>[
73 new mojom_types.EnumValue()
74 ..declData = (new mojom_types.DeclarationData()
75 ..shortName = 'Sales')
76 ..enumTypeKey = 'versioning_test_client_Department__'
77 ..intValue = 0,
78 new mojom_types.EnumValue()
79 ..declData = (new mojom_types.DeclarationData()
80 ..shortName = 'Dev')
81 ..enumTypeKey = 'versioning_test_client_Department__'
82 ..intValue = 1,];
83 }
84
62 85
63 86
64 class Employee extends bindings.Struct { 87 class Employee extends bindings.Struct {
65 static const List<bindings.StructDataHeader> kVersions = const [ 88 static const List<bindings.StructDataHeader> kVersions = const [
66 const bindings.StructDataHeader(32, 0) 89 const bindings.StructDataHeader(32, 0)
67 ]; 90 ];
68 int employeeId = 0; 91 int employeeId = 0;
69 String name = null; 92 String name = null;
70 Department department = null; 93 Department department = null;
71 94
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 165
143 Map toJson() { 166 Map toJson() {
144 Map map = new Map(); 167 Map map = new Map();
145 map["employeeId"] = employeeId; 168 map["employeeId"] = employeeId;
146 map["name"] = name; 169 map["name"] = name;
147 map["department"] = department; 170 map["department"] = department;
148 return map; 171 return map;
149 } 172 }
150 } 173 }
151 174
175 mojom_types.MojomStruct _versioningTestClientEmployee() {
176 return new mojom_types.MojomStruct()
177 ..declData = (new mojom_types.DeclarationData()
178 ..shortName = 'Employee'
179 ..fullIdentifier = 'mojo.test.versioning.Employee')
180 ..fields = <mojom_types.StructField>[
181 new mojom_types.StructField()
182 ..declData = (new mojom_types.DeclarationData()
183 ..shortName = 'EmployeeId')
184 ..type = (new mojom_types.Type()
185 ..simpleType = mojom_types.SimpleType.uint64),
186 new mojom_types.StructField()
187 ..declData = (new mojom_types.DeclarationData()
188 ..shortName = 'Name')
189 ..type = (new mojom_types.Type()
190 ..stringType = (new mojom_types.StringType())),
191 new mojom_types.StructField()
192 ..declData = (new mojom_types.DeclarationData()
193 ..shortName = 'Department')
194 ..type = (new mojom_types.Type()
195 ..typeReference = (new mojom_types.TypeReference()
196 ..identifier = 'versioning_test_client_Department__'
197 ..typeKey = 'versioning_test_client_Department__'
198 )),];
199 }
200
152 201
153 class _HumanResourceDatabaseAddEmployeeParams extends bindings.Struct { 202 class _HumanResourceDatabaseAddEmployeeParams extends bindings.Struct {
154 static const List<bindings.StructDataHeader> kVersions = const [ 203 static const List<bindings.StructDataHeader> kVersions = const [
155 const bindings.StructDataHeader(16, 0) 204 const bindings.StructDataHeader(16, 0)
156 ]; 205 ];
157 Employee employee = null; 206 Employee employee = null;
158 207
159 _HumanResourceDatabaseAddEmployeeParams() : super(kVersions.last.size); 208 _HumanResourceDatabaseAddEmployeeParams() : super(kVersions.last.size);
160 209
161 static _HumanResourceDatabaseAddEmployeeParams deserialize(bindings.Message me ssage) { 210 static _HumanResourceDatabaseAddEmployeeParams deserialize(bindings.Message me ssage) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 "employee: $employee" ")"; 259 "employee: $employee" ")";
211 } 260 }
212 261
213 Map toJson() { 262 Map toJson() {
214 Map map = new Map(); 263 Map map = new Map();
215 map["employee"] = employee; 264 map["employee"] = employee;
216 return map; 265 return map;
217 } 266 }
218 } 267 }
219 268
269 mojom_types.MojomStruct _versioningTestClientHumanResourceDatabaseAddEmployeePar ams() {
270 return new mojom_types.MojomStruct()
271 ..declData = (new mojom_types.DeclarationData()
272 ..shortName = 'HumanResourceDatabaseAddEmployeeParams'
273 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase_AddEmployee _Params')
274 ..fields = <mojom_types.StructField>[
275 new mojom_types.StructField()
276 ..declData = (new mojom_types.DeclarationData()
277 ..shortName = 'Employee')
278 ..type = (new mojom_types.Type()
279 ..typeReference = (new mojom_types.TypeReference()
280 ..identifier = 'versioning_test_client_Employee__'
281 ..typeKey = 'versioning_test_client_Employee__'
282 )),];
283 }
284
220 285
221 class HumanResourceDatabaseAddEmployeeResponseParams extends bindings.Struct { 286 class HumanResourceDatabaseAddEmployeeResponseParams extends bindings.Struct {
222 static const List<bindings.StructDataHeader> kVersions = const [ 287 static const List<bindings.StructDataHeader> kVersions = const [
223 const bindings.StructDataHeader(16, 0) 288 const bindings.StructDataHeader(16, 0)
224 ]; 289 ];
225 bool success = false; 290 bool success = false;
226 291
227 HumanResourceDatabaseAddEmployeeResponseParams() : super(kVersions.last.size); 292 HumanResourceDatabaseAddEmployeeResponseParams() : super(kVersions.last.size);
228 293
229 static HumanResourceDatabaseAddEmployeeResponseParams deserialize(bindings.Mes sage message) { 294 static HumanResourceDatabaseAddEmployeeResponseParams deserialize(bindings.Mes sage message) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 "success: $success" ")"; 342 "success: $success" ")";
278 } 343 }
279 344
280 Map toJson() { 345 Map toJson() {
281 Map map = new Map(); 346 Map map = new Map();
282 map["success"] = success; 347 map["success"] = success;
283 return map; 348 return map;
284 } 349 }
285 } 350 }
286 351
352 mojom_types.MojomStruct _versioningTestClientHumanResourceDatabaseAddEmployeeRes ponseParams() {
353 return new mojom_types.MojomStruct()
354 ..declData = (new mojom_types.DeclarationData()
355 ..shortName = 'HumanResourceDatabaseAddEmployeeResponseParams'
356 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase_AddEmployee _ResponseParams')
357 ..fields = <mojom_types.StructField>[
358 new mojom_types.StructField()
359 ..declData = (new mojom_types.DeclarationData()
360 ..shortName = 'Success')
361 ..type = (new mojom_types.Type()
362 ..simpleType = mojom_types.SimpleType.bool),];
363 }
364
287 365
288 class _HumanResourceDatabaseQueryEmployeeParams extends bindings.Struct { 366 class _HumanResourceDatabaseQueryEmployeeParams extends bindings.Struct {
289 static const List<bindings.StructDataHeader> kVersions = const [ 367 static const List<bindings.StructDataHeader> kVersions = const [
290 const bindings.StructDataHeader(16, 0), 368 const bindings.StructDataHeader(16, 0),
291 const bindings.StructDataHeader(24, 1) 369 const bindings.StructDataHeader(24, 1)
292 ]; 370 ];
293 int id = 0; 371 int id = 0;
294 bool retrieveFingerPrint = false; 372 bool retrieveFingerPrint = false;
295 373
296 _HumanResourceDatabaseQueryEmployeeParams() : super(kVersions.last.size); 374 _HumanResourceDatabaseQueryEmployeeParams() : super(kVersions.last.size);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 432 }
355 433
356 Map toJson() { 434 Map toJson() {
357 Map map = new Map(); 435 Map map = new Map();
358 map["id"] = id; 436 map["id"] = id;
359 map["retrieveFingerPrint"] = retrieveFingerPrint; 437 map["retrieveFingerPrint"] = retrieveFingerPrint;
360 return map; 438 return map;
361 } 439 }
362 } 440 }
363 441
442 mojom_types.MojomStruct _versioningTestClientHumanResourceDatabaseQueryEmployeeP arams() {
443 return new mojom_types.MojomStruct()
444 ..declData = (new mojom_types.DeclarationData()
445 ..shortName = 'HumanResourceDatabaseQueryEmployeeParams'
446 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase_QueryEmploy ee_Params')
447 ..fields = <mojom_types.StructField>[
448 new mojom_types.StructField()
449 ..declData = (new mojom_types.DeclarationData()
450 ..shortName = 'Id')
451 ..type = (new mojom_types.Type()
452 ..simpleType = mojom_types.SimpleType.uint64),
453 new mojom_types.StructField()
454 ..declData = (new mojom_types.DeclarationData()
455 ..shortName = 'RetrieveFingerPrint')
456 ..type = (new mojom_types.Type()
457 ..simpleType = mojom_types.SimpleType.bool),];
458 }
459
364 460
365 class HumanResourceDatabaseQueryEmployeeResponseParams extends bindings.Struct { 461 class HumanResourceDatabaseQueryEmployeeResponseParams extends bindings.Struct {
366 static const List<bindings.StructDataHeader> kVersions = const [ 462 static const List<bindings.StructDataHeader> kVersions = const [
367 const bindings.StructDataHeader(16, 0), 463 const bindings.StructDataHeader(16, 0),
368 const bindings.StructDataHeader(24, 1) 464 const bindings.StructDataHeader(24, 1)
369 ]; 465 ];
370 Employee employee = null; 466 Employee employee = null;
371 List<int> fingerPrint = null; 467 List<int> fingerPrint = null;
372 468
373 HumanResourceDatabaseQueryEmployeeResponseParams() : super(kVersions.last.size ); 469 HumanResourceDatabaseQueryEmployeeResponseParams() : super(kVersions.last.size );
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 } 528 }
433 529
434 Map toJson() { 530 Map toJson() {
435 Map map = new Map(); 531 Map map = new Map();
436 map["employee"] = employee; 532 map["employee"] = employee;
437 map["fingerPrint"] = fingerPrint; 533 map["fingerPrint"] = fingerPrint;
438 return map; 534 return map;
439 } 535 }
440 } 536 }
441 537
538 mojom_types.MojomStruct _versioningTestClientHumanResourceDatabaseQueryEmployeeR esponseParams() {
539 return new mojom_types.MojomStruct()
540 ..declData = (new mojom_types.DeclarationData()
541 ..shortName = 'HumanResourceDatabaseQueryEmployeeResponseParams'
542 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase_QueryEmploy ee_ResponseParams')
543 ..fields = <mojom_types.StructField>[
544 new mojom_types.StructField()
545 ..declData = (new mojom_types.DeclarationData()
546 ..shortName = 'Employee')
547 ..type = (new mojom_types.Type()
548 ..typeReference = (new mojom_types.TypeReference()
549 ..nullable = true
550
551 ..identifier = 'versioning_test_client_Employee__'
552 ..typeKey = 'versioning_test_client_Employee__'
553 )),
554 new mojom_types.StructField()
555 ..declData = (new mojom_types.DeclarationData()
556 ..shortName = 'FingerPrint')
557 ..type = (new mojom_types.Type()
558 ..arrayType = (new mojom_types.ArrayType()
559 ..nullable = true
560 ..elementType = (new mojom_types.Type()
561 ..simpleType = mojom_types.SimpleType.uint8))),];
562 }
563
442 564
443 class _HumanResourceDatabaseAttachFingerPrintParams extends bindings.Struct { 565 class _HumanResourceDatabaseAttachFingerPrintParams extends bindings.Struct {
444 static const List<bindings.StructDataHeader> kVersions = const [ 566 static const List<bindings.StructDataHeader> kVersions = const [
445 const bindings.StructDataHeader(24, 0) 567 const bindings.StructDataHeader(24, 0)
446 ]; 568 ];
447 int id = 0; 569 int id = 0;
448 List<int> fingerPrint = null; 570 List<int> fingerPrint = null;
449 571
450 _HumanResourceDatabaseAttachFingerPrintParams() : super(kVersions.last.size); 572 _HumanResourceDatabaseAttachFingerPrintParams() : super(kVersions.last.size);
451 573
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 } 630 }
509 631
510 Map toJson() { 632 Map toJson() {
511 Map map = new Map(); 633 Map map = new Map();
512 map["id"] = id; 634 map["id"] = id;
513 map["fingerPrint"] = fingerPrint; 635 map["fingerPrint"] = fingerPrint;
514 return map; 636 return map;
515 } 637 }
516 } 638 }
517 639
640 mojom_types.MojomStruct _versioningTestClientHumanResourceDatabaseAttachFingerPr intParams() {
641 return new mojom_types.MojomStruct()
642 ..declData = (new mojom_types.DeclarationData()
643 ..shortName = 'HumanResourceDatabaseAttachFingerPrintParams'
644 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase_AttachFinge rPrint_Params')
645 ..fields = <mojom_types.StructField>[
646 new mojom_types.StructField()
647 ..declData = (new mojom_types.DeclarationData()
648 ..shortName = 'Id')
649 ..type = (new mojom_types.Type()
650 ..simpleType = mojom_types.SimpleType.uint64),
651 new mojom_types.StructField()
652 ..declData = (new mojom_types.DeclarationData()
653 ..shortName = 'FingerPrint')
654 ..type = (new mojom_types.Type()
655 ..arrayType = (new mojom_types.ArrayType()
656 ..elementType = (new mojom_types.Type()
657 ..simpleType = mojom_types.SimpleType.uint8))),];
658 }
659
518 660
519 class HumanResourceDatabaseAttachFingerPrintResponseParams extends bindings.Stru ct { 661 class HumanResourceDatabaseAttachFingerPrintResponseParams extends bindings.Stru ct {
520 static const List<bindings.StructDataHeader> kVersions = const [ 662 static const List<bindings.StructDataHeader> kVersions = const [
521 const bindings.StructDataHeader(16, 0) 663 const bindings.StructDataHeader(16, 0)
522 ]; 664 ];
523 bool success = false; 665 bool success = false;
524 666
525 HumanResourceDatabaseAttachFingerPrintResponseParams() : super(kVersions.last. size); 667 HumanResourceDatabaseAttachFingerPrintResponseParams() : super(kVersions.last. size);
526 668
527 static HumanResourceDatabaseAttachFingerPrintResponseParams deserialize(bindin gs.Message message) { 669 static HumanResourceDatabaseAttachFingerPrintResponseParams deserialize(bindin gs.Message message) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 "success: $success" ")"; 717 "success: $success" ")";
576 } 718 }
577 719
578 Map toJson() { 720 Map toJson() {
579 Map map = new Map(); 721 Map map = new Map();
580 map["success"] = success; 722 map["success"] = success;
581 return map; 723 return map;
582 } 724 }
583 } 725 }
584 726
727 mojom_types.MojomStruct _versioningTestClientHumanResourceDatabaseAttachFingerPr intResponseParams() {
728 return new mojom_types.MojomStruct()
729 ..declData = (new mojom_types.DeclarationData()
730 ..shortName = 'HumanResourceDatabaseAttachFingerPrintResponseParams'
731 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase_AttachFinge rPrint_ResponseParams')
732 ..fields = <mojom_types.StructField>[
733 new mojom_types.StructField()
734 ..declData = (new mojom_types.DeclarationData()
735 ..shortName = 'Success')
736 ..type = (new mojom_types.Type()
737 ..simpleType = mojom_types.SimpleType.bool),];
738 }
739
585 740
586 class _HumanResourceDatabaseListEmployeeIdsParams extends bindings.Struct { 741 class _HumanResourceDatabaseListEmployeeIdsParams extends bindings.Struct {
587 static const List<bindings.StructDataHeader> kVersions = const [ 742 static const List<bindings.StructDataHeader> kVersions = const [
588 const bindings.StructDataHeader(8, 0) 743 const bindings.StructDataHeader(8, 0)
589 ]; 744 ];
590 745
591 _HumanResourceDatabaseListEmployeeIdsParams() : super(kVersions.last.size); 746 _HumanResourceDatabaseListEmployeeIdsParams() : super(kVersions.last.size);
592 747
593 static _HumanResourceDatabaseListEmployeeIdsParams deserialize(bindings.Messag e message) { 748 static _HumanResourceDatabaseListEmployeeIdsParams deserialize(bindings.Messag e message) {
594 var decoder = new bindings.Decoder(message); 749 var decoder = new bindings.Decoder(message);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 String toString() { 788 String toString() {
634 return "_HumanResourceDatabaseListEmployeeIdsParams("")"; 789 return "_HumanResourceDatabaseListEmployeeIdsParams("")";
635 } 790 }
636 791
637 Map toJson() { 792 Map toJson() {
638 Map map = new Map(); 793 Map map = new Map();
639 return map; 794 return map;
640 } 795 }
641 } 796 }
642 797
798 mojom_types.MojomStruct _versioningTestClientHumanResourceDatabaseListEmployeeId sParams() {
799 return new mojom_types.MojomStruct()
800 ..declData = (new mojom_types.DeclarationData()
801 ..shortName = 'HumanResourceDatabaseListEmployeeIdsParams'
802 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase_ListEmploye eIds_Params')
803 ..fields = <mojom_types.StructField>[];
804 }
805
643 806
644 class HumanResourceDatabaseListEmployeeIdsResponseParams extends bindings.Struct { 807 class HumanResourceDatabaseListEmployeeIdsResponseParams extends bindings.Struct {
645 static const List<bindings.StructDataHeader> kVersions = const [ 808 static const List<bindings.StructDataHeader> kVersions = const [
646 const bindings.StructDataHeader(16, 0) 809 const bindings.StructDataHeader(16, 0)
647 ]; 810 ];
648 List<int> ids = null; 811 List<int> ids = null;
649 812
650 HumanResourceDatabaseListEmployeeIdsResponseParams() : super(kVersions.last.si ze); 813 HumanResourceDatabaseListEmployeeIdsResponseParams() : super(kVersions.last.si ze);
651 814
652 static HumanResourceDatabaseListEmployeeIdsResponseParams deserialize(bindings .Message message) { 815 static HumanResourceDatabaseListEmployeeIdsResponseParams deserialize(bindings .Message message) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 "ids: $ids" ")"; 863 "ids: $ids" ")";
701 } 864 }
702 865
703 Map toJson() { 866 Map toJson() {
704 Map map = new Map(); 867 Map map = new Map();
705 map["ids"] = ids; 868 map["ids"] = ids;
706 return map; 869 return map;
707 } 870 }
708 } 871 }
709 872
873 mojom_types.MojomStruct _versioningTestClientHumanResourceDatabaseListEmployeeId sResponseParams() {
874 return new mojom_types.MojomStruct()
875 ..declData = (new mojom_types.DeclarationData()
876 ..shortName = 'HumanResourceDatabaseListEmployeeIdsResponseParams'
877 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase_ListEmploye eIds_ResponseParams')
878 ..fields = <mojom_types.StructField>[
879 new mojom_types.StructField()
880 ..declData = (new mojom_types.DeclarationData()
881 ..shortName = 'Ids')
882 ..type = (new mojom_types.Type()
883 ..arrayType = (new mojom_types.ArrayType()
884 ..nullable = true
885 ..elementType = (new mojom_types.Type()
886 ..simpleType = mojom_types.SimpleType.uint64))),];
887 }
888
889
710 const int _HumanResourceDatabase_addEmployeeName = 0; 890 const int _HumanResourceDatabase_addEmployeeName = 0;
711 const int _HumanResourceDatabase_queryEmployeeName = 1; 891 const int _HumanResourceDatabase_queryEmployeeName = 1;
712 const int _HumanResourceDatabase_attachFingerPrintName = 2; 892 const int _HumanResourceDatabase_attachFingerPrintName = 2;
713 const int _HumanResourceDatabase_listEmployeeIdsName = 3; 893 const int _HumanResourceDatabase_listEmployeeIdsName = 3;
714 894
895 mojom_types.MojomInterface _versioningTestClientHumanResourceDatabase() {
896 return new mojom_types.MojomInterface()
897 ..declData = (new mojom_types.DeclarationData()
898 ..shortName = 'HumanResourceDatabase'
899 ..fullIdentifier = 'mojo.test.versioning.HumanResourceDatabase')
900 ..interfaceName = 'HumanResourceDatabase'
901 ..methods = <int, mojom_types.MojomMethod>{
902 _HumanResourceDatabase_addEmployeeName: new mojom_types.MojomMethod()
903 ..declData = (new mojom_types.DeclarationData()
904 ..shortName = 'AddEmployee')
905 ..ordinal = _HumanResourceDatabase_addEmployeeName
906 ..responseParams = _versioningTestClientHumanResourceDatabaseAddEmployee ResponseParams()
907 ..parameters = _versioningTestClientHumanResourceDatabaseAddEmployeePara ms(),
908 _HumanResourceDatabase_queryEmployeeName: new mojom_types.MojomMethod()
909 ..declData = (new mojom_types.DeclarationData()
910 ..shortName = 'QueryEmployee')
911 ..ordinal = _HumanResourceDatabase_queryEmployeeName
912 ..responseParams = _versioningTestClientHumanResourceDatabaseQueryEmploy eeResponseParams()
913 ..parameters = _versioningTestClientHumanResourceDatabaseQueryEmployeePa rams(),
914 _HumanResourceDatabase_attachFingerPrintName: new mojom_types.MojomMethod( )
915 ..declData = (new mojom_types.DeclarationData()
916 ..shortName = 'AttachFingerPrint')
917 ..ordinal = _HumanResourceDatabase_attachFingerPrintName
918 ..responseParams = _versioningTestClientHumanResourceDatabaseAttachFinge rPrintResponseParams()
919 ..parameters = _versioningTestClientHumanResourceDatabaseAttachFingerPri ntParams(),
920 _HumanResourceDatabase_listEmployeeIdsName: new mojom_types.MojomMethod()
921 ..declData = (new mojom_types.DeclarationData()
922 ..shortName = 'ListEmployeeIds')
923 ..ordinal = _HumanResourceDatabase_listEmployeeIdsName
924 ..responseParams = _versioningTestClientHumanResourceDatabaseListEmploye eIdsResponseParams()
925 ..parameters = _versioningTestClientHumanResourceDatabaseListEmployeeIds Params(),
926 };
927 }
928
929 class _HumanResourceDatabaseServiceDescription implements service_describer.Serv iceDescription {
930 dynamic getTopLevelInterface([Function responseFactory]) =>
931 _versioningTestClientHumanResourceDatabase();
932
933 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
934 getAllMojomTypeDefinitions()[typeKey];
935
936 dynamic getAllTypeDefinitions([Function responseFactory]) =>
937 getAllMojomTypeDefinitions();
938 }
939
715 abstract class HumanResourceDatabase { 940 abstract class HumanResourceDatabase {
716 static const String serviceName = "mojo::test::versioning::HumanResourceDataba se"; 941 static const String serviceName = "mojo::test::versioning::HumanResourceDataba se";
717 dynamic addEmployee(Employee employee,[Function responseFactory = null]); 942 dynamic addEmployee(Employee employee,[Function responseFactory = null]);
718 dynamic queryEmployee(int id,bool retrieveFingerPrint,[Function responseFactor y = null]); 943 dynamic queryEmployee(int id,bool retrieveFingerPrint,[Function responseFactor y = null]);
719 dynamic attachFingerPrint(int id,List<int> fingerPrint,[Function responseFacto ry = null]); 944 dynamic attachFingerPrint(int id,List<int> fingerPrint,[Function responseFacto ry = null]);
720 dynamic listEmployeeIds([Function responseFactory = null]); 945 dynamic listEmployeeIds([Function responseFactory = null]);
721 } 946 }
722 947
723 948
724 class _HumanResourceDatabaseProxyImpl extends bindings.Proxy { 949 class _HumanResourceDatabaseProxyImpl extends bindings.Proxy {
725 _HumanResourceDatabaseProxyImpl.fromEndpoint( 950 _HumanResourceDatabaseProxyImpl.fromEndpoint(
726 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 951 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
727 952
728 _HumanResourceDatabaseProxyImpl.fromHandle(core.MojoHandle handle) : 953 _HumanResourceDatabaseProxyImpl.fromHandle(core.MojoHandle handle) :
729 super.fromHandle(handle); 954 super.fromHandle(handle);
730 955
731 _HumanResourceDatabaseProxyImpl.unbound() : super.unbound(); 956 _HumanResourceDatabaseProxyImpl.unbound() : super.unbound();
732 957
733 static _HumanResourceDatabaseProxyImpl newFromEndpoint( 958 static _HumanResourceDatabaseProxyImpl newFromEndpoint(
734 core.MojoMessagePipeEndpoint endpoint) { 959 core.MojoMessagePipeEndpoint endpoint) {
735 assert(endpoint.setDescription("For _HumanResourceDatabaseProxyImpl")); 960 assert(endpoint.setDescription("For _HumanResourceDatabaseProxyImpl"));
736 return new _HumanResourceDatabaseProxyImpl.fromEndpoint(endpoint); 961 return new _HumanResourceDatabaseProxyImpl.fromEndpoint(endpoint);
737 } 962 }
738 963
964 service_describer.ServiceDescription get serviceDescription =>
965 new _HumanResourceDatabaseServiceDescription();
966
739 void handleResponse(bindings.ServiceMessage message) { 967 void handleResponse(bindings.ServiceMessage message) {
740 switch (message.header.type) { 968 switch (message.header.type) {
741 case _HumanResourceDatabase_addEmployeeName: 969 case _HumanResourceDatabase_addEmployeeName:
742 var r = HumanResourceDatabaseAddEmployeeResponseParams.deserialize( 970 var r = HumanResourceDatabaseAddEmployeeResponseParams.deserialize(
743 message.payload); 971 message.payload);
744 if (!message.header.hasRequestId) { 972 if (!message.header.hasRequestId) {
745 proxyError("Expected a message with a valid request Id."); 973 proxyError("Expected a message with a valid request Id.");
746 return; 974 return;
747 } 975 }
748 Completer c = completerMap[message.header.requestId]; 976 Completer c = completerMap[message.header.requestId];
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 assert(_impl == null); 1312 assert(_impl == null);
1085 _impl = d; 1313 _impl = d;
1086 } 1314 }
1087 1315
1088 String toString() { 1316 String toString() {
1089 var superString = super.toString(); 1317 var superString = super.toString();
1090 return "HumanResourceDatabaseStub($superString)"; 1318 return "HumanResourceDatabaseStub($superString)";
1091 } 1319 }
1092 1320
1093 int get version => 1; 1321 int get version => 1;
1322
1323 service_describer.ServiceDescription get serviceDescription =>
1324 new _HumanResourceDatabaseServiceDescription();
1094 } 1325 }
1095 1326
1096 1327
1328 Map<String, mojom_types.UserDefinedType> _initDescriptions() {
1329 var map = new HashMap<String, mojom_types.UserDefinedType>();
1330 map["versioning_test_client_Department__"] =
1331 new mojom_types.UserDefinedType()
1332 ..enumType = _versioningTestClientDepartment();
1333 map["versioning_test_client_Employee__"] =
1334 new mojom_types.UserDefinedType()
1335 ..structType = _versioningTestClientEmployee();
1336 map["versioning_test_client_HumanResourceDatabase_AddEmployee_Params__"] =
1337 new mojom_types.UserDefinedType()
1338 ..structType = _versioningTestClientHumanResourceDatabaseAddEmployeeParams ();
1339 map["versioning_test_client_HumanResourceDatabase_AddEmployee_ResponseParams__ "] =
1340 new mojom_types.UserDefinedType()
1341 ..structType = _versioningTestClientHumanResourceDatabaseAddEmployeeRespon seParams();
1342 map["versioning_test_client_HumanResourceDatabase_QueryEmployee_Params__"] =
1343 new mojom_types.UserDefinedType()
1344 ..structType = _versioningTestClientHumanResourceDatabaseQueryEmployeePara ms();
1345 map["versioning_test_client_HumanResourceDatabase_QueryEmployee_ResponseParams __"] =
1346 new mojom_types.UserDefinedType()
1347 ..structType = _versioningTestClientHumanResourceDatabaseQueryEmployeeResp onseParams();
1348 map["versioning_test_client_HumanResourceDatabase_AttachFingerPrint_Params__"] =
1349 new mojom_types.UserDefinedType()
1350 ..structType = _versioningTestClientHumanResourceDatabaseAttachFingerPrint Params();
1351 map["versioning_test_client_HumanResourceDatabase_AttachFingerPrint_ResponsePa rams__"] =
1352 new mojom_types.UserDefinedType()
1353 ..structType = _versioningTestClientHumanResourceDatabaseAttachFingerPrint ResponseParams();
1354 map["versioning_test_client_HumanResourceDatabase_ListEmployeeIds_Params__"] =
1355 new mojom_types.UserDefinedType()
1356 ..structType = _versioningTestClientHumanResourceDatabaseListEmployeeIdsPa rams();
1357 map["versioning_test_client_HumanResourceDatabase_ListEmployeeIds_ResponsePara ms__"] =
1358 new mojom_types.UserDefinedType()
1359 ..structType = _versioningTestClientHumanResourceDatabaseListEmployeeIdsRe sponseParams();
1360 map["versioning_test_client_HumanResourceDatabase__"] =
1361 new mojom_types.UserDefinedType()
1362 ..interfaceType = _versioningTestClientHumanResourceDatabase();
1363 return map;
1364 }
1365
1366 var _mojomDesc;
1367 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
1368 if (_mojomDesc == null) {
1369 _mojomDesc = _initDescriptions();
1370 }
1371 return _mojomDesc;
1372 }
1373
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698