/* */ #include "SizeMetalinkParserState.h" #include "MetalinkParserStateMachine.h" #include "Util.h" #include "RecoverableException.h" namespace aria2 { void SizeMetalinkParserState::beginElement(MetalinkParserStateMachine* stm, const std::string& name, const std::map& attrs) { stm->setSkipTagState(this); } void SizeMetalinkParserState::endElement(MetalinkParserStateMachine* stm, const std::string& name, const std::string& characters) { try { stm->setFileLengthOfEntry(Util::parseLLInt(characters)); } catch(RecoverableException& e) { // current metalink specification doesn't require size element. } stm->setFileState(); } } // namespace aria2