blob: 895cfa3f334eaf856fb9159e766723eea3f49dea [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_STORAGE_FSHOST_LIFECYCLE_H_
#define SRC_STORAGE_FSHOST_LIFECYCLE_H_
#include <fuchsia/process/lifecycle/llcpp/fidl.h>
#include <lib/async-loop/default.h>
#include <lib/zx/channel.h>
#include "src/lib/storage/vfs/cpp/service.h"
#include "src/storage/fshost/fs-manager.h"
namespace devmgr {
class FsManager;
class LifecycleServer final : public fidl::WireServer<fuchsia_process_lifecycle::Lifecycle> {
public:
explicit LifecycleServer(FsManager* fs_manager) : fs_manager_(fs_manager) {}
static zx_status_t Create(async_dispatcher_t* dispatcher, FsManager* fs_manager,
fidl::ServerEnd<fuchsia_process_lifecycle::Lifecycle> chan);
void Stop(StopRequestView request, StopCompleter::Sync& completer) override;
private:
FsManager* fs_manager_;
};
} // namespace devmgr
#endif // SRC_STORAGE_FSHOST_LIFECYCLE_H_