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-02-25 21:19:57 +01:00
|
|
|
virtual ssize_t read(Process&, byte*, ssize_t) override;
|
|
|
|
virtual ssize_t write(Process&, const byte*, ssize_t) override;
|
2019-01-16 00:10:13 +01:00
|
|
|
virtual bool can_read(Process&) const override;
|
2019-01-15 09:17:22 +01:00
|
|
|
virtual bool can_write(Process&) 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
|
|
|
};
|
|
|
|
|