blob: e7fb5de8eec709ba49c1598c960b779ce6ba17b4 [file] [log] [blame]
// Copyright 2018 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 fidl.test.frobinator;
using zx;
closed protocol EmptyProtocol {};
type BasicUnion = union {
1: v uint32;
};
type BasicTable = table {
1: v uint32;
};
// Items for SendComplexTables
const MAX_TRANSFER_SIZE uint32 = 16;
type ChildUnion = flexible union {
2: a vector<uint8>:MAX_TRANSFER_SIZE;
1: b uint32;
};
type ComplexTable = table {
1: x ChildUnion;
2: y bool;
};
alias ComplexTableRetData = vector<uint8>:MAX_TRANSFER_SIZE;
closed protocol Frobinator {
strict Frob(struct {
value string;
});
strict Grob(struct {
value string;
}) -> (struct {
value string;
});
strict -> Hrob(struct {
value string;
});
strict Fail(struct {
fail bool;
}) -> () error uint32;
strict FailHard(struct {
fail bool;
}) -> (struct {
froyo string;
}) error uint32;
strict FailHardest(struct {
fail bool;
}) -> (struct {
fro string;
yo string;
}) error uint32;
strict SendEventHandle(resource struct {
event zx.Handle:<EVENT, zx.DEFAULT_EVENT_RIGHTS>;
});
strict SendProtocol(resource struct {
ep client_end:EmptyProtocol;
});
strict SendBasicUnion(struct {
union BasicUnion;
});
strict SendBasicTable(struct {
table BasicTable;
});
strict SendComplexTables(struct {
ct vector<ComplexTable>:MAX_TRANSFER_SIZE;
}) -> (struct {
ret vector<ComplexTableRetData>:MAX_TRANSFER_SIZE;
});
};