X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/4a594e382e063bc9f313683d2bd6c679cbad0e9a..036d2ec4dc7a66f9d591c00f65fa54bbddb24769:/lib/base/filepush.h diff --git a/lib/base/filepush.h b/lib/base/filepush.h index f2bd98be..f47d8e99 100644 --- a/lib/base/filepush.h +++ b/lib/base/filepush.h @@ -6,6 +6,13 @@ #include #include +class iFilePushScatterGather +{ +public: + virtual void getNextSourceSpan(off_t current_offset, size_t bytes_read, off_t &start, size_t &size)=0; + virtual ~iFilePushScatterGather() {} +}; + class eFilePushThread: public eThread, public Object { public: @@ -22,10 +29,15 @@ public: void flush(); void enablePVRCommit(int); - enum { evtEOF, evtReadError, evtWriteError }; - Signal1 m_event; + void setScatterGather(iFilePushScatterGather *); + enum { evtEOF, evtReadError, evtWriteError, evtUser }; + Signal1 m_event; + + /* you can send private events if you want */ + void sendEvent(int evt); private: + iFilePushScatterGather *m_sg; int m_stop; unsigned char m_buffer[65536]; int m_buf_start, m_buf_end; @@ -34,7 +46,6 @@ private: eFixedMessagePump m_messagepump; - void sendEvent(int evt); void recvEvent(const int &evt); };