13 #define RC_DEFAULT_PORT 389
14 #define HTTP_DEFAULT_PORT 80
15 #define HTTPS_DEFAULT_PORT 443
16 #define HTTPG_DEFAULT_PORT 8443
17 #define LDAP_DEFAULT_PORT 389
18 #define FTP_DEFAULT_PORT 21
19 #define GSIFTP_DEFAULT_PORT 2811
20 #define LFC_DEFAULT_PORT 5010
21 #define XROOTD_DEFAULT_PORT 1094
95 URL(
const std::string& url,
bool encoded =
false);
102 base, onelevel, subtree
112 const std::string&
Protocol()
const;
118 const std::string&
Username()
const;
121 const std::string&
Passwd()
const;
124 const std::string&
Host()
const;
136 const std::string&
Path()
const;
150 void ChangeFullPath(
const std::string& newpath,
bool encoded =
false);
153 const std::map<std::string, std::string>&
HTTPOptions()
const;
160 const std::string&
HTTPOption(
const std::string& option,
161 const std::string& undefined =
"")
const;
166 bool AddHTTPOption(
const std::string& option,
const std::string& value,
167 bool overwrite =
true);
192 const std::map<std::string, std::string>&
Options()
const;
199 const std::string&
Option(
const std::string& option,
200 const std::string& undefined =
"")
const;
211 const std::string& undefined =
"")
const;
220 bool AddOption(
const std::string& option,
const std::string& value,
221 bool overwrite =
true);
227 bool AddOption(
const std::string& option,
bool overwrite =
true);
231 bool overwrite =
true);
237 const std::list<URLLocation>&
Locations()
const;
249 undefined =
"")
const;
260 virtual std::string
str(
bool encode =
false)
const;
263 virtual std::string
plainstr(
bool encode =
false)
const;
266 virtual std::string
fullstr(
bool encode =
false)
const;
278 operator bool()
const;
287 std::map<std::string, std::string>
ParseOptions(
const std::string& optstring,
288 char separator,
bool encoded =
false);
294 static std::string
OptionString(
const std::map<std::string,
295 std::string>& options,
char separator,
bool encode =
false);
355 static std::string
BaseDN2Path(
const std::string&);
358 static std::string
Path2BaseDN(
const std::string&);
361 friend std::ostream&
operator<<(std::ostream& out,
const URL& u);
389 URLLocation(
const std::map<std::string, std::string>& options,
390 const std::string& name);
396 const std::string&
Name()
const;
399 virtual std::string
str()
const;
402 virtual std::string
fullstr()
const;
418 PathIterator(
const std::string& path,
bool end =
false);
428 operator bool()
const;
434 std::string
Rest()
const;
437 const std::string& path;
438 std::string::size_type pos;
449 #endif // __ARC_URL_H__