#include <char-device.h>
Public Types | |
using | value_type = T |
Types & Constants | |
enum | type : type_t { unknown = 0 , not_set = 1 << 0 , char_device = 1 << 1 , block_device = 1 << 2 , tty = 1 << 3 , file = 1 << 4 , socket = 1 << 5 } |
using | type_t = unsigned int |
Public Member Functions | |
Constructors & Destructor | |
template<typename ... Args> | |
char_device_implementable (const char *name, Args &&... args) | |
virtual | ~char_device_implementable () override |
Public Member Functions | |
value_type & | impl (void) const |
Public Member Functions | |
virtual ssize_t | read (void *buf, std::size_t nbyte) |
virtual ssize_t | write (const void *buf, std::size_t nbyte) |
virtual ssize_t | writev (const struct iovec *iov, int iovcnt) |
int | fcntl (int cmd,...) |
virtual int | vfcntl (int cmd, std::va_list args) |
int | isatty (void) |
virtual int | fstat (struct stat *buf) |
virtual off_t | lseek (off_t offset, int whence) |
type_t | get_type (void) const |
file_descriptor_t | file_descriptor (void) const |
bool | is_opened (void) |
Protected Member Functions | |
Private Member Functions | |
void | file_descriptor (file_descriptor_t fildes) |
void | clear_file_descriptor (void) |
io * | alloc_file_descriptor (void) |
Public Member Functions | |
int | open (const char *path=nullptr, int oflag=0,...) |
int | vopen (const char *path, int oflag, std::va_list args) |
virtual int | close (void) override |
int | ioctl (int request,...) |
virtual int | vioctl (int request, std::va_list args) |
virtual void | sync (void) |
virtual bool | match_name (const char *name) const |
const char * | name (void) const |
static const char * | device_prefix (void) |
Definition at line 191 of file char-device.h.
|
inherited |
using os::posix::char_device_implementable< T >::value_type = T |
Definition at line 197 of file char-device.h.
|
inherited |
os::posix::char_device_implementable< T >::char_device_implementable | ( | const char * | name, |
Args &&... | args | ||
) |
Definition at line 287 of file char-device.h.
|
overridevirtual |
Definition at line 301 of file char-device.h.
|
protectedinherited |
|
inlineprotectedinherited |
|
overridevirtualinherited |
Reimplemented from os::posix::io.
Reimplemented in os::posix::block_device_lockable< T, L >.
Definition at line 125 of file device.cpp.
|
inlinestaticinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
virtualinherited |
Reimplemented in os::posix::file_lockable< T, L >.
|
inlineinherited |
char_device_implementable< T >::value_type & os::posix::char_device_implementable< T >::impl | ( | void | ) | const |
Definition at line 311 of file char-device.h.
|
inherited |
Definition at line 149 of file device.cpp.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
virtualinherited |
Definition at line 197 of file device.cpp.
|
inlineinherited |
|
inherited |
path | May be nullptr. |
oflag | Output flags |
Definition at line 75 of file device.cpp.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >.
Definition at line 179 of file device.cpp.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
virtualinherited |
Reimplemented in os::posix::block_device_partition_lockable< T, L >, os::posix::block_device, and os::posix::block_device_lockable< T, L >.
Definition at line 161 of file device.cpp.
|
inherited |
path | May be nullptr. |
oflag | Output flags |
args | Arguments |
Definition at line 87 of file device.cpp.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.