blob: 7b329e92a2cf493595efecff8293799249f6cea1 [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.
library fuchsia.device.lifecycle.test;
using zx;
protocol TestDevice {
/// Adds a child device and returns a unique |id| for the created device.
AddChild() -> (uint64 child_id) error zx.status;
/// Removes the child device of the given |id|.
RemoveChild(uint64 child_id) -> () error zx.status;
/// Registers the client for device lifecycle events.
SubscribeToLifecycle(request<Lifecycle> client) -> () error zx.status;
};
protocol Lifecycle {
/// Sent when the ChildPreRelease hook is called.
-> OnChildPreRelease(uint64 child_id);
};