Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CURL Class Referencefinal

#include <URL.h>

Public Member Functions

 CURL ()=default
 
 CURL (std::string strURL)
 
bool operator== (const CURL &url) const
 
void Reset ()
 
void Parse (std::string strURL)
 
void SetFileName (std::string strFileName)
 
void SetHostName (std::string strHostName)
 
void SetUserName (std::string strUserName)
 
void SetDomain (std::string strDomain)
 
void SetPassword (std::string strPassword)
 
void SetProtocol (std::string strProtocol)
 
void SetOptions (std::string strOptions)
 
void SetProtocolOptions (std::string strOptions)
 
void SetPort (int port)
 
bool HasPort () const
 
int GetPort () const
 
const std::string & GetHostName () const
 
const std::string & GetDomain () const
 
const std::string & GetUserName () const
 
const std::string & GetPassWord () const
 
const std::string & GetFileName () const
 
const std::string & GetProtocol () const
 
std::string GetTranslatedProtocol () const
 
const std::string & GetFileType () const
 
const std::string & GetShareName () const
 
const std::string & GetOptions () const
 
const std::string & GetProtocolOptions () const
 
std::string GetFileNameWithoutPath () const
 
char GetDirectorySeparator () const
 
std::string Get () const
 
std::string GetWithoutOptions () const
 
std::string GetWithoutUserDetails (bool redact=false) const
 
std::string GetWithoutFilename () const
 
std::string GetRedacted () const
 
bool IsLocal () const
 
bool IsLocalHost () const
 
bool IsProtocol (std::string_view type) const
 Check whether a URL is a given URL scheme. Comparison is case-insensitive as per RFC1738.
 
bool IsFileType (std::string_view type) const
 Check whether a URL is a given filetype. Comparison is effectively case-insensitive as both the parameter and m_strFileType are lower-case.
 
void GetOptions (std::map< std::string, std::string > &options) const
 
bool HasOption (const std::string &key) const
 
bool GetOption (const std::string &key, std::string &value) const
 
std::string GetOption (const std::string &key) const
 
void SetOption (const std::string &key, const std::string &value)
 
void RemoveOption (const std::string &key)
 
void GetProtocolOptions (std::map< std::string, std::string > &options) const
 
bool HasProtocolOption (const std::string &key) const
 
bool GetProtocolOption (const std::string &key, std::string &value) const
 
std::string GetProtocolOption (const std::string &key) const
 
void SetProtocolOption (const std::string &key, const std::string &value)
 
void RemoveProtocolOption (const std::string &key)
 
bool HasExtension (std::string_view extensions) const
 
std::string GetExtension () const
 
bool IsStack () const
 
bool IsMultiPath () const
 
bool IsFavourite () const
 
bool IsPlugin () const
 
bool IsScript () const
 
bool IsAddonsPath () const
 
bool IsSourcesPath () const
 
bool IsCDDA () const
 
bool IsISO9660 () const
 
bool IsMusicDb () const
 
bool IsVideoDb () const
 
bool IsBlurayPath () const
 
bool IsAndroidApp () const
 
bool IsLibraryFolder () const
 
bool IsUPnP () const
 
bool IsAPK () const
 
bool IsZIP () const
 
bool IsArchive () const
 
bool IsCBZ () const
 
bool IsCBR () const
 
bool IsDiscImage () const
 
bool IsPicture () const
 
bool HasParentInHostname () const
 
bool HasEncodedHostname () const
 
bool HasEncodedFilename () const
 
bool IsLibraryContent () const
 
bool IsBDFile () const
 
bool IsDVDFile () const
 
bool IsOpticalMediaFile () const
 

Static Public Member Functions

static std::string GetRedacted (std::string path)
 
static bool IsFileOnly (const std::string &url)
 return true if there are no directories in the url.
 
static bool IsFullPath (const std::string &url)
 return true if the url includes the full path
 
static std::string Decode (std::string_view strURLData)
 
static std::string Encode (std::string_view strURLData)
 
static bool IsProtocolEqual (const std::string &protocol, std::string_view type)
 Check whether a URL protocol is a given URL scheme. Both parameters MUST be lower-case. Typically this would be called using the result of TranslateProtocol() which enforces this for protocol.
 

