Index: src/libchcore/TBufferList.h =================================================================== diff -u -N -r6c41e7b3cf7711c6f5027c0c0154013f50f08e7b -r593ca68706f3a3c7c2a3820b02a56fc24d5bea11 --- src/libchcore/TBufferList.h (.../TBufferList.h) (revision 6c41e7b3cf7711c6f5027c0c0154013f50f08e7b) +++ src/libchcore/TBufferList.h (.../TBufferList.h) (revision 593ca68706f3a3c7c2a3820b02a56fc24d5bea11) @@ -20,6 +20,7 @@ #define __TBUFFERLIST_H__ #include +#include "TEvent.h" namespace chcore { @@ -38,11 +39,20 @@ size_t GetCount() const; bool IsEmpty() const; + void SetExpectedBuffers(size_t stExpectedBuffers) { m_stExpectedBuffers = stExpectedBuffers; } + HANDLE GetAllBuffersAccountedForEvent() const { return m_eventAllBuffersAccountedFor.Handle(); } + boost::signals2::signal& GetNotifier(); private: + void UpdateEvent(); + + private: + size_t m_stExpectedBuffers = 0; // count of buffers there should be in m_listBuffers when no buffer is in use std::list m_listBuffers; + boost::signals2::signal m_notifier; + TEvent m_eventAllBuffersAccountedFor; }; using TBufferListPtr = std::shared_ptr;