00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CONEXUSENUMS_H
00020 #define CONEXUSENUMS_H
00021
00022 #include <netinet/ip.h>
00023 #include <termios.h>
00024
00025 namespace Conexus {
00026
00027 typedef enum ReadWrite {
00028 READ_WRITE_NONE=0,
00029 READ=1,
00030 WRITE=2,
00031 READ_WRITE=3,
00032 READ_WRITE_UNCHANGED=4,
00033 READ_WRITE_LAST_STATE=READ_WRITE_UNCHANGED
00034 } ReadWrite;
00035
00040 typedef enum EndpointState {
00041 ENDPOINT_NOSTATE = 0,
00042 ENDPOINT_CLOSED = 1<<0,
00043 ENDPOINT_OPENED = 1<<1,
00044 ENDPOINT_LAST_STATE = ENDPOINT_OPENED,
00045 ENDPOINT_UNCHANGED = ~0,
00046 } EndpointState;
00047
00055 typedef enum StartStop {
00056 STOP=0,
00057 START=1,
00058 } StartStop;
00059
00064 typedef enum SocketState {
00065 SOCKET_BOUND = ENDPOINT_LAST_STATE << 1,
00066 SOCKET_CONNECTED = ENDPOINT_LAST_STATE << 2,
00067 SOCKET_LISTENING = ENDPOINT_LAST_STATE << 3,
00068 SOCKET_ACCEPTED = ENDPOINT_LAST_STATE << 4,
00069 SOCKET_LAST_STATE = SOCKET_ACCEPTED,
00070 } SocketState;
00071
00075 typedef enum PipeMode {
00076 PIPE_READ=ENDPOINT_LAST_STATE<<1,
00077 PIPE_WRITE=ENDPOINT_LAST_STATE<<2,
00078 } PipeMode;
00079
00083 typedef enum FileMode {
00084 FILE_READ=1<<0,
00085 FILE_WRITE=1<<1,
00086 FILE_APPEND=1<<2,
00087 FILE_CREATE=1<<3,
00088 FILE_DIRECT=1<<4,
00089 FILE_LARGE_FILE=1<<5,
00090 FILE_NO_ACCESS_TIME=1<<6,
00091 FILE_NO_FOLLOW=1<<7,
00092 FILE_TRUNCATE=1<<8,
00093 FILE_EXCLUSIVE_CREATE=1<<9,
00094 FILE_UNCHANGED=1<<10,
00095 FILE_LAST_STATE=FILE_UNCHANGED,
00096 } FileMode;
00097
00101 typedef enum QueueMode {
00102 QUEUE_READ=1<<0,
00103 QUEUE_WRITE=1<<1,
00104 QUEUE_CREATE=1<<2,
00105 QUEUE_EXCLUSIVE_CREATE=1<<3,
00106 QUEUE_NONBLOCKING=1<<4,
00107 QUEUE_UNCHANGED=1<<5,
00108 } QueueMode;
00109
00113 typedef enum TOS {
00114 TOS_LOWDELAY = IPTOS_LOWDELAY,
00115 TOS_THROUGHPUT = IPTOS_THROUGHPUT,
00116 TOS_RELIABILITY = IPTOS_RELIABILITY,
00117 TOS_LOWCOST = IPTOS_LOWCOST,
00118 } TOS;
00119
00124 typedef enum SetOption {
00126 SET_NOW = TCSANOW,
00127
00133 SET_FLUSH = TCSAFLUSH,
00134
00139 SET_DRAIN = TCSADRAIN
00140 } SetOption;
00141
00145 typedef enum Parity {
00146 PARITY_NONE,
00147 PARITY_ODD,
00148 PARITY_EVEN,
00149 } Parity;
00150
00154 typedef enum ParityError {
00155 PARITY_ERROR_DISCARD,
00156 PARITY_ERROR_MARK,
00157 PARITY_ERROR_ZERO,
00158 PARITY_ERROR_IGNORE,
00159 } ParityError;
00160
00164 typedef enum FlowControl {
00165 FLOW_NONE,
00166 FLOW_HARDWARE,
00167 FLOW_SOFTWARE,
00168 FLOW_CUSTOM,
00169 } FlowControl;
00170
00171 }
00172
00173 #endif