Friends

bool operator== (const CURL &url, const std::string_view str)
 

Constructor & Destructor Documentation

◆ CURL() [1/2]

CURL::CURL ( )
default

◆ CURL() [2/2]

CURL::CURL ( std::string strURL)
explicit

Member Function Documentation

◆ Decode()

std::string CURL::Decode ( std::string_view strURLData)
static

◆ Encode()

std::string CURL::Encode ( std::string_view strURLData)
static

◆ Get()

std::string CURL::Get ( ) const

◆ GetDirectorySeparator()

char CURL::GetDirectorySeparator ( ) const

◆ GetDomain()

const std::string & CURL::GetDomain ( ) const
inline

◆ GetExtension()

std::string CURL::GetExtension ( ) const

◆ GetFileName()

const std::string & CURL::GetFileName ( ) const
inline

◆ GetFileNameWithoutPath()

std::string CURL::GetFileNameWithoutPath ( ) const

◆ GetFileType()

const std::string & CURL::GetFileType ( ) const
inline

◆ GetHostName()

const std::string & CURL::GetHostName ( ) const
inline

◆ GetOption() [1/2]

std::string CURL::GetOption ( const std::string & key) const

◆ GetOption() [2/2]

bool CURL::GetOption ( const std::string & key,
std::string & value ) const

◆ GetOptions() [1/2]

const std::string & CURL::GetOptions ( ) const
inline

◆ GetOptions() [2/2]

void CURL::GetOptions ( std::map< std::string, std::string > & options) const

◆ GetPassWord()

const std::string & CURL::GetPassWord ( ) const
inline

◆ GetPort()

int CURL::GetPort ( ) const
inline

◆ GetProtocol()

const std::string & CURL::GetProtocol ( ) const
inline

◆ GetProtocolOption() [1/2]

std::string CURL::GetProtocolOption ( const std::string & key) const

◆ GetProtocolOption() [2/2]

bool CURL::GetProtocolOption ( const std::string & key,
std::string & value ) const

◆ GetProtocolOptions() [1/2]

const std::string & CURL::GetProtocolOptions ( ) const
inline

◆ GetProtocolOptions() [2/2]

void CURL::GetProtocolOptions ( std::map< std::string, std::string > & options) const

◆ GetRedacted() [1/2]

std::string CURL::GetRedacted ( ) const

◆ GetRedacted() [2/2]

std::string CURL::GetRedacted ( std::string path)
static

◆ GetShareName()

const std::string & CURL::GetShareName ( ) const
inline

◆ GetTranslatedProtocol()

std::string CURL::GetTranslatedProtocol ( ) const

◆ GetUserName()

const std::string & CURL::GetUserName ( ) const
inline

◆ GetWithoutFilename()

std::string CURL::GetWithoutFilename ( ) const

◆ GetWithoutOptions()

std::string CURL::GetWithoutOptions ( ) const

◆ GetWithoutUserDetails()

std::string CURL::GetWithoutUserDetails ( bool redact = false) const

◆ HasEncodedFilename()

bool CURL::HasEncodedFilename ( ) const

◆ HasEncodedHostname()

bool CURL::HasEncodedHostname ( ) const

◆ HasExtension()

bool CURL::HasExtension ( std::string_view extensions) const

◆ HasOption()

bool CURL::HasOption ( const std::string & key) const

◆ HasParentInHostname()

bool CURL::HasParentInHostname ( ) const

◆ HasPort()

bool CURL::HasPort ( ) const
inline

◆ HasProtocolOption()

bool CURL::HasProtocolOption ( const std::string & key) const

◆ IsAddonsPath()

bool CURL::IsAddonsPath ( ) const

◆ IsAndroidApp()

bool CURL::IsAndroidApp ( ) const

◆ IsAPK()

bool CURL::IsAPK ( ) const

◆ IsArchive()

bool CURL::IsArchive ( ) const

◆ IsBDFile()

bool CURL::IsBDFile ( ) const

◆ IsBlurayPath()

bool CURL::IsBlurayPath ( ) const

◆ IsCBR()

bool CURL::IsCBR ( ) const

◆ IsCBZ()

bool CURL::IsCBZ ( ) const

◆ IsCDDA()

bool CURL::IsCDDA ( ) const

