mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
1682f0b760
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
/*
|
|
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/OwnPtr.h>
|
|
#include <AK/RefPtr.h>
|
|
#include <Kernel/Devices/Device.h>
|
|
#include <Kernel/IO.h>
|
|
#include <Kernel/Lock.h>
|
|
#include <Kernel/PCI/Access.h>
|
|
#include <Kernel/PCI/DeviceController.h>
|
|
#include <Kernel/PhysicalAddress.h>
|
|
#include <Kernel/Random.h>
|
|
#include <Kernel/VM/PhysicalPage.h>
|
|
#include <Kernel/WaitQueue.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class AsyncBlockDeviceRequest;
|
|
class StorageDevice;
|
|
class StorageController : public RefCounted<StorageController> {
|
|
AK_MAKE_ETERNAL
|
|
|
|
public:
|
|
virtual ~StorageController() = default;
|
|
|
|
virtual RefPtr<StorageDevice> device(u32 index) const = 0;
|
|
virtual size_t devices_count() const = 0;
|
|
|
|
protected:
|
|
virtual void start_request(const StorageDevice&, AsyncBlockDeviceRequest&) = 0;
|
|
|
|
protected:
|
|
virtual bool reset() = 0;
|
|
virtual bool shutdown() = 0;
|
|
|
|
virtual void complete_current_request(AsyncDeviceRequest::RequestResult) = 0;
|
|
};
|
|
}
|