]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re_vfs/include/impl/vcon_stream.h
3219d10a38c3a126bc57eea67b7875302247d7b3
[l4.git] / l4 / pkg / l4re_vfs / include / impl / vcon_stream.h
1 /*
2  * (c) 2010 Technische Universität Dresden
3  * This file is part of TUD:OS and distributed under the terms of the
4  * GNU General Public License 2.
5  * Please see the COPYING-GPL-2 file for details.
6  *
7  * As a special exception, you may use this file as part of a free software
8  * library without restriction.  Specifically, if other files instantiate
9  * templates or use macros or inline functions from this file, or you compile
10  * this file and link it with other files to produce an executable, this
11  * file does not by itself cause the resulting executable to be covered by
12  * the GNU General Public License.  This exception does not however
13  * invalidate any other reasons why the executable file might be covered by
14  * the GNU General Public License.
15  */
16 #pragma once
17
18 #include <l4/sys/capability>
19 #include <l4/sys/vcon>
20 #include <l4/sys/irq>
21
22 #include <l4/l4re_vfs/backend>
23
24
25 namespace L4Re { namespace Core {
26
27 class Vcon_stream : public L4Re::Vfs::Be_file
28 {
29 private:
30   L4::Cap<L4::Vcon> _s;
31   L4::Cap<L4::Irq>  _irq;
32
33 public:
34   explicit Vcon_stream(L4::Cap<L4::Vcon> s) throw();
35
36   ssize_t readv(const struct iovec*, int iovcnt) throw();
37   ssize_t writev(const struct iovec*, int iovcnt) throw();
38   int fstat64(struct stat64 *buf) const throw();
39   int get_status_flags() const throw() { return O_RDONLY; }
40   int set_status_flags(long) throw() { return 0; }
41
42   ~Vcon_stream() throw() {}
43   void operator delete (void *) {}
44 };
45
46
47 }}