/* */ #ifndef D_PARSER_STATE_MACHINE_H #define D_PARSER_STATE_MACHINE_H #include "common.h" #include #include namespace aria2 { struct XmlAttr; class ParserStateMachine { public: virtual ~ParserStateMachine() = default; virtual bool needsCharactersBuffering() const = 0; virtual bool finished() const = 0; virtual void beginElement(const char* localname, const char* prefix, const char* nsUri, const std::vector& attrs) = 0; virtual void endElement(const char* localname, const char* prefix, const char* nsUri, std::string characters) = 0; // Resets internal state of the object and make it ready for new // parser session. virtual void reset() = 0; }; } // namespace aria2 #endif // D_PARSER_STATE_MACHINE_H