OLD | NEW |
1 // WARNING: DO NOT EDIT. This file was generated by a program. | 1 // WARNING: DO NOT EDIT. This file was generated by a program. |
2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. | 2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. |
3 | 3 |
4 library http_header_mojom; | 4 library http_header_mojom; |
5 import 'package:mojo/bindings.dart' as bindings; | 5 import 'package:mojo/bindings.dart' as bindings; |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
10 class HttpHeader extends bindings.Struct { | 10 class HttpHeader extends bindings.Struct { |
11 static const List<bindings.StructDataHeader> kVersions = const [ | 11 static const List<bindings.StructDataHeader> kVersions = const [ |
12 const bindings.StructDataHeader(24, 0) | 12 const bindings.StructDataHeader(24, 0) |
13 ]; | 13 ]; |
14 String name = null; | 14 String name = null; |
15 String value = null; | 15 String value = null; |
16 | 16 |
17 HttpHeader() : super(kVersions.last.size); | 17 HttpHeader() : super(kVersions.last.size); |
18 | 18 |
| 19 HttpHeader.init( |
| 20 String this.name, |
| 21 String this.value |
| 22 ) : super(kVersions.last.size); |
| 23 |
19 static HttpHeader deserialize(bindings.Message message) { | 24 static HttpHeader deserialize(bindings.Message message) { |
20 var decoder = new bindings.Decoder(message); | 25 var decoder = new bindings.Decoder(message); |
21 var result = decode(decoder); | 26 var result = decode(decoder); |
22 if (decoder.excessHandles != null) { | 27 if (decoder.excessHandles != null) { |
23 decoder.excessHandles.forEach((h) => h.close()); | 28 decoder.excessHandles.forEach((h) => h.close()); |
24 } | 29 } |
25 return result; | 30 return result; |
26 } | 31 } |
27 | 32 |
28 static HttpHeader decode(bindings.Decoder decoder0) { | 33 static HttpHeader decode(bindings.Decoder decoder0) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 Map toJson() { | 92 Map toJson() { |
88 Map map = new Map(); | 93 Map map = new Map(); |
89 map["name"] = name; | 94 map["name"] = name; |
90 map["value"] = value; | 95 map["value"] = value; |
91 return map; | 96 return map; |
92 } | 97 } |
93 } | 98 } |
94 | 99 |
95 | 100 |
96 | 101 |
OLD | NEW |