◆ IsDiscImage()

bool CURL::IsDiscImage ( ) const

◆ IsDVDFile()

bool CURL::IsDVDFile ( ) const

◆ IsFavourite()

bool CURL::IsFavourite ( ) const

◆ IsFileOnly()

bool CURL::IsFileOnly ( const std::string & url)
static

return true if there are no directories in the url.

◆ IsFileType()

bool CURL::IsFileType ( std::string_view type) const
inline

Check whether a URL is a given filetype. Comparison is effectively case-insensitive as both the parameter and m_strFileType are lower-case.

Parameters
typea lower-case filetype, e.g. "mp3".
Returns
true if the url is of the given filetype, false otherwise.

◆ IsFullPath()

bool CURL::IsFullPath ( const std::string & url)
static

return true if the url includes the full path

◆ IsISO9660()

bool CURL::IsISO9660 ( ) const

◆ IsLibraryContent()

bool CURL::IsLibraryContent ( ) const

◆ IsLibraryFolder()

bool CURL::IsLibraryFolder ( ) const

◆ IsLocal()

bool CURL::IsLocal ( ) const

◆ IsLocalHost()

bool CURL::IsLocalHost ( ) const

◆ IsMultiPath()

bool CURL::IsMultiPath ( ) const

◆ IsMusicDb()

bool CURL::IsMusicDb ( ) const

◆ IsOpticalMediaFile()

bool CURL::IsOpticalMediaFile ( ) const

◆ IsPicture()

bool CURL::IsPicture ( ) const

◆ IsPlugin()

bool CURL::IsPlugin ( ) const

◆ IsProtocol()

bool CURL::IsProtocol ( std::string_view type) const
inline

Check whether a URL is a given URL scheme. Comparison is case-insensitive as per RFC1738.

Parameters
typea lower-case scheme name, e.g. "smb".
Returns
true if the url is of the given scheme, false otherwise.

◆ IsProtocolEqual()

bool CURL::IsProtocolEqual ( const std::string & protocol,
std::string_view type )
static

Check whether a URL protocol is a given URL scheme. Both parameters MUST be lower-case. Typically this would be called using the result of TranslateProtocol() which enforces this for protocol.

Parameters
protocola lower-case scheme name, e.g. "ftp"
typea lower-case scheme name, e.g. "smb".
Returns
true if the url is of the given scheme, false otherwise.

◆ IsScript()

bool CURL::IsScript ( ) const

◆ IsSourcesPath()

bool CURL::IsSourcesPath ( ) const

◆ IsStack()

bool CURL::IsStack ( ) const

◆ IsUPnP()

bool CURL::IsUPnP ( ) const

◆ IsVideoDb()

bool CURL::IsVideoDb ( ) const

◆ IsZIP()

bool CURL::IsZIP ( ) const

◆ operator==()

bool CURL::operator== ( const CURL & url) const
inline

◆ Parse()

void CURL::Parse ( std::string strURL)
Todo
fix all Addon paths

◆ RemoveOption()

void CURL::RemoveOption ( const std::string & key)

◆ RemoveProtocolOption()

void CURL::RemoveProtocolOption ( const std::string & key)

◆ Reset()

void CURL::Reset ( )

◆ SetDomain()

void CURL::SetDomain ( std::string strDomain)
inline

◆ SetFileName()

void CURL::SetFileName ( std::string strFileName)

◆ SetHostName()

void CURL::SetHostName ( std::string strHostName)
inline

◆ SetOption()

void CURL::SetOption ( const std::string & key,
const std::string & value )

◆ SetOptions()

void CURL::SetOptions ( std::string strOptions)

◆ SetPassword()

void CURL::SetPassword ( std::string strPassword)
inline

◆ SetPort()

void CURL::SetPort ( int port)
inline

◆ SetProtocol()

void CURL::SetProtocol ( std::string strProtocol)

◆ SetProtocolOption()

void CURL::SetProtocolOption ( const std::string & key,
const std::string & value )

◆ SetProtocolOptions()

void CURL::SetProtocolOptions ( std::string strOptions)

◆ SetUserName()

void CURL::SetUserName ( std::string strUserName)
inline

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const CURL & url,
const std::string_view str )
friend

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