blob: a1840c3cb933f098c90244c53456968c741c2d02 [file] [log] [blame]
// Copyright 2024 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.
@available(added=HEAD)
library fuchsia.examples.metadata;
using zx;
// Type of the metadata to be passed.
@serializable
type Metadata = table {
1: test_property string:MAX;
};
// Implemented by the driver that will be sending metadata using the
// //sdk/lib/driver/metadata library. Used only for testing.
closed protocol Sender {
/// Create a child node and serve |metadata| using a `fdf_metadata::MetadataServer` to that
/// child node.
strict ServeMetadata(struct {
metadata Metadata;
}) -> () error zx.Status;
};
service SenderService {
device client_end:Sender;
};
// Implemented by the driver that will retrieve metadata using the
// //sdk/lib/driver/metadata library. Used only for testing.
closed protocol Retriever {
// Get the metadata offered by the driver's parent using the
// //sdk/lib/driver/metadata library.
strict GetMetadata() -> (struct {
metadata Metadata;
}) error zx.Status;
};
service RetrieverService {
device client_end:Retriever;
};