mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:17:45 +00:00
LibCore: Add a wrapper for adapting Core::Stream to AK::InputStream
This commit is contained in:
parent
35bcdefdf7
commit
4e7da96d58
2 changed files with 59 additions and 0 deletions
|
@ -1030,4 +1030,17 @@ private:
|
|||
NonnullOwnPtr<OutputStream> m_stream;
|
||||
};
|
||||
|
||||
// Note: This is only a temporary hack, to break up the task of moving away from AK::Stream into smaller parts.
|
||||
class WrapInAKInputStream final : public InputStream {
|
||||
public:
|
||||
WrapInAKInputStream(Core::Stream::Stream& stream);
|
||||
virtual size_t read(Bytes) override;
|
||||
virtual bool unreliable_eof() const override;
|
||||
virtual bool read_or_error(Bytes) override;
|
||||
virtual bool discard_or_error(size_t count) override;
|
||||
|
||||
private:
|
||||
Core::Stream::Stream& m_stream;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue