| // Copyright 2022 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library test.external; |
| |
| using zx; |
| |
| type LargeMessageTable = table { |
| 1: str string:MAX; |
| }; |
| |
| type LargeMessageUnion = flexible resource union { |
| 1: str string:MAX; |
| }; |
| |
| type LargeMessageStruct = struct { |
| str string:MAX; |
| }; |
| |
| type LargeMessageResourced = resource struct { |
| str string:MAX; |
| expect_handles uint64; |
| handles array<zx.Handle:optional, 64>; |
| }; |
| |
| closed protocol OverflowingProtocol { |
| @experimental_overflowing(request=true) |
| strict TwoWayRequestOnly(LargeMessageUnion) -> (table {}); |
| |
| @experimental_overflowing(response=true) |
| strict TwoWayResponseOnly(table {}) -> (LargeMessageTable); |
| |
| @experimental_overflowing(request=true, response=true) |
| strict TwoWayBothRequestAndResponse(LargeMessageStruct) -> (LargeMessageStruct); |
| |
| @experimental_overflowing(request=true) |
| strict OneWayCall(LargeMessageTable); |
| |
| @experimental_overflowing(response=true) |
| strict -> OnOneWayReplyEvent(LargeMessageUnion); |
| |
| @experimental_overflowing(request=true, response=true) |
| strict Resourced(LargeMessageResourced) -> (LargeMessageResourced); |
| }; |