OLD | NEW |
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 http_connection_mojom; | 5 library http_connection_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 import 'package:mojo/mojo/network_error.mojom.dart' as network_error_mojom; | 14 import 'package:mojo/mojo/network_error.mojom.dart' as network_error_mojom; |
12 import 'package:mojo_services/mojo/http_message.mojom.dart' as http_message_mojo
m; | 15 import 'package:mojo_services/mojo/http_message.mojom.dart' as http_message_mojo
m; |
13 import 'package:mojo_services/mojo/web_socket.mojom.dart' as web_socket_mojom; | 16 import 'package:mojo_services/mojo/web_socket.mojom.dart' as web_socket_mojom; |
14 | 17 |
15 | 18 |
16 | 19 |
17 class _HttpConnectionSetSendBufferSizeParams extends bindings.Struct { | 20 class _HttpConnectionSetSendBufferSizeParams extends bindings.Struct { |
18 static const List<bindings.StructDataHeader> kVersions = const [ | 21 static const List<bindings.StructDataHeader> kVersions = const [ |
19 const bindings.StructDataHeader(16, 0) | 22 const bindings.StructDataHeader(16, 0) |
20 ]; | 23 ]; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return "_HttpConnectionSetSendBufferSizeParams(" | 75 return "_HttpConnectionSetSendBufferSizeParams(" |
73 "size: $size" ")"; | 76 "size: $size" ")"; |
74 } | 77 } |
75 | 78 |
76 Map toJson() { | 79 Map toJson() { |
77 Map map = new Map(); | 80 Map map = new Map(); |
78 map["size"] = size; | 81 map["size"] = size; |
79 return map; | 82 return map; |
80 } | 83 } |
81 } | 84 } |
| 85 mojom_types.MojomStruct _http_connection_HttpConnection_SetSendBufferSize_Params
__() { |
| 86 return new mojom_types.MojomStruct() |
| 87 ..declData = (new mojom_types.DeclarationData() |
| 88 ..shortName = '_HttpConnectionSetSendBufferSizeParams' |
| 89 ..fullIdentifier = 'mojo._HttpConnectionSetSendBufferSizeParams') |
| 90 ..fields = <mojom_types.StructField>[ |
| 91 new mojom_types.StructField() |
| 92 ..declData = (new mojom_types.DeclarationData()..shortName = 'Size') |
| 93 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.ui
nt32), |
| 94 ]; |
| 95 } |
82 | 96 |
83 | 97 |
84 class HttpConnectionSetSendBufferSizeResponseParams extends bindings.Struct { | 98 class HttpConnectionSetSendBufferSizeResponseParams extends bindings.Struct { |
85 static const List<bindings.StructDataHeader> kVersions = const [ | 99 static const List<bindings.StructDataHeader> kVersions = const [ |
86 const bindings.StructDataHeader(16, 0) | 100 const bindings.StructDataHeader(16, 0) |
87 ]; | 101 ]; |
88 network_error_mojom.NetworkError result = null; | 102 network_error_mojom.NetworkError result = null; |
89 | 103 |
90 HttpConnectionSetSendBufferSizeResponseParams() : super(kVersions.last.size); | 104 HttpConnectionSetSendBufferSizeResponseParams() : super(kVersions.last.size); |
91 | 105 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 return "HttpConnectionSetSendBufferSizeResponseParams(" | 154 return "HttpConnectionSetSendBufferSizeResponseParams(" |
141 "result: $result" ")"; | 155 "result: $result" ")"; |
142 } | 156 } |
143 | 157 |
144 Map toJson() { | 158 Map toJson() { |
145 Map map = new Map(); | 159 Map map = new Map(); |
146 map["result"] = result; | 160 map["result"] = result; |
147 return map; | 161 return map; |
148 } | 162 } |
149 } | 163 } |
| 164 mojom_types.MojomStruct _http_connection_HttpConnection_SetSendBufferSize_Respon
seParams__() { |
| 165 return new mojom_types.MojomStruct() |
| 166 ..declData = (new mojom_types.DeclarationData() |
| 167 ..shortName = 'HttpConnectionSetSendBufferSizeResponseParams' |
| 168 ..fullIdentifier = 'mojo.HttpConnectionSetSendBufferSizeResponseParams') |
| 169 ..fields = <mojom_types.StructField>[ |
| 170 new mojom_types.StructField() |
| 171 ..declData = (new mojom_types.DeclarationData()..shortName = 'Result') |
| 172 ..type = (new mojom_types.Type() |
| 173 ..typeReference = (new mojom_types.TypeReference() |
| 174 |
| 175 ..identifier = '_network_error_NetworkError__' |
| 176 ..typeKey = '_network_error_NetworkError__' |
| 177 )), |
| 178 ]; |
| 179 } |
150 | 180 |
151 | 181 |
152 class _HttpConnectionSetReceiveBufferSizeParams extends bindings.Struct { | 182 class _HttpConnectionSetReceiveBufferSizeParams extends bindings.Struct { |
153 static const List<bindings.StructDataHeader> kVersions = const [ | 183 static const List<bindings.StructDataHeader> kVersions = const [ |
154 const bindings.StructDataHeader(16, 0) | 184 const bindings.StructDataHeader(16, 0) |
155 ]; | 185 ]; |
156 int size = 0; | 186 int size = 0; |
157 | 187 |
158 _HttpConnectionSetReceiveBufferSizeParams() : super(kVersions.last.size); | 188 _HttpConnectionSetReceiveBufferSizeParams() : super(kVersions.last.size); |
159 | 189 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 return "_HttpConnectionSetReceiveBufferSizeParams(" | 237 return "_HttpConnectionSetReceiveBufferSizeParams(" |
208 "size: $size" ")"; | 238 "size: $size" ")"; |
209 } | 239 } |
210 | 240 |
211 Map toJson() { | 241 Map toJson() { |
212 Map map = new Map(); | 242 Map map = new Map(); |
213 map["size"] = size; | 243 map["size"] = size; |
214 return map; | 244 return map; |
215 } | 245 } |
216 } | 246 } |
| 247 mojom_types.MojomStruct _http_connection_HttpConnection_SetReceiveBufferSize_Par
ams__() { |
| 248 return new mojom_types.MojomStruct() |
| 249 ..declData = (new mojom_types.DeclarationData() |
| 250 ..shortName = '_HttpConnectionSetReceiveBufferSizeParams' |
| 251 ..fullIdentifier = 'mojo._HttpConnectionSetReceiveBufferSizeParams') |
| 252 ..fields = <mojom_types.StructField>[ |
| 253 new mojom_types.StructField() |
| 254 ..declData = (new mojom_types.DeclarationData()..shortName = 'Size') |
| 255 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.ui
nt32), |
| 256 ]; |
| 257 } |
217 | 258 |
218 | 259 |
219 class HttpConnectionSetReceiveBufferSizeResponseParams extends bindings.Struct { | 260 class HttpConnectionSetReceiveBufferSizeResponseParams extends bindings.Struct { |
220 static const List<bindings.StructDataHeader> kVersions = const [ | 261 static const List<bindings.StructDataHeader> kVersions = const [ |
221 const bindings.StructDataHeader(16, 0) | 262 const bindings.StructDataHeader(16, 0) |
222 ]; | 263 ]; |
223 network_error_mojom.NetworkError result = null; | 264 network_error_mojom.NetworkError result = null; |
224 | 265 |
225 HttpConnectionSetReceiveBufferSizeResponseParams() : super(kVersions.last.size
); | 266 HttpConnectionSetReceiveBufferSizeResponseParams() : super(kVersions.last.size
); |
226 | 267 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 return "HttpConnectionSetReceiveBufferSizeResponseParams(" | 316 return "HttpConnectionSetReceiveBufferSizeResponseParams(" |
276 "result: $result" ")"; | 317 "result: $result" ")"; |
277 } | 318 } |
278 | 319 |
279 Map toJson() { | 320 Map toJson() { |
280 Map map = new Map(); | 321 Map map = new Map(); |
281 map["result"] = result; | 322 map["result"] = result; |
282 return map; | 323 return map; |
283 } | 324 } |
284 } | 325 } |
| 326 mojom_types.MojomStruct _http_connection_HttpConnection_SetReceiveBufferSize_Res
ponseParams__() { |
| 327 return new mojom_types.MojomStruct() |
| 328 ..declData = (new mojom_types.DeclarationData() |
| 329 ..shortName = 'HttpConnectionSetReceiveBufferSizeResponseParams' |
| 330 ..fullIdentifier = 'mojo.HttpConnectionSetReceiveBufferSizeResponseParams'
) |
| 331 ..fields = <mojom_types.StructField>[ |
| 332 new mojom_types.StructField() |
| 333 ..declData = (new mojom_types.DeclarationData()..shortName = 'Result') |
| 334 ..type = (new mojom_types.Type() |
| 335 ..typeReference = (new mojom_types.TypeReference() |
| 336 |
| 337 ..identifier = '_network_error_NetworkError__' |
| 338 ..typeKey = '_network_error_NetworkError__' |
| 339 )), |
| 340 ]; |
| 341 } |
285 | 342 |
286 | 343 |
287 class _HttpConnectionDelegateOnReceivedRequestParams extends bindings.Struct { | 344 class _HttpConnectionDelegateOnReceivedRequestParams extends bindings.Struct { |
288 static const List<bindings.StructDataHeader> kVersions = const [ | 345 static const List<bindings.StructDataHeader> kVersions = const [ |
289 const bindings.StructDataHeader(16, 0) | 346 const bindings.StructDataHeader(16, 0) |
290 ]; | 347 ]; |
291 http_message_mojom.HttpRequest request = null; | 348 http_message_mojom.HttpRequest request = null; |
292 | 349 |
293 _HttpConnectionDelegateOnReceivedRequestParams() : super(kVersions.last.size); | 350 _HttpConnectionDelegateOnReceivedRequestParams() : super(kVersions.last.size); |
294 | 351 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 String toString() { | 399 String toString() { |
343 return "_HttpConnectionDelegateOnReceivedRequestParams(" | 400 return "_HttpConnectionDelegateOnReceivedRequestParams(" |
344 "request: $request" ")"; | 401 "request: $request" ")"; |
345 } | 402 } |
346 | 403 |
347 Map toJson() { | 404 Map toJson() { |
348 throw new bindings.MojoCodecError( | 405 throw new bindings.MojoCodecError( |
349 'Object containing handles cannot be encoded to JSON.'); | 406 'Object containing handles cannot be encoded to JSON.'); |
350 } | 407 } |
351 } | 408 } |
| 409 mojom_types.MojomStruct _http_connection_HttpConnectionDelegate_OnReceivedReques
t_Params__() { |
| 410 return new mojom_types.MojomStruct() |
| 411 ..declData = (new mojom_types.DeclarationData() |
| 412 ..shortName = '_HttpConnectionDelegateOnReceivedRequestParams' |
| 413 ..fullIdentifier = 'mojo._HttpConnectionDelegateOnReceivedRequestParams') |
| 414 ..fields = <mojom_types.StructField>[ |
| 415 new mojom_types.StructField() |
| 416 ..declData = (new mojom_types.DeclarationData()..shortName = 'Request') |
| 417 ..type = (new mojom_types.Type() |
| 418 ..typeReference = (new mojom_types.TypeReference() |
| 419 |
| 420 ..identifier = '_http_message_HttpRequest__' |
| 421 ..typeKey = '_http_message_HttpRequest__' |
| 422 )), |
| 423 ]; |
| 424 } |
352 | 425 |
353 | 426 |
354 class HttpConnectionDelegateOnReceivedRequestResponseParams extends bindings.Str
uct { | 427 class HttpConnectionDelegateOnReceivedRequestResponseParams extends bindings.Str
uct { |
355 static const List<bindings.StructDataHeader> kVersions = const [ | 428 static const List<bindings.StructDataHeader> kVersions = const [ |
356 const bindings.StructDataHeader(16, 0) | 429 const bindings.StructDataHeader(16, 0) |
357 ]; | 430 ]; |
358 http_message_mojom.HttpResponse response = null; | 431 http_message_mojom.HttpResponse response = null; |
359 | 432 |
360 HttpConnectionDelegateOnReceivedRequestResponseParams() : super(kVersions.last
.size); | 433 HttpConnectionDelegateOnReceivedRequestResponseParams() : super(kVersions.last
.size); |
361 | 434 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 String toString() { | 482 String toString() { |
410 return "HttpConnectionDelegateOnReceivedRequestResponseParams(" | 483 return "HttpConnectionDelegateOnReceivedRequestResponseParams(" |
411 "response: $response" ")"; | 484 "response: $response" ")"; |
412 } | 485 } |
413 | 486 |
414 Map toJson() { | 487 Map toJson() { |
415 throw new bindings.MojoCodecError( | 488 throw new bindings.MojoCodecError( |
416 'Object containing handles cannot be encoded to JSON.'); | 489 'Object containing handles cannot be encoded to JSON.'); |
417 } | 490 } |
418 } | 491 } |
| 492 mojom_types.MojomStruct _http_connection_HttpConnectionDelegate_OnReceivedReques
t_ResponseParams__() { |
| 493 return new mojom_types.MojomStruct() |
| 494 ..declData = (new mojom_types.DeclarationData() |
| 495 ..shortName = 'HttpConnectionDelegateOnReceivedRequestResponseParams' |
| 496 ..fullIdentifier = 'mojo.HttpConnectionDelegateOnReceivedRequestResponsePa
rams') |
| 497 ..fields = <mojom_types.StructField>[ |
| 498 new mojom_types.StructField() |
| 499 ..declData = (new mojom_types.DeclarationData()..shortName = 'Response') |
| 500 ..type = (new mojom_types.Type() |
| 501 ..typeReference = (new mojom_types.TypeReference() |
| 502 |
| 503 ..identifier = '_http_message_HttpResponse__' |
| 504 ..typeKey = '_http_message_HttpResponse__' |
| 505 )), |
| 506 ]; |
| 507 } |
419 | 508 |
420 | 509 |
421 class _HttpConnectionDelegateOnReceivedWebSocketRequestParams extends bindings.S
truct { | 510 class _HttpConnectionDelegateOnReceivedWebSocketRequestParams extends bindings.S
truct { |
422 static const List<bindings.StructDataHeader> kVersions = const [ | 511 static const List<bindings.StructDataHeader> kVersions = const [ |
423 const bindings.StructDataHeader(16, 0) | 512 const bindings.StructDataHeader(16, 0) |
424 ]; | 513 ]; |
425 http_message_mojom.HttpRequest request = null; | 514 http_message_mojom.HttpRequest request = null; |
426 | 515 |
427 _HttpConnectionDelegateOnReceivedWebSocketRequestParams() : super(kVersions.la
st.size); | 516 _HttpConnectionDelegateOnReceivedWebSocketRequestParams() : super(kVersions.la
st.size); |
428 | 517 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 String toString() { | 565 String toString() { |
477 return "_HttpConnectionDelegateOnReceivedWebSocketRequestParams(" | 566 return "_HttpConnectionDelegateOnReceivedWebSocketRequestParams(" |
478 "request: $request" ")"; | 567 "request: $request" ")"; |
479 } | 568 } |
480 | 569 |
481 Map toJson() { | 570 Map toJson() { |
482 throw new bindings.MojoCodecError( | 571 throw new bindings.MojoCodecError( |
483 'Object containing handles cannot be encoded to JSON.'); | 572 'Object containing handles cannot be encoded to JSON.'); |
484 } | 573 } |
485 } | 574 } |
| 575 mojom_types.MojomStruct _http_connection_HttpConnectionDelegate_OnReceivedWebSoc
ketRequest_Params__() { |
| 576 return new mojom_types.MojomStruct() |
| 577 ..declData = (new mojom_types.DeclarationData() |
| 578 ..shortName = '_HttpConnectionDelegateOnReceivedWebSocketRequestParams' |
| 579 ..fullIdentifier = 'mojo._HttpConnectionDelegateOnReceivedWebSocketRequest
Params') |
| 580 ..fields = <mojom_types.StructField>[ |
| 581 new mojom_types.StructField() |
| 582 ..declData = (new mojom_types.DeclarationData()..shortName = 'Request') |
| 583 ..type = (new mojom_types.Type() |
| 584 ..typeReference = (new mojom_types.TypeReference() |
| 585 |
| 586 ..identifier = '_http_message_HttpRequest__' |
| 587 ..typeKey = '_http_message_HttpRequest__' |
| 588 )), |
| 589 ]; |
| 590 } |
486 | 591 |
487 | 592 |
488 class HttpConnectionDelegateOnReceivedWebSocketRequestResponseParams extends bin
dings.Struct { | 593 class HttpConnectionDelegateOnReceivedWebSocketRequestResponseParams extends bin
dings.Struct { |
489 static const List<bindings.StructDataHeader> kVersions = const [ | 594 static const List<bindings.StructDataHeader> kVersions = const [ |
490 const bindings.StructDataHeader(24, 0) | 595 const bindings.StructDataHeader(24, 0) |
491 ]; | 596 ]; |
492 Object webSocket = null; | 597 Object webSocket = null; |
493 core.MojoDataPipeConsumer sendStream = null; | 598 core.MojoDataPipeConsumer sendStream = null; |
494 Object client = null; | 599 Object client = null; |
495 | 600 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 "webSocket: $webSocket" ", " | 663 "webSocket: $webSocket" ", " |
559 "sendStream: $sendStream" ", " | 664 "sendStream: $sendStream" ", " |
560 "client: $client" ")"; | 665 "client: $client" ")"; |
561 } | 666 } |
562 | 667 |
563 Map toJson() { | 668 Map toJson() { |
564 throw new bindings.MojoCodecError( | 669 throw new bindings.MojoCodecError( |
565 'Object containing handles cannot be encoded to JSON.'); | 670 'Object containing handles cannot be encoded to JSON.'); |
566 } | 671 } |
567 } | 672 } |
| 673 mojom_types.MojomStruct _http_connection_HttpConnectionDelegate_OnReceivedWebSoc
ketRequest_ResponseParams__() { |
| 674 return new mojom_types.MojomStruct() |
| 675 ..declData = (new mojom_types.DeclarationData() |
| 676 ..shortName = 'HttpConnectionDelegateOnReceivedWebSocketRequestResponsePar
ams' |
| 677 ..fullIdentifier = 'mojo.HttpConnectionDelegateOnReceivedWebSocketRequestR
esponseParams') |
| 678 ..fields = <mojom_types.StructField>[ |
| 679 new mojom_types.StructField() |
| 680 ..declData = (new mojom_types.DeclarationData()..shortName = 'WebSocket'
) |
| 681 ..type = (new mojom_types.Type() |
| 682 ..typeReference = (new mojom_types.TypeReference() |
| 683 ..nullable = true |
| 684 |
| 685 |
| 686 ..isInterfaceRequest = true |
| 687 ..identifier = '_web_socket_WebSocket__' |
| 688 ..typeKey = '_web_socket_WebSocket__' |
| 689 )), |
| 690 |
| 691 new mojom_types.StructField() |
| 692 ..declData = (new mojom_types.DeclarationData()..shortName = 'SendStream
') |
| 693 ..type = (new mojom_types.Type() |
| 694 ..handleType = (new mojom_types.HandleType() |
| 695 ..kind = mojom_types.HandleTypeKind.dataPipeConsumer |
| 696 ..nullable = true)), |
| 697 |
| 698 new mojom_types.StructField() |
| 699 ..declData = (new mojom_types.DeclarationData()..shortName = 'Client') |
| 700 ..type = (new mojom_types.Type() |
| 701 ..typeReference = (new mojom_types.TypeReference() |
| 702 ..nullable = true |
| 703 |
| 704 |
| 705 ..identifier = '_web_socket_WebSocketClient__' |
| 706 ..typeKey = '_web_socket_WebSocketClient__' |
| 707 )), |
| 708 ]; |
| 709 } |
| 710 |
568 | 711 |
569 const int _HttpConnection_setSendBufferSizeName = 0; | 712 const int _HttpConnection_setSendBufferSizeName = 0; |
570 const int _HttpConnection_setReceiveBufferSizeName = 1; | 713 const int _HttpConnection_setReceiveBufferSizeName = 1; |
571 | 714 |
| 715 mojom_types.MojomInterface _http_connection_HttpConnection__() { |
| 716 return new mojom_types.MojomInterface() |
| 717 ..declData = (new mojom_types.DeclarationData() |
| 718 ..shortName = 'HttpConnection' |
| 719 ..fullIdentifier = 'mojo.HttpConnection') |
| 720 ..interfaceName = 'HttpConnection' |
| 721 ..methods = <int, mojom_types.MojomMethod>{ |
| 722 _HttpConnection_setSendBufferSizeName: new mojom_types.MojomMethod() |
| 723 ..declData = (new mojom_types.DeclarationData()..shortName = 'SetSendBuf
ferSize') |
| 724 ..ordinal = _HttpConnection_setSendBufferSizeName |
| 725 ..responseParams = _http_connection_HttpConnection_SetSendBufferSize_Res
ponseParams__()..parameters = _http_connection_HttpConnection_SetSendBufferSize_
Params__(),_HttpConnection_setReceiveBufferSizeName: new mojom_types.MojomMethod
() |
| 726 ..declData = (new mojom_types.DeclarationData()..shortName = 'SetReceive
BufferSize') |
| 727 ..ordinal = _HttpConnection_setReceiveBufferSizeName |
| 728 ..responseParams = _http_connection_HttpConnection_SetReceiveBufferSize_
ResponseParams__()..parameters = _http_connection_HttpConnection_SetReceiveBuffe
rSize_Params__(), |
| 729 }; |
| 730 } |
| 731 |
| 732 class _HttpConnectionServiceDescription implements service_describer.ServiceDesc
ription { |
| 733 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 734 return _http_connection_HttpConnection__(); |
| 735 } |
| 736 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 737 return getAllMojomTypeDefinitions()[typeKey]; |
| 738 } |
| 739 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 740 return getAllMojomTypeDefinitions(); |
| 741 } |
| 742 } |
| 743 |
572 abstract class HttpConnection { | 744 abstract class HttpConnection { |
573 static const String serviceName = null; | 745 static const String serviceName = null; |
574 dynamic setSendBufferSize(int size,[Function responseFactory = null]); | 746 dynamic setSendBufferSize(int size,[Function responseFactory = null]); |
575 dynamic setReceiveBufferSize(int size,[Function responseFactory = null]); | 747 dynamic setReceiveBufferSize(int size,[Function responseFactory = null]); |
576 } | 748 } |
577 | 749 |
578 | 750 |
579 class _HttpConnectionProxyImpl extends bindings.Proxy { | 751 class _HttpConnectionProxyImpl extends bindings.Proxy { |
580 _HttpConnectionProxyImpl.fromEndpoint( | 752 _HttpConnectionProxyImpl.fromEndpoint( |
581 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 753 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
582 | 754 |
583 _HttpConnectionProxyImpl.fromHandle(core.MojoHandle handle) : | 755 _HttpConnectionProxyImpl.fromHandle(core.MojoHandle handle) : |
584 super.fromHandle(handle); | 756 super.fromHandle(handle); |
585 | 757 |
586 _HttpConnectionProxyImpl.unbound() : super.unbound(); | 758 _HttpConnectionProxyImpl.unbound() : super.unbound(); |
587 | 759 |
588 static _HttpConnectionProxyImpl newFromEndpoint( | 760 static _HttpConnectionProxyImpl newFromEndpoint( |
589 core.MojoMessagePipeEndpoint endpoint) { | 761 core.MojoMessagePipeEndpoint endpoint) { |
590 assert(endpoint.setDescription("For _HttpConnectionProxyImpl")); | 762 assert(endpoint.setDescription("For _HttpConnectionProxyImpl")); |
591 return new _HttpConnectionProxyImpl.fromEndpoint(endpoint); | 763 return new _HttpConnectionProxyImpl.fromEndpoint(endpoint); |
592 } | 764 } |
593 | 765 |
| 766 service_describer.ServiceDescription get serviceDescription => |
| 767 new _HttpConnectionServiceDescription(); |
| 768 |
594 void handleResponse(bindings.ServiceMessage message) { | 769 void handleResponse(bindings.ServiceMessage message) { |
595 switch (message.header.type) { | 770 switch (message.header.type) { |
596 case _HttpConnection_setSendBufferSizeName: | 771 case _HttpConnection_setSendBufferSizeName: |
597 var r = HttpConnectionSetSendBufferSizeResponseParams.deserialize( | 772 var r = HttpConnectionSetSendBufferSizeResponseParams.deserialize( |
598 message.payload); | 773 message.payload); |
599 if (!message.header.hasRequestId) { | 774 if (!message.header.hasRequestId) { |
600 proxyError("Expected a message with a valid request Id."); | 775 proxyError("Expected a message with a valid request Id."); |
601 return; | 776 return; |
602 } | 777 } |
603 Completer c = completerMap[message.header.requestId]; | 778 Completer c = completerMap[message.header.requestId]; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 assert(_impl == null); | 1000 assert(_impl == null); |
826 _impl = d; | 1001 _impl = d; |
827 } | 1002 } |
828 | 1003 |
829 String toString() { | 1004 String toString() { |
830 var superString = super.toString(); | 1005 var superString = super.toString(); |
831 return "HttpConnectionStub($superString)"; | 1006 return "HttpConnectionStub($superString)"; |
832 } | 1007 } |
833 | 1008 |
834 int get version => 0; | 1009 int get version => 0; |
| 1010 |
| 1011 |
| 1012 service_describer.ServiceDescription get serviceDescription => |
| 1013 new _HttpConnectionServiceDescription(); |
835 } | 1014 } |
836 | 1015 |
837 const int _HttpConnectionDelegate_onReceivedRequestName = 0; | 1016 const int _HttpConnectionDelegate_onReceivedRequestName = 0; |
838 const int _HttpConnectionDelegate_onReceivedWebSocketRequestName = 1; | 1017 const int _HttpConnectionDelegate_onReceivedWebSocketRequestName = 1; |
839 | 1018 |
| 1019 mojom_types.MojomInterface _http_connection_HttpConnectionDelegate__() { |
| 1020 return new mojom_types.MojomInterface() |
| 1021 ..declData = (new mojom_types.DeclarationData() |
| 1022 ..shortName = 'HttpConnectionDelegate' |
| 1023 ..fullIdentifier = 'mojo.HttpConnectionDelegate') |
| 1024 ..interfaceName = 'HttpConnectionDelegate' |
| 1025 ..methods = <int, mojom_types.MojomMethod>{ |
| 1026 _HttpConnectionDelegate_onReceivedRequestName: new mojom_types.MojomMethod() |
| 1027 ..declData = (new mojom_types.DeclarationData()..shortName = 'OnReceived
Request') |
| 1028 ..ordinal = _HttpConnectionDelegate_onReceivedRequestName |
| 1029 ..responseParams = _http_connection_HttpConnectionDelegate_OnReceivedReq
uest_ResponseParams__()..parameters = _http_connection_HttpConnectionDelegate_On
ReceivedRequest_Params__(),_HttpConnectionDelegate_onReceivedWebSocketRequestNam
e: new mojom_types.MojomMethod() |
| 1030 ..declData = (new mojom_types.DeclarationData()..shortName = 'OnReceived
WebSocketRequest') |
| 1031 ..ordinal = _HttpConnectionDelegate_onReceivedWebSocketRequestName |
| 1032 ..responseParams = _http_connection_HttpConnectionDelegate_OnReceivedWeb
SocketRequest_ResponseParams__()..parameters = _http_connection_HttpConnectionDe
legate_OnReceivedWebSocketRequest_Params__(), |
| 1033 }; |
| 1034 } |
| 1035 |
| 1036 class _HttpConnectionDelegateServiceDescription implements service_describer.Ser
viceDescription { |
| 1037 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 1038 return _http_connection_HttpConnectionDelegate__(); |
| 1039 } |
| 1040 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 1041 return getAllMojomTypeDefinitions()[typeKey]; |
| 1042 } |
| 1043 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 1044 return getAllMojomTypeDefinitions(); |
| 1045 } |
| 1046 } |
| 1047 |
840 abstract class HttpConnectionDelegate { | 1048 abstract class HttpConnectionDelegate { |
841 static const String serviceName = null; | 1049 static const String serviceName = null; |
842 dynamic onReceivedRequest(http_message_mojom.HttpRequest request,[Function res
ponseFactory = null]); | 1050 dynamic onReceivedRequest(http_message_mojom.HttpRequest request,[Function res
ponseFactory = null]); |
843 dynamic onReceivedWebSocketRequest(http_message_mojom.HttpRequest request,[Fun
ction responseFactory = null]); | 1051 dynamic onReceivedWebSocketRequest(http_message_mojom.HttpRequest request,[Fun
ction responseFactory = null]); |
844 } | 1052 } |
845 | 1053 |
846 | 1054 |
847 class _HttpConnectionDelegateProxyImpl extends bindings.Proxy { | 1055 class _HttpConnectionDelegateProxyImpl extends bindings.Proxy { |
848 _HttpConnectionDelegateProxyImpl.fromEndpoint( | 1056 _HttpConnectionDelegateProxyImpl.fromEndpoint( |
849 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 1057 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
850 | 1058 |
851 _HttpConnectionDelegateProxyImpl.fromHandle(core.MojoHandle handle) : | 1059 _HttpConnectionDelegateProxyImpl.fromHandle(core.MojoHandle handle) : |
852 super.fromHandle(handle); | 1060 super.fromHandle(handle); |
853 | 1061 |
854 _HttpConnectionDelegateProxyImpl.unbound() : super.unbound(); | 1062 _HttpConnectionDelegateProxyImpl.unbound() : super.unbound(); |
855 | 1063 |
856 static _HttpConnectionDelegateProxyImpl newFromEndpoint( | 1064 static _HttpConnectionDelegateProxyImpl newFromEndpoint( |
857 core.MojoMessagePipeEndpoint endpoint) { | 1065 core.MojoMessagePipeEndpoint endpoint) { |
858 assert(endpoint.setDescription("For _HttpConnectionDelegateProxyImpl")); | 1066 assert(endpoint.setDescription("For _HttpConnectionDelegateProxyImpl")); |
859 return new _HttpConnectionDelegateProxyImpl.fromEndpoint(endpoint); | 1067 return new _HttpConnectionDelegateProxyImpl.fromEndpoint(endpoint); |
860 } | 1068 } |
861 | 1069 |
| 1070 service_describer.ServiceDescription get serviceDescription => |
| 1071 new _HttpConnectionDelegateServiceDescription(); |
| 1072 |
862 void handleResponse(bindings.ServiceMessage message) { | 1073 void handleResponse(bindings.ServiceMessage message) { |
863 switch (message.header.type) { | 1074 switch (message.header.type) { |
864 case _HttpConnectionDelegate_onReceivedRequestName: | 1075 case _HttpConnectionDelegate_onReceivedRequestName: |
865 var r = HttpConnectionDelegateOnReceivedRequestResponseParams.deserializ
e( | 1076 var r = HttpConnectionDelegateOnReceivedRequestResponseParams.deserializ
e( |
866 message.payload); | 1077 message.payload); |
867 if (!message.header.hasRequestId) { | 1078 if (!message.header.hasRequestId) { |
868 proxyError("Expected a message with a valid request Id."); | 1079 proxyError("Expected a message with a valid request Id."); |
869 return; | 1080 return; |
870 } | 1081 } |
871 Completer c = completerMap[message.header.requestId]; | 1082 Completer c = completerMap[message.header.requestId]; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 assert(_impl == null); | 1306 assert(_impl == null); |
1096 _impl = d; | 1307 _impl = d; |
1097 } | 1308 } |
1098 | 1309 |
1099 String toString() { | 1310 String toString() { |
1100 var superString = super.toString(); | 1311 var superString = super.toString(); |
1101 return "HttpConnectionDelegateStub($superString)"; | 1312 return "HttpConnectionDelegateStub($superString)"; |
1102 } | 1313 } |
1103 | 1314 |
1104 int get version => 0; | 1315 int get version => 0; |
| 1316 |
| 1317 |
| 1318 service_describer.ServiceDescription get serviceDescription => |
| 1319 new _HttpConnectionDelegateServiceDescription(); |
1105 } | 1320 } |
1106 | 1321 |
1107 | 1322 |
| 1323 |
| 1324 |
| 1325 |
| 1326 |
| 1327 |
| 1328 Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
| 1329 var map = new HashMap<String, mojom_types.UserDefinedType>(); |
| 1330 map["_http_connection_HttpConnection_SetSendBufferSize_Params__"] = |
| 1331 new mojom_types.UserDefinedType() |
| 1332 ..structType = _http_connection_HttpConnection_SetSendBufferSize_Params__(
); |
| 1333 map["_http_connection_HttpConnection_SetSendBufferSize_ResponseParams__"] = |
| 1334 new mojom_types.UserDefinedType() |
| 1335 ..structType = _http_connection_HttpConnection_SetSendBufferSize_ResponseP
arams__(); |
| 1336 map["_http_connection_HttpConnection_SetReceiveBufferSize_Params__"] = |
| 1337 new mojom_types.UserDefinedType() |
| 1338 ..structType = _http_connection_HttpConnection_SetReceiveBufferSize_Params
__(); |
| 1339 map["_http_connection_HttpConnection_SetReceiveBufferSize_ResponseParams__"] = |
| 1340 new mojom_types.UserDefinedType() |
| 1341 ..structType = _http_connection_HttpConnection_SetReceiveBufferSize_Respon
seParams__(); |
| 1342 map["_http_connection_HttpConnectionDelegate_OnReceivedRequest_Params__"] = |
| 1343 new mojom_types.UserDefinedType() |
| 1344 ..structType = _http_connection_HttpConnectionDelegate_OnReceivedRequest_P
arams__(); |
| 1345 map["_http_connection_HttpConnectionDelegate_OnReceivedRequest_ResponseParams__"
] = |
| 1346 new mojom_types.UserDefinedType() |
| 1347 ..structType = _http_connection_HttpConnectionDelegate_OnReceivedRequest_R
esponseParams__(); |
| 1348 map["_http_connection_HttpConnectionDelegate_OnReceivedWebSocketRequest_Params__
"] = |
| 1349 new mojom_types.UserDefinedType() |
| 1350 ..structType = _http_connection_HttpConnectionDelegate_OnReceivedWebSocket
Request_Params__(); |
| 1351 map["_http_connection_HttpConnectionDelegate_OnReceivedWebSocketRequest_Response
Params__"] = |
| 1352 new mojom_types.UserDefinedType() |
| 1353 ..structType = _http_connection_HttpConnectionDelegate_OnReceivedWebSocket
Request_ResponseParams__(); |
| 1354 map["_http_connection_HttpConnection__"] = |
| 1355 new mojom_types.UserDefinedType() |
| 1356 ..interfaceType = _http_connection_HttpConnection__(); |
| 1357 map["_http_connection_HttpConnectionDelegate__"] = |
| 1358 new mojom_types.UserDefinedType() |
| 1359 ..interfaceType = _http_connection_HttpConnectionDelegate__(); |
| 1360 network_error_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.
UserDefinedType udt) { |
| 1361 map[s] = udt; |
| 1362 }); |
| 1363 http_message_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.U
serDefinedType udt) { |
| 1364 map[s] = udt; |
| 1365 }); |
| 1366 web_socket_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.Use
rDefinedType udt) { |
| 1367 map[s] = udt; |
| 1368 }); |
| 1369 |
| 1370 return map; |
| 1371 } |
| 1372 |
| 1373 var _MojomDesc; |
| 1374 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
| 1375 if (_MojomDesc == null) { |
| 1376 _MojomDesc = _initDescriptions(); |
| 1377 } |
| 1378 return _MojomDesc; |
| 1379 } |
| 1380 |
OLD | NEW |