00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_INTERNAL_NET_URITYPE_H_
00019 #define _DECAF_INTERNAL_NET_URITYPE_H_
00020
00021 #include <string>
00022 #include <decaf/util/Config.h>
00023
00024 namespace decaf {
00025 namespace internal {
00026 namespace net {
00027
00031 class DECAF_API URIType {
00032 private:
00033
00034 std::string source;
00035 std::string scheme;
00036 std::string schemeSpecificPart;
00037 std::string authority;
00038 std::string userinfo;
00039 std::string host;
00040 int port;
00041 std::string path;
00042 std::string query;
00043 std::string fragment;
00044 bool opaque;
00045 bool absolute;
00046 bool serverAuthority;
00047 bool valid;
00048
00049 public:
00050
00051 URIType( const std::string& source ) : source( source ),
00052 scheme(),
00053 schemeSpecificPart(),
00054 authority(),
00055 userinfo(),
00056 host(),
00057 port( -1 ),
00058 path(),
00059 query(),
00060 fragment(),
00061 opaque( false ),
00062 absolute( false ),
00063 serverAuthority( false ),
00064 valid( false ) {
00065 }
00066
00067 URIType() : source(),
00068 scheme(),
00069 schemeSpecificPart(),
00070 authority(),
00071 userinfo(),
00072 host(),
00073 port( -1 ),
00074 path(),
00075 query(),
00076 fragment(),
00077 opaque( false ),
00078 absolute( false ),
00079 serverAuthority( false ),
00080 valid( false ) {
00081 }
00082
00083 virtual ~URIType() {}
00084
00090 std::string getSource() const {
00091 return this->source;
00092 }
00093
00099 void setSource( const std::string& source ) {
00100 this->source = source;
00101 }
00102
00107 std::string getScheme() const {
00108 return scheme;
00109 }
00110
00115 void setScheme( const std::string& scheme ) {
00116 this->scheme = scheme;
00117 }
00118
00123 std::string getSchemeSpecificPart() const {
00124 return schemeSpecificPart;
00125 }
00126
00131 void setSchemeSpecificPart( const std::string& schemeSpecificPart ) {
00132 this->schemeSpecificPart = schemeSpecificPart;
00133 }
00134
00139 std::string getAuthority() const {
00140 return authority;
00141 }
00142
00147 void setAuthority( const std::string& authority ) {
00148 this->authority = authority;
00149 }
00150
00156 std::string getUserInfo() const {
00157 return userinfo;
00158 }
00159
00165 void setUserInfo( const std::string& userinfo ) {
00166 this->userinfo = userinfo;
00167 }
00168
00173 std::string getHost() const {
00174 return host;
00175 }
00176
00181 void setHost( const std::string& host ) {
00182 this->host = host;
00183 }
00184
00189 int getPort() const {
00190 return port;
00191 }
00192
00197 void setPort( int port ) {
00198 this->port = port;
00199 }
00200
00205 std::string getPath() const {
00206 return path;
00207 }
00208
00213 void setPath( const std::string& path ) {
00214 this->path = path;
00215 }
00216
00221 std::string getQuery() const {
00222 return query;
00223 }
00224
00229 void setQuery( const std::string& query ) {
00230 this->query = query;
00231 }
00232
00237 std::string getFragment() const {
00238 return fragment;
00239 }
00240
00245 void setFragment( const std::string& fragment ) {
00246 this->fragment = fragment;
00247 }
00248
00253 bool isOpaque() const {
00254 return opaque;
00255 }
00256
00261 void setOpaque( bool opaque ) {
00262 this->opaque = opaque;
00263 }
00264
00269 bool isAbsolute() const {
00270 return absolute;
00271 }
00272
00277 void setAbsolute( bool absolute ) {
00278 this->absolute = absolute;
00279 }
00280
00285 bool isServerAuthority() const {
00286 return serverAuthority;
00287 }
00288
00293 void setServerAuthority( bool serverAuthority ) {
00294 this->serverAuthority = serverAuthority;
00295 }
00296
00302 bool isValid() const {
00303 return valid;
00304 }
00305
00311 void setValid( bool valid ) {
00312 this->valid = valid;
00313 }
00314
00315 };
00316
00317 }}}
00318
00319 #endif