sprint 1-alpha
|
00001 /****************************************************************************** 00002 * sprint::io 00003 * 00004 * Copyright (C) 2005-2011 Paolo Medici <www.pmx.it> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 * 00020 *******************************************************************************/ 00021 00026 #ifndef _IO_TYPE_H 00027 #define _IO_TYPE_H 00028 00029 namespace sprint { 00030 00031 namespace io { 00032 00034 enum flag_t { 00035 def = 0, 00036 read = 1, 00037 write = 2, 00038 readwrite = 3, 00039 append = 4, 00040 create = 8 00041 }; 00042 00044 enum state_t { 00045 unimplemented = 2, 00046 eof = -1, 00047 good = 0, 00048 error = 1 00049 }; 00050 00052 enum seek_t { 00053 start = 0, 00054 cur = 1, 00055 end = 2 00056 }; 00057 00059 enum caps_t { 00060 can_read = 1 << 0, 00061 can_write = 1 << 1, 00062 can_seek = 1 << 2, 00063 can_size = 1 << 3, 00064 }; 00065 00066 00068 typedef int file_size_t; 00069 00071 // typedef int file_size_t; 00072 00073 } 00074 00075 } 00076 00077 #endif