/* */ #ifndef D_URI_H #define D_URI_H #include "common.h" #include #include "A2STR.h" namespace aria2 { namespace uri { struct UriStruct { std::string protocol; std::string host; uint16_t port; std::string dir; std::string file; std::string query; std::string username; std::string password; bool hasPassword; bool ipv6LiteralAddress; UriStruct():port(0), hasPassword(false), ipv6LiteralAddress(false) {} }; // Splits URI uri into components and stores them into result. On // success returns true. Otherwise returns false and result is // undefined. bool parse(UriStruct& result, const std::string& uri); } // namespace uri } // namespace aria2 #endif // D_URI_H