![]() |
TSDuck v3.46-4964
MPEG Transport Stream Toolkit
|
#include <tsURL.h>
Public Member Functions | |
| URL ()=default | |
| URL (const UString &path) | |
| URL (const UString &path, const URL &base) | |
| URL (const UString &path, const UString &base) | |
| void | clear () |
| UString | getFragment () const |
| Get the optional fragment after '#'. | |
| UString | getHost () const |
| Get the host name. | |
| UString | getPassword () const |
| Get the optional password. | |
| UString | getPath () const |
| Get the local path. | |
| uint16_t | getPort () const |
| Get the optional port number. | |
| UString | getQuery () const |
| const UStringToUStringMultiMap & | getQueryParameters () const |
| UString | getScheme () const |
| Get the scheme name without trailing colon. | |
| UString | getUserName () const |
| Get the optional user name part. | |
| bool | isValid () const |
| bool | sameServer (const URL &other) const |
| void | setFragment (const UString &value) |
| Set the optional fragment after '#'. | |
| void | setHost (const UString &value) |
| Set the host name. | |
| void | setPassword (const UString &value) |
| Set the optional password. | |
| void | setPath (const UString &value) |
| Set the local path. | |
| void | setPort (const uint16_t &value) |
| Set the optional port number. | |
| void | setQuery (const UString &value) |
| void | setScheme (const UString &value) |
| Set the scheme name without trailing colon. | |
| void | setURL (const UString &path) |
| void | setURL (const UString &path, const URL &base) |
| void | setURL (const UString &path, const UString &base) |
| void | setUserName (const UString &value) |
| Set the optional user name part. | |
| UString | toRelative (const URL &base, bool use_win_inet=true) const |
| UString | toRelative (const UString &base, bool use_win_inet=true) const |
| UString | toString (bool use_win_inet=true) const |
Static Public Member Functions | |
| static bool | IsURL (const UString &path) |
Representation of a Uniform Resource Locator (URL).
|
default |
Default constructor.
|
inline |
|
inline |
| void ts::URL::setURL | ( | const UString & | path | ) |
| UString ts::URL::toString | ( | bool | use_win_inet = true | ) | const |
Convert to a string object.
| [in] | use_win_inet | This boolean is used on Windows only. When true, a file URL is built as 'file://C:/dir/file' (with 2 slashes). When false, the URL is 'file:///C:/dir/file' (with 3 slashes). The latter form is the documented one from Microsoft and should be considered as the "correct" one. However, the Microsoft WinInet library (which is used by the WebRequest class) requires the incorrect form with 2 slashes. So, if the resulting URL is to be used by WebRequest, set use_win_inet to true (the default) but if the URL needs to be published somewhere, use false. |
Extract a relative URL of this object, from a base URL.
| [in] | base | The base URL to use. If this object and base share the same scheme and host specification. |
| [in] | use_win_inet | This boolean is used on Windows only. See toString() for details. |
Extract a relative URL of this object, from a base URL.
| [in] | base | The base URL to use. If this object and base share the same scheme and host specification. |
| [in] | use_win_inet | This boolean is used on Windows only. See toString() for details. |
| bool ts::URL::sameServer | ( | const URL & | other | ) | const |
|
inline |
| void ts::URL::clear | ( | ) |
Clear the content of the URL (becomes invalid).
|
inline |
Set the scheme name without trailing colon.
| [in] | value | The scheme name without trailing colon. |
|
inline |
Get the scheme name without trailing colon.
|
inline |
Set the optional user name part.
| [in] | value | The optional user name part. |
|
inline |
Get the optional user name part.
|
inline |
Set the optional password.
| [in] | value | The optional password. |
|
inline |
Get the optional password.
|
inline |
Set the host name.
| [in] | value | The host name. |
|
inline |
Get the host name.
|
inline |
Set the optional port number.
| [in] | value | The optional port number. |
|
inline |
Get the optional port number.
|
inline |
Set the local path.
| [in] | value | The local path. |
|
inline |
Get the local path.
|
inline |
Set the optional fragment after '#'.
| [in] | value | The optional fragment after '#'. |
|
inline |
Get the optional fragment after '#'.
| void ts::URL::setQuery | ( | const UString & | value | ) |
Set the optional query after '?'.
| [in] | value | The optional query after '?'. |
|
inline |
Get the optional query after '?'.
|
inline |
Set the parameters in the optional query after '?'.
|
inlinestatic |