blob: 5d49c6fcdb7fcf0faaf7bb4b6df0f1b25df95678 [file] [log] [blame]
// Copyright 2022 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.
#include "src/devices/bin/driver_manager/composite_node_spec/composite_node_spec.h"
namespace driver_manager {
using AddToIndexCallback = fit::callback<void(zx::result<>)>;
// Bridge class for the composite device handling in DFv1 and DFv2.
// Implemented by the Coordinator in DFv1 and DriverRunner in DFv2.
class CompositeManagerBridge {
virtual ~CompositeManagerBridge() = default;
// Match and bind all unbound nodes. Called by the CompositeNodeManager
// after a composite node spec is matched to a composite driver.
virtual void BindNodesForCompositeNodeSpec() = 0;
virtual void AddSpecToDriverIndex(fuchsia_driver_framework::wire::CompositeNodeSpec spec,
AddToIndexCallback callback) = 0;
virtual void RequestRebindFromDriverIndex(std::string spec,
std::optional<std::string> driver_url_suffix,
fit::callback<void(zx::result<>)> callback) {
} // namespace driver_manager