blob: bd5369d466e2c57ec878d8b49e902b1e728aafb2 [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.
// DEPRECATED: This library is being replaced. Do not add new dependencies
// to this interface.
library fuchsia.inspect.deprecated;
const uint16 MAX_KEY_LENGTH = 1024;
const uint16 MAX_VALUE_LENGTH = 16384;
const uint16 MAX_VALUE_COUNT = 256;
const uint16 MAX_CHILDREN_COUNT = 256;
union PropertyValue {
1: string:MAX_VALUE_LENGTH str;
2: vector<uint8>:MAX_VALUE_LENGTH bytes;
// A string property on an `Object`. Consisting of a key and value.
struct Property {
string:MAX_KEY_LENGTH key;
PropertyValue value;
// The value of a metric is one of these numeric types.
union MetricValue {
1: int64 int_value;
2: uint64 uint_value;
3: float64 double_value;
// A Metric is a string key and the associated numeric value.
struct Metric {
string:MAX_KEY_LENGTH key;
MetricValue value;
// An `Object` has a name and 0 or more properties and metrics.
struct Object {
string:MAX_KEY_LENGTH name;
vector<Property>:MAX_VALUE_COUNT properties;
vector<Metric>:MAX_VALUE_COUNT metrics;
// The `Inspect` interface provides a point for Components to expose
// structured Objects for inspection. An Object may have 0 or more children.
protocol Inspect {
ReadData() -> (Object object);
ListChildren() -> (vector<string:MAX_KEY_LENGTH>:MAX_CHILDREN_COUNT children_names);
// Open a child of this Object by name.
// The name should match what is returned by ListChildren.
OpenChild(string:MAX_KEY_LENGTH child_name, request<Inspect> child_channel) -> (bool success);