BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
69ac12f
Branches
Tags
master
Blinker
src
noarch
OpPrinter.cpp
make modules know their name
Stefan Schuermans
commited
69ac12f
at 2011-12-22 19:41:00
OpPrinter.cpp
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 */ #include <iostream> #include <string> #include "Directory.h" #include "File.h" #include "Mgrs.h" #include "Module.h" #include "OpConn.h" #include "OpConnIf.h" #include "OpMgr.h" #include "OpPrinter.h" #include "OpReqIf.h" namespace Blinker { /** * @brief constructor * @param[in] name module name * @param[in] mgrs managers * @param[in] dirBase base directory */ OpPrinter::OpPrinter(const std::string &name, Mgrs &mgrs, const Directory &dirBase): Module(name, mgrs, dirBase) { m_mgrs.m_opMgr.open("TODO", this); } /// virtual destructor OpPrinter::~OpPrinter() { m_mgrs.m_opMgr.close("TODO"); } /// check for update of configuration void OpPrinter::updateConfig() { // nothing to do here for this module } /** * @brief check if accepting new operator connction is possible * @param[in] name operator interface name * @return if accepting new connection is possible */ bool OpPrinter::acceptNewOpConn(const std::string &name) { return true; // accept all connections (void)name; // unused } /** * @brief new operator connection * @param[in] name operator interface name * @param[in] pConn operator connection object */ void OpPrinter::newOpConn(const std::string &name, OpConn *pConn) { std::cout << "new connection " << pConn << std::endl; (void)name; // unused } /** * @brief operator connection is closed * @param[in] pConn operator connection object */ void OpPrinter::opConnClose(OpConn *pConn) { std::cout << "connection " << pConn << " closed" << std::endl; } } // namespace Blinker