blob: 4d781af29fd7261132ae0a9e1cb378185ac6e996 [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.
#pragma once
#include "device.h"
#include "task.h"
namespace devmgr {
class SuspendTask final : public Task {
static fbl::RefPtr<SuspendTask> Create(fbl::RefPtr<Device> device, uint32_t flags,
Completion completion = nullptr);
// Don/t invoke this, use Create
SuspendTask(fbl::RefPtr<Device> device, uint32_t flags, Completion completion);
uint32_t suspend_flags() { return flags_; }
~SuspendTask() final;
void Run() final;
// The device being suspended
fbl::RefPtr<Device> device_;
// The target suspend flags
uint32_t flags_;
} // namespace devmgr