X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FWriteHelper.hh;h=3b042a7e50f6a87568dd991a9c380df8968be573;hb=3863d46dd898b7bc35ea8c6ccd8563b18762a6b6;hp=998ae79f746364df90fd9a6c56dacf4acbf16117;hpb=98f3f38c5872d26fcf544a9d28efe0518e3895e2;p=senf.git diff --git a/Scheduler/WriteHelper.hh b/Scheduler/WriteHelper.hh index 998ae79..3b042a7 100644 --- a/Scheduler/WriteHelper.hh +++ b/Scheduler/WriteHelper.hh @@ -21,14 +21,14 @@ /** \file \brief WriteHelper public header */ -#ifndef HH_WriteHelper_ -#define HH_WriteHelper_ 1 +#ifndef HH_SENF_Scheduler_WriteHelper_ +#define HH_SENF_Scheduler_WriteHelper_ 1 // Custom includes #include #include #include -#include "Utils/intrusive_refcount.hh" +#include "../Utils/intrusive_refcount.hh" #include "Scheduler.hh" //#include "WriteHelper.mpp" @@ -65,7 +65,7 @@ namespace senf { ///\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 @@ -73,7 +73,7 @@ namespace senf { \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 */ ///@} @@ -95,17 +95,19 @@ namespace senf { 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_; }; @@ -126,4 +128,6 @@ namespace senf { // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: