Public Types | |
| enum | Scheme { http, ftp, nntp, invalid } |
Public Methods | |
| URL () | |
| Creates an empty URL. | |
| URL (const std::string &url) | |
| Creates an URL instance from a stringified absolute URL. | |
| URL (const URL &url) | |
| Creates a copy from this url. | |
| URL & | operator= (const URL &url) |
| Creates a copy from this url. | |
| void | parse (const std::string &url, bool needAbsolute=false) |
| Creates an URL instance from a stringified URL. | |
| void | navigate (const std::string &move) |
| Navigate within this URL. | |
| std::string | toString () const |
| bool | empty () const |
| Checks whether the URL is empty. | |
| const std::string & | server () const |
| The URL server host name. | |
| const int | port () const |
| The URL server TCP port. | |
| const std::string & | pathname () const |
| The full path name within the server. | |
| std::string | path () const |
| The path within the server (without the file). | |
| std::string | filename () const |
| The file within the server (may be empty). | |
| Scheme | scheme () const |
| The scheme that must be used to connect. | |
| bool | hasCredentials () const |
| Has this URL a credential specification ? | |
| const std::string & | login () const |
| The login required to access this resource. | |
| const std::string & | password () const |
| The password required to access this resource. | |
Holds both the reference to an internet server, the scheme to use when connecting and the path within the server. The URL syntax is described in RFC 1738 (http://www.w3.org/Addressing/rfc1738.txt).
This class recognised both absolute URLs ://:<host>:/<url-path> , and are optional.
And the relative URLs :<relative-url-path>
|
|
Creates an empty URL.
|
|
|
Creates an URL instance from a stringified absolute URL.
|
|
|
Creates a copy from this url.
|
|
|
Checks whether the URL is empty.
|
|
|
The file within the server (may be empty).
|
|
|
Has this URL a credential specification ?
|
|
|
The login required to access this resource. This is valid only if URL::hasCredential is true |
|
|
Navigate within this URL. The provided 'move' is a relative path to be applied to the current URL data. It must not contain any scheme or server specification. |
|
|
Creates a copy from this url.
|
|
||||||||||||
|
Creates an URL instance from a stringified URL. An absolute stringified URL will fully override the existing URL data. A relative stringified URL will 'navigate' within the existing location |
|
|
The password required to access this resource. This is valid only if URL::hasCredential is true |
|
|
The path within the server (without the file).
|
|
|
The full path name within the server.
|
|
|
The URL server TCP port.
|
|
|
The scheme that must be used to connect.
|
|
|
The URL server host name.
|
1.3-rc2