demux_pfileio.hpp

00001 #line 325 "./lpsrc/flx_posix_demux.ipk"
00002 #ifndef __FLX_DEMUX_PFILEIO_H__
00003 #define __FLX_DEMUX_PFILEIO_H__
00004 #include <flx_demux_config.hpp>
00005 
00006 #include "demux_demuxer.hpp"
00007 #include "pthread_sleep_queue.hpp"
00008 #include "pthread_mutex.hpp"
00009 // #include <sys/types.h> // off_t (don't have flx iface to this yet)
00010               // can just add new constructor
00011 #include "pthread_work_fifo.hpp"
00012 namespace flx { namespace demux {
00013 
00014 // ********************************************************
00015 /// like another event source. this is basically a wrapped pread, pwrite
00016 /// should probably be derived from posix_wakeup or something like that.
00017 /// or have the same signature. abstract - users overload "finished
00018 // ********************************************************
00019 class DEMUX_EXTERN fileio_request : public flx::pthread::worker_task
00020 {
00021   long    offset;   // make this a proper offset (64bit)
00022   // off_t    offset; // in: offset, for use with pread, pwrite
00023   int     fd;     // in: fd in question
00024   bool    read_flag;  // in: read else write
00025 
00026   int     err;    // out:
00027 public:
00028   // public so it can be got in felix
00029   sel_param pb;   // in & out: what you want, what you get (64bit len?)
00030 
00031   virtual ~fileio_request(); // c++ should do this automatically
00032   fileio_request();       // flx linkage
00033   fileio_request(int f, char* buf, long len, long off, bool rd);
00034 
00035   virtual void doit();      // sync
00036 };
00037 
00038 }} // namespace demux, flx
00039 #endif  // __PFILEIO__
00040 

Generated on Mon Dec 24 04:04:21 2007 for Felix by  doxygen 1.5.4