blob: 795f1a7c9365687077a45c99a784f259a592e7a8 [file] [log] [blame]
// Copyright 2019 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=7)
library fuchsia.castconfig;
using fuchsia.mem;
/// Error codes for the Watch operation.
type ErrorCode = strict enum {
/// Error when there is no cast config available.
NO_CAST_CONFIG = 1;
/// Generic error.
INTERNAL = 2;
};
/// Interface that provides cast config data.
@discoverable
protocol Provider {
/// Requests a buffer containing cast config data.
/// This call implements the Hanging Get protocol as detailed in
/// https://fuchsia.dev/fuchsia-src/concepts/api/fidl#hanging-get
///
/// All error cases are terminal, clients should not retry on error.
Watch() -> (resource struct {
config fuchsia.mem.Buffer;
}) error ErrorCode;
/// Notifies the config provider of the config status.
///
/// `processed`: `true` if successfully received and processed
/// `retry`: If `processed` is `false` config provider determines if a retry
/// is appropriate.
Notify(struct {
processed bool;
}) -> (struct {
retry bool;
});
};