29 #ifndef Pt_System_Uri_h
30 #define Pt_System_Uri_h
32 #include <Pt/System/Api.h>
41 class PT_SYSTEM_API InvalidUri :
public std::runtime_error
44 InvalidUri(
const std::string& uri);
49 const std::string uri()
const
57 class PT_SYSTEM_API Uri
65 Uri(
const std::string& str);
67 void protocol(
const std::string& protocol)
68 { _protocol = protocol; }
70 const std::string& protocol()
const
73 void user(
const std::string& user)
76 const std::string& user()
const
79 void password(
const std::string& password)
80 { _password = password; }
82 const std::string& password()
const
85 void host(
const std::string& host)
88 const std::string& host()
const
91 void port(
unsigned short int p)
94 unsigned short int port()
const
97 void path(
const std::string& path)
100 const std::string& path()
const
103 void query(
const std::string& query)
106 const std::string& query()
const
109 void fragment(
const std::string& fragment)
110 { _fragment = fragment; }
112 const std::string& fragment()
const
113 {
return _fragment; }
115 std::string str()
const;
118 std::string _protocol;
120 std::string _password;
122 unsigned short int _port;
126 std::string _fragment;
133 #endif // Pt_System_Uri_h