| // 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. |
| |
| library fuchsia.castconfig; |
| |
| using fuchsia.mem; |
| |
| /// Error codes for the Watch operation. |
| enum ErrorCode { |
| /// 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/development/api/fidl.md#delay-responses-using-hanging-gets |
| /// |
| /// All error cases are terminal, clients should not retry on error. |
| Watch() -> (fuchsia.mem.Buffer config) error ErrorCode; |
| |
| /// Notifies the config provider of the config status. |
| /// |
| /// `processed`: `true` if successfully recieved and processed |
| /// `retry`: If `processed` is `false` config provider determines if a retry |
| /// is appropriate. |
| Notify(bool processed) -> (bool retry); |
| }; |