/* */ #ifndef D_XML_RPC_REQUEST_PARSER_STATE_MACHINE_H #define D_XML_RPC_REQUEST_PARSER_STATE_MACHINE_H #include "ParserStateMachine.h" #include #include #include namespace aria2 { class ValueBase; namespace rpc { class XmlRpcRequestParserController; class XmlRpcRequestParserState; class XmlRpcRequestParserStateMachine : public ParserStateMachine { public: XmlRpcRequestParserStateMachine(); virtual ~XmlRpcRequestParserStateMachine(); virtual bool needsCharactersBuffering() const CXX11_OVERRIDE; virtual bool finished() const CXX11_OVERRIDE; virtual void beginElement(const char* localname, const char* prefix, const char* nsUri, const std::vector& attrs) CXX11_OVERRIDE; virtual void endElement(const char* localname, const char* prefix, const char* nsUri, std::string characters) CXX11_OVERRIDE; virtual void reset() CXX11_OVERRIDE; void setMethodName(std::string methodName); const std::string& getMethodName() const; void popArrayFrame(); void popStructFrame(); void pushFrame(); void setCurrentFrameValue(std::unique_ptr value); const std::unique_ptr& getCurrentFrameValue() const; std::unique_ptr popCurrentFrameValue(); void setCurrentFrameName(std::string name); void pushUnknownElementState(); void pushMethodCallState(); void pushMethodNameState(); void pushParamsState(); void pushParamState(); void pushValueState(); void pushIntState(); void pushStringState(); void pushBase64State(); void pushStructState(); void pushMemberState(); void pushNameState(); void pushArrayState(); void pushDataState(); void pushArrayValueState(); private: std::stack stateStack_; XmlRpcRequestParserController* controller_; }; } // namespace rpc } // namespace aria2 #endif // D_XML_RPC_REQUEST_PARSER_STATE_MACHINE_H