X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/de0f72b065f83042e6933b63487eb8124e643990..ad2bab318ec1271ae520606259c962382a519f0d:/lib/base/filepush.h?ds=inline diff --git a/lib/base/filepush.h b/lib/base/filepush.h index a419d719..7e16fa02 100644 --- a/lib/base/filepush.h +++ b/lib/base/filepush.h @@ -2,9 +2,17 @@ #define __lib_base_filepush_h #include +#include +#include #include -class eFilePushThread: public eThread +class iFilePushScatterGather +{ +public: + virtual void getNextSourceSpan(size_t bytes_read, off_t &start, size_t &size)=0; +}; + +class eFilePushThread: public eThread, public Object { public: eFilePushThread(); @@ -18,12 +26,25 @@ public: /* flushes the internal readbuffer */ void flush(); + void enablePVRCommit(int); + + void setSG(iFilePushScatterGather *); + + enum { evtEOF, evtReadError, evtWriteError }; + Signal1 m_event; private: + iFilePushScatterGather *m_sg; int m_stop; unsigned char m_buffer[65536]; int m_buf_start, m_buf_end; int m_fd_source, m_fd_dest; + int m_send_pvr_commit; + + eFixedMessagePump m_messagepump; + + void sendEvent(int evt); + void recvEvent(const int &evt); }; #endif