Rudiments: /home/dmuse/temp/rudiments/include/rudiments/security.h Source File

Rudiments

security.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_SECURITY_H
5 #define RUDIMENTS_SECURITY_H
6
7 #include <rudiments/private/dll.h>
8 #include <rudiments/private/inttypes.h>
9
10 #ifdef RUDIMENTS_HAVE_SYS_TYPES_H
11 #include <sys/types.h>
12 #endif
13
14 class filedescriptor;
15
16 class RUDIMENTS_DLLSPEC securitycontext {
17 public:
18 securitycontext() {};
19 virtual ~securitycontext() {};
20 virtual void setFileDescriptor(filedescriptor *fd)=0;
21 virtual filedescriptor *getFileDescriptor()=0;
22
23 virtual bool connect()=0;
24 virtual bool accept()=0;
25 virtual ssize_t read(void *buf, ssize_t size)=0;
26 virtual ssize_t write(const void *buf, ssize_t size)=0;
27 virtual ssize_t pending()=0;
28 virtual bool close()=0;
29 virtual ssize_t getSizeMax()=0;
30 };
31
32 #endif
filedescriptor
Definition: filedescriptor.h:13
securitycontext
Definition: security.h:16