/** \file
\brief ReadHelper public header */
-#ifndef HH_ReadHelper_
-#define HH_ReadHelper_ 1
+#ifndef HH_SENF_Scheduler_ReadHelper_
+#define HH_SENF_Scheduler_ReadHelper_ 1
// Custom includes
#include <string>
#include <boost/intrusive_ptr.hpp>
#include <boost/scoped_ptr.hpp>
-#include "Utils/intrusive_refcount.hh"
+#include "../Utils/intrusive_refcount.hh"
#include "Scheduler.hh"
//#include "ReadHelper.mpp"
///////////////////////////////////////////////////////////////////////////
Handle handle() const; ///< Access the handle object
- unsigned maxSize() const; ///< Return maximum number of bytes to be read
+ std::string::size_type maxSize() const; ///< Return maximum number of bytes to be read
std::string const & data() const; ///< return data read
std::string const & tail() const; ///< return data read but not matched by the predicate
private:
struct InternalPredicate;
- ReadHelper(Handle handle, unsigned maxSize, InternalPredicate * predicate, Callback cb);
+ ReadHelper(Handle handle, std::string::size_type maxSize,
+ InternalPredicate * predicate, Callback cb);
- static void dispatchProcess(ptr helper, Handle handle, senf::Scheduler::EventId event);
- void process(Handle handle, senf::Scheduler::EventId event);
+ static void dispatchProcess(ptr helper, Handle handle, int event);
+ void process(Handle handle, int event);
void done();
Handle handle_;
+ scheduler::FdEvent fde_;
std::string::size_type maxSize_;
boost::scoped_ptr<InternalPredicate> predicate_;
Callback callback_;
// c-file-style: "senf"
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
// End: