/** @file * @author Edouard DUPIN * @copyright 2011, Edouard DUPIN, all right reserved * @license APACHE v2.0 (see license file) */ #ifndef __AIRT_ALGO_END_POINT_CALLBACK_H__ #define __AIRT_ALGO_END_POINT_CALLBACK_H__ #include #include namespace drain { typedef std11::function& _map)> playbackFunction; typedef std11::function& _map)> recordFunction; class EndPointCallback : public EndPoint { private: playbackFunction m_outputFunction; recordFunction m_inputFunction; protected: /** * @brief Constructor */ EndPointCallback(); void init(playbackFunction _callback); void init(recordFunction _callback); public: static std11::shared_ptr create(playbackFunction _callback); static std11::shared_ptr create(recordFunction _callback); /** * @brief Destructor */ virtual ~EndPointCallback() {}; virtual void configurationChange(); virtual bool process(std11::chrono::system_clock::time_point& _time, void* _input, size_t _inputNbChunk, void*& _output, size_t& _outputNbChunk); }; }; #endif