#include <string>
#include <boost/intrusive_ptr.hpp>
#include <boost/function.hpp>
-#include "Utils/intrusive_refcount.hh"
+#include "../Utils/intrusive_refcount.hh"
#include "Scheduler.hh"
//#include "WriteHelper.mpp"
///\name Structors and default members
///@{
- static ptr dispatch(Handle handle, std::string data, Callback callback);
+ static ptr dispatch(Handle handle, std::string const & data, Callback callback);
///< Register new WriteHelper instance
/**< The registered callback will be called after all \a
data has been sent or when some error condition is
\param[in] handle file descriptor or handle providing
the Handle interface defined above.
\param[in] data data to send
- \param[in] cb callback
+ \param[in] callback callback
\returns smart pointer to new WriteHelper instance */
///@}
protected:
private:
- WriteHelper(Handle handle, std::string data, Callback callback);
+ WriteHelper(Handle handle, std::string const & data, Callback callback);
- 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,
+ senf::scheduler::FdEvent::Events event);
+ void process(Handle handle, senf::scheduler::FdEvent::Events event);
void done();
Handle handle_;
+ scheduler::FdEvent fde_;
mutable std::string data_;
Callback callback_;
- mutable std::string::size_type offset_;
+ mutable std::string::iterator offset_;
int errno_;
};
// c-file-style: "senf"
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
// End: