blob: 8afd365444b0907c2514d34580b6e695546e5dc0 [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.
#ifndef SRC_BIND_LIBRARY_PARENT_DRIVER_H_
#define SRC_BIND_LIBRARY_PARENT_DRIVER_H_
#include <lib/driver/component/cpp/driver_cpp.h>
#include "gizmo_server.h"
namespace parent_driver {
class ParentDriver : public driver::DriverBase {
public:
ParentDriver(driver::DriverStartArgs start_args, fdf::UnownedDispatcher driver_dispatcher)
: driver::DriverBase("parent-driver", std::move(start_args), std::move(driver_dispatcher)) {}
virtual ~ParentDriver() = default;
zx::result<> Start() override;
private:
zx::result<> AddChild();
fidl::WireClient<fuchsia_driver_framework::Node> node_;
std::shared_ptr<GizmoServer> gizmo_server_;
};
} // namespace parent_driver
#endif // SRC_BIND_LIBRARY_PARENT_DRIVER_H_