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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/nfc/nfc.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 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 nfc_mojom; 5 library nfc_mojom;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:mojo/bindings.dart' as bindings; 9 import 'package:mojo/bindings.dart' as bindings;
10 import 'package:mojo/core.dart' as core; 10 import 'package:mojo/core.dart' as core;
11 import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types;
12 import 'package:mojo/mojo/service_describer.mojom.dart' as service_describer;
11 13
12 14
13 15
14 class NfcData extends bindings.Struct { 16 class NfcData extends bindings.Struct {
15 static const List<bindings.StructDataHeader> kVersions = const [ 17 static const List<bindings.StructDataHeader> kVersions = const [
16 const bindings.StructDataHeader(16, 0) 18 const bindings.StructDataHeader(16, 0)
17 ]; 19 ];
18 List<int> data = null; 20 List<int> data = null;
19 21
20 NfcData() : super(kVersions.last.size); 22 NfcData() : super(kVersions.last.size);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 "data: $data" ")"; 72 "data: $data" ")";
71 } 73 }
72 74
73 Map toJson() { 75 Map toJson() {
74 Map map = new Map(); 76 Map map = new Map();
75 map["data"] = data; 77 map["data"] = data;
76 return map; 78 return map;
77 } 79 }
78 } 80 }
79 81
82 mojom_types.MojomStruct _nfc_NfcData__() {
83 return new mojom_types.MojomStruct()
84 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcData')
85 ..fields = <mojom_types.StructField>[
86 new mojom_types.StructField()
87 ..declData = (new mojom_types.DeclarationData()..shortName = 'Data')
88 ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType ()
89 ..nullable = true
90
91 ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType .UINT8))),
92 ];
93 }
94
80 95
81 class NfcTransmissionCancelParams extends bindings.Struct { 96 class NfcTransmissionCancelParams extends bindings.Struct {
82 static const List<bindings.StructDataHeader> kVersions = const [ 97 static const List<bindings.StructDataHeader> kVersions = const [
83 const bindings.StructDataHeader(8, 0) 98 const bindings.StructDataHeader(8, 0)
84 ]; 99 ];
85 100
86 NfcTransmissionCancelParams() : super(kVersions.last.size); 101 NfcTransmissionCancelParams() : super(kVersions.last.size);
87 102
88 static NfcTransmissionCancelParams deserialize(bindings.Message message) { 103 static NfcTransmissionCancelParams deserialize(bindings.Message message) {
89 var decoder = new bindings.Decoder(message); 104 var decoder = new bindings.Decoder(message);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 String toString() { 143 String toString() {
129 return "NfcTransmissionCancelParams("")"; 144 return "NfcTransmissionCancelParams("")";
130 } 145 }
131 146
132 Map toJson() { 147 Map toJson() {
133 Map map = new Map(); 148 Map map = new Map();
134 return map; 149 return map;
135 } 150 }
136 } 151 }
137 152
153 mojom_types.MojomStruct _nfc_NfcTransmission_Cancel_Params__() {
154 return new mojom_types.MojomStruct()
155 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcTransmissio nCancelParams')
156 ..fields = <mojom_types.StructField>[];
157 }
158
138 159
139 class NfcReceiverOnReceivedNfcDataParams extends bindings.Struct { 160 class NfcReceiverOnReceivedNfcDataParams extends bindings.Struct {
140 static const List<bindings.StructDataHeader> kVersions = const [ 161 static const List<bindings.StructDataHeader> kVersions = const [
141 const bindings.StructDataHeader(16, 0) 162 const bindings.StructDataHeader(16, 0)
142 ]; 163 ];
143 NfcData nfcData = null; 164 NfcData nfcData = null;
144 165
145 NfcReceiverOnReceivedNfcDataParams() : super(kVersions.last.size); 166 NfcReceiverOnReceivedNfcDataParams() : super(kVersions.last.size);
146 167
147 static NfcReceiverOnReceivedNfcDataParams deserialize(bindings.Message message ) { 168 static NfcReceiverOnReceivedNfcDataParams deserialize(bindings.Message message ) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 "nfcData: $nfcData" ")"; 217 "nfcData: $nfcData" ")";
197 } 218 }
198 219
199 Map toJson() { 220 Map toJson() {
200 Map map = new Map(); 221 Map map = new Map();
201 map["nfcData"] = nfcData; 222 map["nfcData"] = nfcData;
202 return map; 223 return map;
203 } 224 }
204 } 225 }
205 226
227 mojom_types.MojomStruct _nfc_NfcReceiver_OnReceivedNfcData_Params__() {
228 return new mojom_types.MojomStruct()
229 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcReceiverOnR eceivedNfcDataParams')
230 ..fields = <mojom_types.StructField>[
231 new mojom_types.StructField()
232 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcData')
233 ..type = (new mojom_types.Type()
234 ..typeReference = (new mojom_types.TypeReference()
235
236 ..identifier = '_nfc_NfcData__'
237 ..typeKey = '_nfc_NfcData__'
238 )),
239 ];
240 }
241
206 242
207 class NfcTransmitOnNextConnectionParams extends bindings.Struct { 243 class NfcTransmitOnNextConnectionParams extends bindings.Struct {
208 static const List<bindings.StructDataHeader> kVersions = const [ 244 static const List<bindings.StructDataHeader> kVersions = const [
209 const bindings.StructDataHeader(24, 0) 245 const bindings.StructDataHeader(24, 0)
210 ]; 246 ];
211 NfcData nfcData = null; 247 NfcData nfcData = null;
212 Object transmission = null; 248 Object transmission = null;
213 249
214 NfcTransmitOnNextConnectionParams() : super(kVersions.last.size); 250 NfcTransmitOnNextConnectionParams() : super(kVersions.last.size);
215 251
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 "nfcData: $nfcData" ", " 307 "nfcData: $nfcData" ", "
272 "transmission: $transmission" ")"; 308 "transmission: $transmission" ")";
273 } 309 }
274 310
275 Map toJson() { 311 Map toJson() {
276 throw new bindings.MojoCodecError( 312 throw new bindings.MojoCodecError(
277 'Object containing handles cannot be encoded to JSON.'); 313 'Object containing handles cannot be encoded to JSON.');
278 } 314 }
279 } 315 }
280 316
317 mojom_types.MojomStruct _nfc_Nfc_TransmitOnNextConnection_Params__() {
318 return new mojom_types.MojomStruct()
319 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcTransmitOnN extConnectionParams')
320 ..fields = <mojom_types.StructField>[
321 new mojom_types.StructField()
322 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcData')
323 ..type = (new mojom_types.Type()
324 ..typeReference = (new mojom_types.TypeReference()
325
326 ..identifier = '_nfc_NfcData__'
327 ..typeKey = '_nfc_NfcData__'
328 )),
329
330 new mojom_types.StructField()
331 ..declData = (new mojom_types.DeclarationData()..shortName = 'Transmissi on')
332 ..type = (new mojom_types.Type()
333 ..typeReference = (new mojom_types.TypeReference()
334 ..nullable = true
335
336
337 ..isInterfaceRequest = true
338 ..identifier = '_nfc_NfcTransmission__'
339 ..typeKey = '_nfc_NfcTransmission__'
340 )),
341 ];
342 }
343
281 344
282 class NfcTransmitOnNextConnectionResponseParams extends bindings.Struct { 345 class NfcTransmitOnNextConnectionResponseParams extends bindings.Struct {
283 static const List<bindings.StructDataHeader> kVersions = const [ 346 static const List<bindings.StructDataHeader> kVersions = const [
284 const bindings.StructDataHeader(16, 0) 347 const bindings.StructDataHeader(16, 0)
285 ]; 348 ];
286 bool success = false; 349 bool success = false;
287 350
288 NfcTransmitOnNextConnectionResponseParams() : super(kVersions.last.size); 351 NfcTransmitOnNextConnectionResponseParams() : super(kVersions.last.size);
289 352
290 static NfcTransmitOnNextConnectionResponseParams deserialize(bindings.Message message) { 353 static NfcTransmitOnNextConnectionResponseParams deserialize(bindings.Message message) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 "success: $success" ")"; 401 "success: $success" ")";
339 } 402 }
340 403
341 Map toJson() { 404 Map toJson() {
342 Map map = new Map(); 405 Map map = new Map();
343 map["success"] = success; 406 map["success"] = success;
344 return map; 407 return map;
345 } 408 }
346 } 409 }
347 410
411 mojom_types.MojomStruct _nfc_Nfc_TransmitOnNextConnection_ResponseParams__() {
412 return new mojom_types.MojomStruct()
413 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcTransmitOnN extConnectionResponseParams')
414 ..fields = <mojom_types.StructField>[
415 new mojom_types.StructField()
416 ..declData = (new mojom_types.DeclarationData()..shortName = 'Success')
417 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.BO OL),
418 ];
419 }
420
348 421
349 class NfcRegisterParams extends bindings.Struct { 422 class NfcRegisterParams extends bindings.Struct {
350 static const List<bindings.StructDataHeader> kVersions = const [ 423 static const List<bindings.StructDataHeader> kVersions = const [
351 const bindings.StructDataHeader(8, 0) 424 const bindings.StructDataHeader(8, 0)
352 ]; 425 ];
353 426
354 NfcRegisterParams() : super(kVersions.last.size); 427 NfcRegisterParams() : super(kVersions.last.size);
355 428
356 static NfcRegisterParams deserialize(bindings.Message message) { 429 static NfcRegisterParams deserialize(bindings.Message message) {
357 var decoder = new bindings.Decoder(message); 430 var decoder = new bindings.Decoder(message);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 String toString() { 469 String toString() {
397 return "NfcRegisterParams("")"; 470 return "NfcRegisterParams("")";
398 } 471 }
399 472
400 Map toJson() { 473 Map toJson() {
401 Map map = new Map(); 474 Map map = new Map();
402 return map; 475 return map;
403 } 476 }
404 } 477 }
405 478
479 mojom_types.MojomStruct _nfc_Nfc_Register_Params__() {
480 return new mojom_types.MojomStruct()
481 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcRegisterPar ams')
482 ..fields = <mojom_types.StructField>[];
483 }
484
406 485
407 class NfcUnregisterParams extends bindings.Struct { 486 class NfcUnregisterParams extends bindings.Struct {
408 static const List<bindings.StructDataHeader> kVersions = const [ 487 static const List<bindings.StructDataHeader> kVersions = const [
409 const bindings.StructDataHeader(8, 0) 488 const bindings.StructDataHeader(8, 0)
410 ]; 489 ];
411 490
412 NfcUnregisterParams() : super(kVersions.last.size); 491 NfcUnregisterParams() : super(kVersions.last.size);
413 492
414 static NfcUnregisterParams deserialize(bindings.Message message) { 493 static NfcUnregisterParams deserialize(bindings.Message message) {
415 var decoder = new bindings.Decoder(message); 494 var decoder = new bindings.Decoder(message);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 String toString() { 533 String toString() {
455 return "NfcUnregisterParams("")"; 534 return "NfcUnregisterParams("")";
456 } 535 }
457 536
458 Map toJson() { 537 Map toJson() {
459 Map map = new Map(); 538 Map map = new Map();
460 return map; 539 return map;
461 } 540 }
462 } 541 }
463 542
543 mojom_types.MojomStruct _nfc_Nfc_Unregister_Params__() {
544 return new mojom_types.MojomStruct()
545 ..declData = (new mojom_types.DeclarationData()..shortName = 'NfcUnregisterP arams')
546 ..fields = <mojom_types.StructField>[];
547 }
548
549
464 const int kNfcTransmission_cancel_name = 0; 550 const int kNfcTransmission_cancel_name = 0;
465 551
466 const String NfcTransmissionName = 552 const String NfcTransmissionName =
467 'nfc::NfcTransmission'; 553 'nfc::NfcTransmission';
468 554
555 mojom_types.MojomInterface _nfc_NfcTransmission__() {
556 return new mojom_types.MojomInterface()
557 ..declData = (new mojom_types.DeclarationData()..shortName = "NfcTransmissio n")
558 ..interfaceName = "NfcTransmission"
559 ..methods = <int, mojom_types.MojomMethod>{
560 kNfcTransmission_cancel_name: new mojom_types.MojomMethod()
561 ..declData = (new mojom_types.DeclarationData()..shortName = "Cancel")
562 ..ordinal = kNfcTransmission_cancel_name..parameters = _nfc_NfcTransmiss ion_Cancel_Params__(),
563 };
564 }
565
566 class _NfcTransmissionServiceDescription extends service_describer.ServiceDescri ption {
567 // Avoid infinite loop by overriding serviceDescription field.
568 final service_describer.ServiceDescription serviceDescription = null;
569 dynamic getTopLevelInterface([Function responseFactory = null]) {
570 return _nfc_NfcTransmission__();
571 }
572 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
573 return getAllMojomTypeDefinitions()[typeKey];
574 }
575 dynamic getAllTypeDefinitions([Function responseFactory = null]) {
576 return getAllMojomTypeDefinitions();
577 }
578 }
579
469 abstract class NfcTransmission { 580 abstract class NfcTransmission {
470 void cancel(); 581 void cancel();
471 582
472 } 583 }
473 584
474 585
475 class NfcTransmissionProxyImpl extends bindings.Proxy { 586 class NfcTransmissionProxyImpl extends bindings.Proxy {
476 NfcTransmissionProxyImpl.fromEndpoint( 587 NfcTransmissionProxyImpl.fromEndpoint(
477 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 588 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
478 589
479 NfcTransmissionProxyImpl.fromHandle(core.MojoHandle handle) : 590 NfcTransmissionProxyImpl.fromHandle(core.MojoHandle handle) :
480 super.fromHandle(handle); 591 super.fromHandle(handle);
481 592
482 NfcTransmissionProxyImpl.unbound() : super.unbound(); 593 NfcTransmissionProxyImpl.unbound() : super.unbound();
483 594
484 static NfcTransmissionProxyImpl newFromEndpoint( 595 static NfcTransmissionProxyImpl newFromEndpoint(
485 core.MojoMessagePipeEndpoint endpoint) { 596 core.MojoMessagePipeEndpoint endpoint) {
486 assert(endpoint.setDescription("For NfcTransmissionProxyImpl")); 597 assert(endpoint.setDescription("For NfcTransmissionProxyImpl"));
487 return new NfcTransmissionProxyImpl.fromEndpoint(endpoint); 598 return new NfcTransmissionProxyImpl.fromEndpoint(endpoint);
488 } 599 }
489 600
490 String get name => NfcTransmissionName; 601 String get name => NfcTransmissionName;
491 602
603 service_describer.ServiceDescription get serviceDescription =>
604 new _NfcTransmissionServiceDescription();
605
492 void handleResponse(bindings.ServiceMessage message) { 606 void handleResponse(bindings.ServiceMessage message) {
493 switch (message.header.type) { 607 switch (message.header.type) {
494 default: 608 default:
495 proxyError("Unexpected message type: ${message.header.type}"); 609 proxyError("Unexpected message type: ${message.header.type}");
496 close(immediate: true); 610 close(immediate: true);
497 break; 611 break;
498 } 612 }
499 } 613 }
500 614
501 String toString() { 615 String toString() {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 assert(_impl == null); 740 assert(_impl == null);
627 _impl = d; 741 _impl = d;
628 } 742 }
629 743
630 String toString() { 744 String toString() {
631 var superString = super.toString(); 745 var superString = super.toString();
632 return "NfcTransmissionStub($superString)"; 746 return "NfcTransmissionStub($superString)";
633 } 747 }
634 748
635 int get version => 0; 749 int get version => 0;
750
751 service_describer.ServiceDescription get serviceDescription =>
752 new _NfcTransmissionServiceDescription();
636 } 753 }
637 754
638 const int kNfcReceiver_onReceivedNfcData_name = 0; 755 const int kNfcReceiver_onReceivedNfcData_name = 0;
639 756
640 const String NfcReceiverName = 757 const String NfcReceiverName =
641 'nfc::NfcReceiver'; 758 'nfc::NfcReceiver';
642 759
760 mojom_types.MojomInterface _nfc_NfcReceiver__() {
761 return new mojom_types.MojomInterface()
762 ..declData = (new mojom_types.DeclarationData()..shortName = "NfcReceiver")
763 ..interfaceName = "NfcReceiver"
764 ..methods = <int, mojom_types.MojomMethod>{
765 kNfcReceiver_onReceivedNfcData_name: new mojom_types.MojomMethod()
766 ..declData = (new mojom_types.DeclarationData()..shortName = "OnReceived NfcData")
767 ..ordinal = kNfcReceiver_onReceivedNfcData_name..parameters = _nfc_NfcRe ceiver_OnReceivedNfcData_Params__(),
768 };
769 }
770
771 class _NfcReceiverServiceDescription extends service_describer.ServiceDescriptio n {
772 // Avoid infinite loop by overriding serviceDescription field.
773 final service_describer.ServiceDescription serviceDescription = null;
774 dynamic getTopLevelInterface([Function responseFactory = null]) {
775 return _nfc_NfcReceiver__();
776 }
777 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
778 return getAllMojomTypeDefinitions()[typeKey];
779 }
780 dynamic getAllTypeDefinitions([Function responseFactory = null]) {
781 return getAllMojomTypeDefinitions();
782 }
783 }
784
643 abstract class NfcReceiver { 785 abstract class NfcReceiver {
644 void onReceivedNfcData(NfcData nfcData); 786 void onReceivedNfcData(NfcData nfcData);
645 787
646 } 788 }
647 789
648 790
649 class NfcReceiverProxyImpl extends bindings.Proxy { 791 class NfcReceiverProxyImpl extends bindings.Proxy {
650 NfcReceiverProxyImpl.fromEndpoint( 792 NfcReceiverProxyImpl.fromEndpoint(
651 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 793 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
652 794
653 NfcReceiverProxyImpl.fromHandle(core.MojoHandle handle) : 795 NfcReceiverProxyImpl.fromHandle(core.MojoHandle handle) :
654 super.fromHandle(handle); 796 super.fromHandle(handle);
655 797
656 NfcReceiverProxyImpl.unbound() : super.unbound(); 798 NfcReceiverProxyImpl.unbound() : super.unbound();
657 799
658 static NfcReceiverProxyImpl newFromEndpoint( 800 static NfcReceiverProxyImpl newFromEndpoint(
659 core.MojoMessagePipeEndpoint endpoint) { 801 core.MojoMessagePipeEndpoint endpoint) {
660 assert(endpoint.setDescription("For NfcReceiverProxyImpl")); 802 assert(endpoint.setDescription("For NfcReceiverProxyImpl"));
661 return new NfcReceiverProxyImpl.fromEndpoint(endpoint); 803 return new NfcReceiverProxyImpl.fromEndpoint(endpoint);
662 } 804 }
663 805
664 String get name => NfcReceiverName; 806 String get name => NfcReceiverName;
665 807
808 service_describer.ServiceDescription get serviceDescription =>
809 new _NfcReceiverServiceDescription();
810
666 void handleResponse(bindings.ServiceMessage message) { 811 void handleResponse(bindings.ServiceMessage message) {
667 switch (message.header.type) { 812 switch (message.header.type) {
668 default: 813 default:
669 proxyError("Unexpected message type: ${message.header.type}"); 814 proxyError("Unexpected message type: ${message.header.type}");
670 close(immediate: true); 815 close(immediate: true);
671 break; 816 break;
672 } 817 }
673 } 818 }
674 819
675 String toString() { 820 String toString() {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 assert(_impl == null); 946 assert(_impl == null);
802 _impl = d; 947 _impl = d;
803 } 948 }
804 949
805 String toString() { 950 String toString() {
806 var superString = super.toString(); 951 var superString = super.toString();
807 return "NfcReceiverStub($superString)"; 952 return "NfcReceiverStub($superString)";
808 } 953 }
809 954
810 int get version => 0; 955 int get version => 0;
956
957 service_describer.ServiceDescription get serviceDescription =>
958 new _NfcReceiverServiceDescription();
811 } 959 }
812 960
813 const int kNfc_transmitOnNextConnection_name = 0; 961 const int kNfc_transmitOnNextConnection_name = 0;
814 const int kNfc_register_name = 1; 962 const int kNfc_register_name = 1;
815 const int kNfc_unregister_name = 2; 963 const int kNfc_unregister_name = 2;
816 964
817 const String NfcName = 965 const String NfcName =
818 'nfc::Nfc'; 966 'nfc::Nfc';
819 967
968 mojom_types.MojomInterface _nfc_Nfc__() {
969 return new mojom_types.MojomInterface()
970 ..declData = (new mojom_types.DeclarationData()..shortName = "Nfc")
971 ..interfaceName = "Nfc"
972 ..methods = <int, mojom_types.MojomMethod>{
973 kNfc_transmitOnNextConnection_name: new mojom_types.MojomMethod()
974 ..declData = (new mojom_types.DeclarationData()..shortName = "TransmitOn NextConnection")
975 ..ordinal = kNfc_transmitOnNextConnection_name
976 ..responseParams = _nfc_Nfc_TransmitOnNextConnection_ResponseParams__(). .parameters = _nfc_Nfc_TransmitOnNextConnection_Params__(),kNfc_register_name: n ew mojom_types.MojomMethod()
977 ..declData = (new mojom_types.DeclarationData()..shortName = "Register")
978 ..ordinal = kNfc_register_name..parameters = _nfc_Nfc_Register_Params__( ),kNfc_unregister_name: new mojom_types.MojomMethod()
979 ..declData = (new mojom_types.DeclarationData()..shortName = "Unregister ")
980 ..ordinal = kNfc_unregister_name..parameters = _nfc_Nfc_Unregister_Param s__(),
981 };
982 }
983
984 class _NfcServiceDescription extends service_describer.ServiceDescription {
985 // Avoid infinite loop by overriding serviceDescription field.
986 final service_describer.ServiceDescription serviceDescription = null;
987 dynamic getTopLevelInterface([Function responseFactory = null]) {
988 return _nfc_Nfc__();
989 }
990 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
991 return getAllMojomTypeDefinitions()[typeKey];
992 }
993 dynamic getAllTypeDefinitions([Function responseFactory = null]) {
994 return getAllMojomTypeDefinitions();
995 }
996 }
997
820 abstract class Nfc { 998 abstract class Nfc {
821 dynamic transmitOnNextConnection(NfcData nfcData,Object transmission,[Function responseFactory = null]); 999 dynamic transmitOnNextConnection(NfcData nfcData,Object transmission,[Function responseFactory = null]);
822 void register(); 1000 void register();
823 void unregister(); 1001 void unregister();
824 1002
825 } 1003 }
826 1004
827 1005
828 class NfcProxyImpl extends bindings.Proxy { 1006 class NfcProxyImpl extends bindings.Proxy {
829 NfcProxyImpl.fromEndpoint( 1007 NfcProxyImpl.fromEndpoint(
830 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 1008 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
831 1009
832 NfcProxyImpl.fromHandle(core.MojoHandle handle) : 1010 NfcProxyImpl.fromHandle(core.MojoHandle handle) :
833 super.fromHandle(handle); 1011 super.fromHandle(handle);
834 1012
835 NfcProxyImpl.unbound() : super.unbound(); 1013 NfcProxyImpl.unbound() : super.unbound();
836 1014
837 static NfcProxyImpl newFromEndpoint( 1015 static NfcProxyImpl newFromEndpoint(
838 core.MojoMessagePipeEndpoint endpoint) { 1016 core.MojoMessagePipeEndpoint endpoint) {
839 assert(endpoint.setDescription("For NfcProxyImpl")); 1017 assert(endpoint.setDescription("For NfcProxyImpl"));
840 return new NfcProxyImpl.fromEndpoint(endpoint); 1018 return new NfcProxyImpl.fromEndpoint(endpoint);
841 } 1019 }
842 1020
843 String get name => NfcName; 1021 String get name => NfcName;
844 1022
1023 service_describer.ServiceDescription get serviceDescription =>
1024 new _NfcServiceDescription();
1025
845 void handleResponse(bindings.ServiceMessage message) { 1026 void handleResponse(bindings.ServiceMessage message) {
846 switch (message.header.type) { 1027 switch (message.header.type) {
847 case kNfc_transmitOnNextConnection_name: 1028 case kNfc_transmitOnNextConnection_name:
848 var r = NfcTransmitOnNextConnectionResponseParams.deserialize( 1029 var r = NfcTransmitOnNextConnectionResponseParams.deserialize(
849 message.payload); 1030 message.payload);
850 if (!message.header.hasRequestId) { 1031 if (!message.header.hasRequestId) {
851 proxyError("Expected a message with a valid request Id."); 1032 proxyError("Expected a message with a valid request Id.");
852 return; 1033 return;
853 } 1034 }
854 Completer c = completerMap[message.header.requestId]; 1035 Completer c = completerMap[message.header.requestId];
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 assert(_impl == null); 1231 assert(_impl == null);
1051 _impl = d; 1232 _impl = d;
1052 } 1233 }
1053 1234
1054 String toString() { 1235 String toString() {
1055 var superString = super.toString(); 1236 var superString = super.toString();
1056 return "NfcStub($superString)"; 1237 return "NfcStub($superString)";
1057 } 1238 }
1058 1239
1059 int get version => 0; 1240 int get version => 0;
1241
1242 service_describer.ServiceDescription get serviceDescription =>
1243 new _NfcServiceDescription();
1060 } 1244 }
1061 1245
1062 1246
1247
1248
1249
1250
1251
1252
1253 var _MojomDesc__ = _initDescriptions();
1254
1255 Map<String, mojom_types.UserDefinedType> _initDescriptions() {
1256 var map = new Map<String, mojom_types.UserDefinedType>();
1257
1258 map["_nfc_NfcData__"] =
1259 new mojom_types.UserDefinedType()
1260 ..structType = _nfc_NfcData__();
1261
1262
1263
1264
1265
1266 map["_nfc_NfcTransmission_Cancel_Params__"] =
1267 new mojom_types.UserDefinedType()
1268 ..structType = _nfc_NfcTransmission_Cancel_Params__();
1269
1270
1271
1272 map["_nfc_NfcReceiver_OnReceivedNfcData_Params__"] =
1273 new mojom_types.UserDefinedType()
1274 ..structType = _nfc_NfcReceiver_OnReceivedNfcData_Params__();
1275
1276
1277
1278
1279
1280 map["_nfc_Nfc_TransmitOnNextConnection_Params__"] =
1281 new mojom_types.UserDefinedType()
1282 ..structType = _nfc_Nfc_TransmitOnNextConnection_Params__();
1283
1284
1285
1286
1287
1288
1289
1290 map["_nfc_Nfc_TransmitOnNextConnection_ResponseParams__"] =
1291 new mojom_types.UserDefinedType()
1292 ..structType = _nfc_Nfc_TransmitOnNextConnection_ResponseParams__();
1293
1294
1295
1296
1297
1298 map["_nfc_Nfc_Register_Params__"] =
1299 new mojom_types.UserDefinedType()
1300 ..structType = _nfc_Nfc_Register_Params__();
1301
1302
1303
1304 map["_nfc_Nfc_Unregister_Params__"] =
1305 new mojom_types.UserDefinedType()
1306 ..structType = _nfc_Nfc_Unregister_Params__();
1307
1308
1309
1310
1311 map["_nfc_NfcReceiver__"] =
1312 new mojom_types.UserDefinedType()
1313 ..interfaceType = _nfc_NfcReceiver__();
1314
1315
1316 map["_nfc_Nfc__"] =
1317 new mojom_types.UserDefinedType()
1318 ..interfaceType = _nfc_Nfc__();
1319
1320 return map;
1321 }
1322
1323 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
1324 return _MojomDesc__;
1325 }
1326
1327
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698