/* */ #include "Command.h" #include "LogFactory.h" #include "Logger.h" namespace aria2 { int32_t Command::uuidGen = 0; Command::Command(int32_t cuid):uuid(uuidGen++), status(STATUS_INACTIVE), cuid(cuid), logger(LogFactory::getInstance()), _readEvent(false), _writeEvent(false), _errorEvent(false), _hupEvent(false) {} void Command::transitStatus() { switch(status) { case STATUS_REALTIME: break; default: status = STATUS_INACTIVE; } } void Command::setStatus(STATUS status) { this->status = status; } void Command::readEventReceived() { _readEvent = true; } void Command::writeEventReceived() { _writeEvent = true; } void Command::errorEventReceived() { _errorEvent = true; } void Command::hupEventReceived() { _hupEvent = true; } void Command::clearIOEvents() { _readEvent = false; _writeEvent = false; _errorEvent = false; _hupEvent = false; } } // namespace aria2