url.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef URL_H_
00023 #define URL_H_
00024
00025 #include <string>
00026
00027 #include <dcl/exception.h>
00028
00029 namespace dbp {
00030
00032
00039 class url {
00040 public:
00042 std::string scheme;
00044 std::string user;
00046 std::string password;
00048 std::string host;
00050 int port;
00052 std::string path;
00054 std::string query;
00056 std::string fragment;
00058 std::string parameters;
00060 url();
00062
00066 url(const std::string &value);
00068
00072 url(const char *value);
00074
00078 void parse(const std::string &value);
00080
00083 void copy_from(const url &u);
00085 std::string get_full_path() const;
00087
00088
00089
00090
00091 void normalize(const std::string &base_path);
00093 std::string encode(const std::string &value) const;
00095 std::string decode(const std::string &value) const;
00097 std::string str() const;
00098 };
00099
00100 }
00101
00102 #endif