debian/libconexus-dev/usr/include/conexus-0.5/conexus/enums.h

00001 /***************************************************************************
00002 *   Copyright (C) 2001 by Rick L. Vinyard, Jr.                            *
00003 *   rvinyard@cs.nmsu.edu                                                  *
00004 *                                                                         *
00005 *   This program is free software; you can redistribute it and/or modify  *
00006 *   it under the terms of the GNU Lesser General Public License as        *
00007 *   published by the Free Software Foundation version 2.1.                *
00008 *                                                                         *
00009 *   This program is distributed in the hope that it will be useful,       *
00010 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012 *   GNU General Public License for more details.                          *
00013 *                                                                         *
00014 *   You should have received a copy of the GNU Lesser General Public      *
00015 *   License along with this library; if not, write to the                 *
00016 *   Free Software Foundation, Inc.,                                       *
00017 *   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA              *
00018 ***************************************************************************/
00019 #ifndef CONEXUSENUMS_H
00020 #define CONEXUSENUMS_H
00021 
00022 #include <netinet/ip.h>
00023 
00024 namespace Conexus {
00025 
00026 //   typedef enum ReadWrite {
00027 //     READ      = 0x01,
00028 //     WRITE     = 0x02,
00029 //     READWRITE = 0x03
00030 //   } ReadWrite;
00031 
00032   typedef enum IPAddressPort {
00033     IP_ADDRESS = 0x01,
00034     IP_PORT    = 0x02
00035   } IPAddressPort;
00036 
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 
00051   typedef enum SocketState {
00052     SOCKET_BOUND     = ENDPOINT_LAST_STATE << 1,  
00053     SOCKET_CONNECTED = ENDPOINT_LAST_STATE << 2,  
00054     SOCKET_LISTENING = ENDPOINT_LAST_STATE << 3,  
00055     SOCKET_ACCEPTED  = ENDPOINT_LAST_STATE << 4,  
00056     SOCKET_LAST_STATE  = SOCKET_ACCEPTED,
00057   } SocketState;
00058 
00059   typedef enum SerialMode {
00060     SERIAL_READ=1<<0,
00061     SERIAL_WRITE=1<<1,
00062     SERIAL_UNCHANGED=1<<2,
00063   } SerialMode;
00064 
00065   typedef enum PipeMode {
00066     PIPE_READ=ENDPOINT_LAST_STATE<<1,           
00067     PIPE_WRITE=ENDPOINT_LAST_STATE<<2,            
00068   } PipeMode;
00069 
00070   typedef enum FileMode {
00071     FILE_READ=1<<0,
00072     FILE_WRITE=1<<1,
00073     FILE_APPEND=1<<2,
00074     FILE_CREATE=1<<3,
00075     FILE_DIRECT=1<<4,
00076     FILE_LARGE_FILE=1<<5,
00077     FILE_NO_ACCESS_TIME=1<<6,
00078     FILE_NO_FOLLOW=1<<7,
00079     FILE_TRUNCATE=1<<8,
00080     FILE_EXCLUSIVE_CREATE=1<<9,
00081     FILE_UNCHANGED=1<<10,
00082   } FileMode;
00083 
00084   typedef enum TOS {
00085     TOS_LOWDELAY = IPTOS_LOWDELAY,       
00086     TOS_THROUGHPUT = IPTOS_THROUGHPUT,   
00087     TOS_RELIABILITY = IPTOS_RELIABILITY, 
00088     TOS_LOWCOST = IPTOS_LOWCOST,         
00089   } TOS;
00090 
00091 }
00092 
00093 #endif

Generated on Tue Mar 13 19:54:43 2007 by  doxygen 1.5.1