89 lines
2.5 KiB
C++
89 lines
2.5 KiB
C++
// vi:ft=cpp
|
|
/**
|
|
* \file
|
|
* \brief Virtual console interface.
|
|
*/
|
|
/*
|
|
* (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
|
|
* Alexander Warg <warg@os.inf.tu-dresden.de>,
|
|
* Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
|
|
* economic rights: Technische Universität Dresden (Germany)
|
|
*
|
|
* This file is part of TUD:OS and distributed under the terms of the
|
|
* GNU General Public License 2.
|
|
* Please see the COPYING-GPL-2 file for details.
|
|
*
|
|
* As a special exception, you may use this file as part of a free software
|
|
* library without restriction. Specifically, if other files instantiate
|
|
* templates or use macros or inline functions from this file, or you compile
|
|
* this file and link it with other files to produce an executable, this
|
|
* file does not by itself cause the resulting executable to be covered by
|
|
* the GNU General Public License. This exception does not however
|
|
* invalidate any other reasons why the executable file might be covered by
|
|
* the GNU General Public License.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <l4/sys/icu>
|
|
#include <l4/sys/vcon.h>
|
|
#include <l4/sys/capability>
|
|
|
|
namespace L4 {
|
|
|
|
/**
|
|
* \brief C++ L4 Vcon.
|
|
* \ingroup l4_vcon_api
|
|
*
|
|
* <c>\#include <l4/sys/vcon></c>
|
|
*
|
|
* \see \ref l4_vcon_api for an overview and C bindings.
|
|
*/
|
|
class Vcon :
|
|
public Kobject_t<Vcon, Icu, L4_PROTO_LOG>
|
|
{
|
|
L4_KOBJECT(Vcon)
|
|
|
|
public:
|
|
/**
|
|
* \copydoc l4_vcon_send()
|
|
* \note \a vcon is the implicit \a this pointer.
|
|
*/
|
|
l4_msgtag_t
|
|
send(char const *buf, int size, l4_utcb_t *utcb = l4_utcb()) const throw()
|
|
{ return l4_vcon_send_u(cap(), buf, size, utcb); }
|
|
|
|
/**
|
|
* \copydoc l4_vcon_write()
|
|
* \note \a vcon is the implicit \a this pointer.
|
|
*/
|
|
long
|
|
write(char const *buf, int size, l4_utcb_t *utcb = l4_utcb()) const throw()
|
|
{ return l4_vcon_write_u(cap(), buf, size, utcb); }
|
|
|
|
/**
|
|
* \copydoc l4_vcon_read()
|
|
* \note \a vcon is the implicit \a this pointer.
|
|
*/
|
|
int
|
|
read(char *buf, int size, l4_utcb_t *utcb = l4_utcb()) const throw()
|
|
{ return l4_vcon_read_u(cap(), buf, size, utcb); }
|
|
|
|
/**
|
|
* \copydoc l4_vcon_set_attr()
|
|
* \note \a vcon is the implicit \a this pointer.
|
|
*/
|
|
l4_msgtag_t
|
|
set_attr(l4_vcon_attr_t const *attr, l4_utcb_t *utcb = l4_utcb()) const throw()
|
|
{ return l4_vcon_set_attr_u(cap(), attr, utcb); }
|
|
|
|
/**
|
|
* \copydoc l4_vcon_get_attr()
|
|
* \note \a vcon is the implicit \a this pointer.
|
|
*/
|
|
l4_msgtag_t
|
|
get_attr(l4_vcon_attr_t *attr, l4_utcb_t *utcb = l4_utcb()) const throw()
|
|
{ return l4_vcon_get_attr_u(cap(), attr, utcb); }
|
|
};
|
|
|
|
}
|