blob: bc403d7099e1a8ae879ff55e9c3f9edfba8ef0cf [file] [log] [blame]
// Copyright 2020 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_DEVICES_BIN_DRIVER_MANAGER_COMPONENT_LIFECYCLE_H_
#define SRC_DEVICES_BIN_DRIVER_MANAGER_COMPONENT_LIFECYCLE_H_
#include <fuchsia/process/lifecycle/llcpp/fidl.h>
#include <lib/async-loop/default.h>
#include <lib/zx/channel.h>
#include "coordinator.h"
namespace devmgr {
class ComponentLifecycleServer final
: public llcpp::fuchsia::process::lifecycle::Lifecycle::Interface {
public:
explicit ComponentLifecycleServer(Coordinator* dev_coord) : dev_coord_(dev_coord) {}
static zx_status_t Create(async_dispatcher_t* dispatcher, Coordinator* dev_coord,
zx::channel chan);
void Stop(StopCompleter::Sync completer) override;
private:
Coordinator* dev_coord_;
};
} // namespace devmgr
#endif // SRC_DEVICES_BIN_DRIVER_MANAGER_COMPONENT_LIFECYCLE_H_