ScummVM API documentation
Networking::URL Class Referenceabstract
Inheritance diagram for Networking::URL:
Networking::AndroidURL Networking::CurlURL

Public Member Functions

virtual Common::String getScheme () const =0
 
virtual Common::String getHost () const =0
 
virtual int getPort (bool returnDefault=false) const =0
 

Static Public Member Functions

static URLparseURL (const Common::String &url)
 

Member Function Documentation

◆ parseURL()

static URL* Networking::URL::parseURL ( const Common::String url)
static

Parses an URL string and creates a new URL object.

Parameters
urlis a string containing the URL. e.g. "https://scummvm.org".
Return values
AnURL object from the url provided

◆ getScheme()

virtual Common::String Networking::URL::getScheme ( ) const
pure virtual

Extracts the scheme of an URL parsed previously by parseURL.

Return values
Stringof the URL's scheme. e.g. "https".
Emptystring on failure.

Implemented in Networking::AndroidURL, and Networking::CurlURL.

◆ getHost()

virtual Common::String Networking::URL::getHost ( ) const
pure virtual

Extracts the host name of an URL parsed previously by parseURL.

Return values
Stringof the URL's host name. e.g. "scummvm.org".
Emptystring on failure.

Implemented in Networking::AndroidURL, and Networking::CurlURL.

◆ getPort()

virtual int Networking::URL::getPort ( bool  returnDefault = false) const
pure virtual

Extracts the port of an URL parsed previously by parseURL.

Parameters
returnDefaulttells libcurl to return the default port according to the URL's scheme if not explicitly defined
Return values
TheURL's port number if one exists.
0if no port found.
defaultport if returnDefault is true.
-1on failure.

Implemented in Networking::AndroidURL, and Networking::CurlURL.


The documentation for this class was generated from the following file: