00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __WEURL_H__
00021 #define __WEURL_H__
00022
00023 #include <string>
00024 #include "weiBase.h"
00025
00026 using namespace std;
00027
00036 class WeURL
00037 {
00038 public:
00039 WeURL();
00040 WeURL(const string url);
00041 WeURL(const WeURL& url);
00042 ~WeURL();
00043
00044 WeURL& operator=(const string url) { Assign(url); return *this; };
00045 WeURL& operator=(const WeURL& url);
00046
00047 string& ToString(bool noDefPort = true);
00048 void Assign(string url);
00049 void Restore(string url, WeURL* base = NULL);
00050
00051 bool IsValid(void);
00052
00053 string protocol;
00054 string host;
00055 unsigned port;
00056 string request;
00057 string params;
00058 string username;
00059 string password;
00060
00061 #ifndef __DOXYGEN__
00062 protected:
00063 bool valid;
00064 #endif //__DOXYGEN__
00065 private:
00066 DECLARE_SERIALIZATOR
00067 {
00068 ar & BOOST_SERIALIZATION_NVP(protocol);
00069 ar & BOOST_SERIALIZATION_NVP(host);
00070 ar & BOOST_SERIALIZATION_NVP(port);
00071 ar & BOOST_SERIALIZATION_NVP(request);
00072 ar & BOOST_SERIALIZATION_NVP(params);
00073 ar & BOOST_SERIALIZATION_NVP(username);
00074 ar & BOOST_SERIALIZATION_NVP(password);
00075 };
00076 };
00077
00078 #endif //__WEURL_H__