Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
IStream.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
4 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
5 * SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
6 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
7 */
8
9#pragma once
10
11#include <cstdint>
12
13class IEventQueue;
14
15namespace deskflow {
16
18
22{
23public:
24 IStream() = default;
25 virtual ~IStream() = default;
27
28
30
37 virtual void close() = 0;
38
40
45 virtual uint32_t read(void *buffer, uint32_t n) = 0;
46
48
54 virtual void write(const void *buffer, uint32_t n) = 0;
55
57
60 virtual void flush() = 0;
61
63
67 virtual void shutdownInput() = 0;
68
70
75 virtual void shutdownOutput() = 0;
76
78
80
82
86 virtual void *getEventTarget() const = 0;
87
89
94 virtual bool isReady() const = 0;
95
97
103 virtual uint32_t getSize() const = 0;
104
106};
107
108} // namespace deskflow
Event queue interface.
Definition IEventQueue.h:29
virtual uint32_t getSize() const =0
Get bytes available to read.
virtual void * getEventTarget() const =0
Get event target.
virtual void write(const void *buffer, uint32_t n)=0
Write to stream.
virtual uint32_t read(void *buffer, uint32_t n)=0
Read from stream.
virtual bool isReady() const =0
Test if read() will succeed.
virtual ~IStream()=default
virtual void flush()=0
Flush the stream.
virtual void close()=0
Close the stream.
virtual void shutdownOutput()=0
Shutdown output.
virtual void shutdownInput()=0
Shutdown input.
Definition EventTypes.h:11