00001 /* 00002 * $Id: RawOutputStream.h 562 2007-12-02 08:04:16Z mindstorm2600 $ 00003 * 00004 * X-VR2 00005 * 00006 * Copyright (C) Juan V. Guerrero 2007 00007 * 00008 * Juan V. Guerrero <mindstorm2600@users.sourceforge.net> 00009 * 00010 * This program is free software, distributed under the terms of 00011 * the GNU General Public License Version 2. See the LICENSE file 00012 * at the top of the source tree. 00013 */ 00014 #ifndef __XVR2_RAW_OUTPUT_STREAM_H__ 00015 #define __XVR2_RAW_OUTPUT_STREAM_H__ 00016 #include<xvr2/StreamInterface.h> 00017 #include<xvr2/RawStreamInterface.h> 00018 #include<xvr2/SystemException.h> 00019 00020 namespace xvr2 { 00022 class RawOutputStream : public WriteableStream, public RawStreamInterface { 00023 public: 00024 RawOutputStream(); 00025 virtual ~RawOutputStream(); 00026 RawOutputStream(int __fd); 00027 RawOutputStream(const String &fname); 00028 void open(int __fd); 00029 void open(const String &fname); 00030 virtual void close(); 00031 00032 int fd(); 00033 virtual RawOutputStream &write(void *data, UInt32 size); 00034 virtual void flush(); 00035 FileSizeT size(); 00036 bool eof(); 00037 virtual bool ready(int timeout = 100); 00038 }; 00039 } 00040 #endif 00041