BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
be034cc
Branches
Tags
master
Blinker
src
noarch
SenderDest.h
sender static destination now own class
Stefan Schuermans
commited
be034cc
at 2011-11-22 22:13:20
SenderDest.h
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef SENDERDEST_H #define SENDERDEST_H #include <string> #include "Directory.h" #include "File.h" #include "Module.h" #include "Sender.h" #include "SettingFile.h" namespace Blinker { /// static destination of a stream sender template<typename ADDR, typename SOCK> class Sender<ADDR, SOCK>::Dest { public: /** * @brief constructor * @param[in] sender owning sender object * @param[in] dirBase base directory * @param[in] pNoFrameData protocol data for "no frame" packet */ Dest(Sender &sender, const Directory &dirBase, const std::string *pNoFrameData); /// destructor ~Dest(); private: /// copy constructor disabled Dest(const Dest &that); /// assignment operator disabled const Dest & operator=(const Dest &that); public: /// check for update of configuration void updateConfig(); /** * @brief set current protocol data * @param[in] pData protocol data to send to address */ void setProtoData(const std::string *pData); protected: /// (re-)get address void getAddr(); /** * @brief send protocol data to address * @param[in] pData protocol data to send to address */ void send(const std::string *pData); protected: Sender &m_sender; ///< owning sender object SettingFile m_fileAddr; ///< address file ADDR m_addr; ///< address bool m_haveAddr; ///< if address is available const std::string *m_pNoFrameData; ///< protocol data for "no frame" packet const std::string *m_pData; ///< protocol data to send to address }; // class Sender<ADDr, SOCK>::Dest } // namespace Blinker #endif // #ifndef SENDERDEST_H