00001
00002
00003
00004 #ifndef DMLITE_CPP_UTILS_URLS_H
00005 #define DMLITE_CPP_UTILS_URLS_H
00006
00007 #include <string>
00008 #include <vector>
00009
00010 namespace dmlite {
00011
00012 struct Url {
00013 std::string scheme;
00014 std::string domain;
00015 unsigned port;
00016 std::string path;
00017 std::string query;
00018
00019 explicit Url(const std::string& url) throw ();
00020
00021
00022 bool operator == (const Url&) const;
00023 bool operator != (const Url&) const;
00024 bool operator < (const Url&) const;
00025 bool operator > (const Url&) const;
00026
00027
00028
00029
00030 static std::vector<std::string> splitPath(const std::string& path) throw ();
00031
00032
00033 static std::string joinPath(const std::vector<std::string>& components) throw();
00034
00035
00036 static std::string normalizePath(const std::string& path) throw ();
00037 };
00038
00039 };
00040
00041 #endif // DMLITE_CPP_UTILS_URLS_H