mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
Noux: add backend pointer to Io_channel
The backend pointer may be used to provide additional methods in a Io_channel derived class.
This commit is contained in:
parent
4b140a5202
commit
08bd41b1ec
@ -27,6 +27,20 @@
|
||||
|
||||
namespace Noux {
|
||||
|
||||
/**
|
||||
* Input/output channel backend that is used for calling
|
||||
* different methos which does not belong to the original
|
||||
* interface, e.g. network methods.
|
||||
*/
|
||||
class Io_channel_backend
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~Io_channel_backend() { }
|
||||
|
||||
virtual int type() const { return -1; }
|
||||
};
|
||||
|
||||
/**
|
||||
* Input/output channel interface
|
||||
*/
|
||||
@ -49,6 +63,8 @@ namespace Noux {
|
||||
|
||||
virtual ~Io_channel() { }
|
||||
|
||||
virtual Io_channel_backend* backend() { return 0; }
|
||||
|
||||
virtual bool write(Sysio *sysio, size_t &count) { return false; }
|
||||
virtual bool read(Sysio *sysio) { return false; }
|
||||
virtual bool fstat(Sysio *sysio) { return false; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user