BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
3534d9a
Branches
Tags
master
Blinker
src
noarch
PriorityInput.h
simplified interface of getCurFrame mehtods
Stefan Schuermans
commited
3534d9a
at 2011-12-04 14:57:24
PriorityInput.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 PRIORITYINPUT_H #define PRIORITYINPUT_H #include <string> #include <BlinkenLib/BlinkenFrame.h> #include "File.h" #include "Priority.h" #include "SettingFile.h" #include "StreamMgr.h" #include "StreamRecv.h" namespace Blinker { /// input to priority based selector class Priority::Input: public StreamRecv { public: /** * @brief constructor * @param[in] priority owning priority based selector * @param[in] name name of input (i.e. priority) * @param[in] dirBase base directory */ Input(Priority &priority, const std::string &name, const Directory &dirBase); /// virtual destructor virtual ~Input(); private: /// copy constructor disabled Input(const Input &that); /// assignment operator disabled const Input & operator=(const Input &that); public: /// check for update of configuration void updateConfig(); /** * @brief set current frame * @param[in] stream stream name * @param[in] pFrame current frame (NULL for none) */ virtual void setFrame(const std::string &stream, stBlinkenFrame *pFrame); /** * @brief get current frame * @return current frame (NULL if none) */ stBlinkenFrame * getCurFrame(); protected: /// get input stream and attach to it void getInStream(); /// detach from input stream and release it void releaseInStream(); /** * @brief set current frame * @param[in] pFrame current frame (NULL for none) */ void frame(stBlinkenFrame *pFrame); protected: Priority &m_priority; ///< owning priority based selector std::string m_name; ///< name of input (i.e. priority) SettingFile m_fileInStream; ///< input stream name file std::string m_nameInStream; ///< name of input stream Stream *m_pInStream; ///< input stream stBlinkenFrame *m_pFrame; ///< current frame }; // class Priority::Input } // namespace Blinker #endif // #ifndef PRIORITYINPUT_H