| // Copyright 2021 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; |
| |
| closed protocol SendHandleProtocol { |
| strict SendHandleReducedRights(resource struct { |
| h zx.Handle:<EVENT, zx.Rights.TRANSFER>; |
| }); |
| strict SendHandleSameRights(resource struct { |
| h zx.Handle:EVENT; |
| }); |
| }; |
| |
| closed protocol EchoHandleProtocol { |
| strict EchoHandleRequestResponseReducedRights(resource struct { |
| h zx.Handle:<EVENT, zx.Rights.TRANSFER | zx.Rights.DUPLICATE>; |
| }) -> (resource struct { |
| h zx.Handle:<EVENT, zx.Rights.TRANSFER>; |
| }); |
| |
| strict EchoHandleRequestReducedRights(resource struct { |
| h zx.Handle:<EVENT, zx.Rights.TRANSFER>; |
| }) -> (resource struct { |
| h zx.Handle:EVENT; |
| }); |
| strict EchoHandleRequestSameRights(resource struct { |
| h zx.Handle:EVENT; |
| }) -> (resource struct { |
| h zx.Handle:EVENT; |
| }); |
| |
| strict EchoHandleResponseReducedRights(resource struct { |
| h zx.Handle:EVENT; |
| }) -> (resource struct { |
| h zx.Handle:<EVENT, zx.Rights.TRANSFER>; |
| }); |
| strict EchoHandleResponseSameRights(resource struct { |
| h zx.Handle:EVENT; |
| }) -> (resource struct { |
| h zx.Handle:EVENT; |
| }); |
| }; |
| |
| closed protocol PushEventProtocol { |
| strict -> PushEventReducedRights(resource struct { |
| h zx.Handle:<EVENT, zx.Rights.TRANSFER>; |
| }); |
| strict -> PushEventSameRights(resource struct { |
| h zx.Handle:EVENT; |
| }); |
| }; |
| |
| closed protocol ErrorSyntaxProtocol { |
| strict TestErrorSyntax() -> (resource struct { |
| h zx.Handle:<EVENT, zx.Rights.TRANSFER>; |
| }) error uint32; |
| }; |