2018-10-14 02:59:22 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CharacterDevice.h"
|
|
|
|
|
|
|
|
class ZeroDevice final : public CharacterDevice {
|
2018-10-31 23:19:15 +01:00
|
|
|
AK_MAKE_ETERNAL
|
2018-10-14 02:59:22 +02:00
|
|
|
public:
|
|
|
|
ZeroDevice();
|
2018-10-25 13:07:59 +02:00
|
|
|
virtual ~ZeroDevice() override;
|
2018-10-14 02:59:22 +02:00
|
|
|
|
2019-01-21 02:33:01 +01:00
|
|
|
private:
|
|
|
|
// ^CharacterDevice
|
2019-07-03 21:17:35 +02:00
|
|
|
virtual ssize_t read(FileDescription&, u8*, ssize_t) override;
|
|
|
|
virtual ssize_t write(FileDescription&, const u8*, ssize_t) override;
|
2019-06-07 09:36:51 +02:00
|
|
|
virtual bool can_read(FileDescription&) const override;
|
|
|
|
virtual bool can_write(FileDescription&) const override { return true; }
|
2019-01-21 02:33:01 +01:00
|
|
|
virtual const char* class_name() const override { return "ZeroDevice"; }
|
2018-10-14 02:59:22 +02:00
|
|
|
};
|