/* */ #include "Command.h" #include "LogFactory.h" #include "Logger.h" namespace aria2 { Command::Command(cuid_t cuid):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) { 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