blob: c1bb3d01bea06f8eb08ec15621b163f18076bfe7 [file] [log] [blame]
// Copyright 2017 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.modular;
interface ContextDebug {
// The watch will stay active until the |listener| handle is closed.
1: Watch(ContextDebugListener listener);
// Waits until Context Engine has reached a steady state such that no further
// activity will occur unless acted upon from the outside.
2: WaitUntilIdle() -> ();
interface ContextDebugListener {
// Called any time a value is added, updated or removed. Each element in
// |values| represents a single add, update or remove operation. Values are
// guaranteed to appear before their children in the case that a parent and
// its child are included in the same update.
1: OnValuesChanged(vector<ContextDebugValue> values);
2: OnSubscriptionsChanged(vector<ContextDebugSubscription> subscription);
// Represents a single update to a value. If |value| is omitted, the value with
// |id| was deleted.
struct ContextDebugValue {
vector<string> parent_ids;
string id;
ContextValue? value;
struct ContextDebugSubscription {
string id;
// These are null when describing a subscription that was removed, although
// it's safe to condition only on |query|.
SubscriptionDebugInfo? debug_info;
ContextQuery? query;
struct SubscriptionDebugInfo {
ComponentScope client_info;