blob: fdbfa8fbff57c4975b8b98b86bdbbb68e834ffa5 [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;
union PropertyValue {
1: string:MAX str;
2: vector<uint8>:MAX bytes;
};
// A string property on an `Object`. Consisting of a key and value.
struct Property {
string:MAX 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;
MetricValue value;
};
// An `Object` has a name and 0 or more properties and metrics.
struct Object {
string:MAX name;
vector<Property>:MAX properties;
vector<Metric>:MAX metrics;
};
// The `Inspect` interface provides a point for Components to expose
// structured Objects for inspection. An Object may have 0 or more children.
[Discoverable]
protocol Inspect {
ReadData() -> (Object object);
ListChildren() -> (vector<string:MAX>:MAX children_names);
// Open a child of this Object by name.
// The name should match what is returned by ListChildren.
OpenChild(string:MAX child_name, request<Inspect> child_channel) -> (bool success);
};