|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
#include <URL.h>
Public Member Functions | |
| CURL ()=default | |
| CURL (const CURL &)=default | |
| CURL & | operator= (const CURL &)=default |
| CURL (CURL &&other) | |
| Transfer all URI/compatibility state, leaving the source Reset(). | |
| CURL & | operator= (CURL &&other) |
| CURL (std::string strURL) | |
| bool | operator== (const CURL &url) const |
| void | Reset () |
| void | Parse (std::string strURL) |
| Interpret Kodi mixed native-path/URI input without a strict validity gate. | |
| bool | ParseURI (std::string uri) |
| Parse an explicit URI, including one-letter schemes. | |
| void | ParseNativePath (std::string path) |
| Store an explicitly native filename without URI detection or normalization. | |
| bool | IsLosslessURI () const |
| Whether serialization preserves the source URI bytes, even if malformed. | |
| bool | SupportsPathOperations () const |
| Whether this location supports filesystem-style path operations. | |
| bool | PreservesQueryIdentity () const |
| Whether path operations must retain the query as resource identity. | |
| std::string | GetSchemeSpecificPart () const |
| Copy raw bytes after the scheme colon and before the fragment delimiter. | |
| std::string_view | GetSchemeSpecificPartView () const |
| Borrow a lossless URI's scheme-specific bytes without allocation. | |
| bool | SetURIPath (std::string path) |
| Replace a lossless URI's raw path, preserving all other components. | |
| bool | SetRawQuery (std::optional< std::string > query) |
| Replace the raw query of a lossless URI without a map or form decoding. | |
| void | SetFileName (std::string strFileName) |
| Replace the legacy filename or lossless navigable raw path. | |
| 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) |
| Change the scheme, preserving component bytes for lossless forms. | |
| void | SetOptions (std::string strOptions) |
| Set legacy options; lossless URI forms reject this operation unchanged. | |
| 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 |
| Return the compatibility filename, or the raw path for navigable lossless URIs. | |
| const std::string & | GetProtocol () const |
| Return the normalized lower-case scheme; Get() retains lossless source spelling. | |
| std::string | GetTranslatedProtocol () const |
| const std::string & | GetFileType () const |
| const std::string & | GetShareName () const |
| const std::string & | GetOptions () const |
| Return legacy options, or the raw lossless query including its leading ?. | |
| const std::string & | GetProtocolOptions () const |
| std::string | GetFileNameWithoutPath () const |
| char | GetDirectorySeparator () const |
| Return / for URI paths; native and legacy embedded filenames retain native separators. | |
| std::string | Get () const |
| Serialize with legacy normalization or exact lossless URI bytes. | |
| std::string | GetWithoutOptions () const |
| Serialize without legacy options, or without a lossless URI's query and fragment. | |
| std::string | GetWithoutUserDetails (bool redact=false) const |
| Serialize without credentials, optionally replacing them with redaction labels. | |
| std::string | GetWithoutFilename () const |
| Return the legacy filename prefix, or lossless URI bytes preceding the path. | |
| std::string | GetRedacted () const |
| bool | IsLocal () const |
| Test Kodi local-location compatibility, not the presence of a URI authority. | |
| 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 |
Raw URI components | |
Owned copies without decoding; safe across object mutation, copying and moving. Legacy adapters expose components of their current serialized spelling. Presence predicates distinguish absent components from present empty components. Native filenames have no URI authority, query or fragment. | |
| std::string | GetRawScheme () const |
| std::string | GetRawAuthority () const |
| std::string | GetRawPath () const |
| std::string | GetRawQuery () const |
| std::string | GetRawFragment () const |
| bool | HasAuthority () const |
| bool | HasQuery () const |
| bool | HasFragment () const |
Static Public Member Functions | |
| static std::string | GetRedacted (std::string_view path) |
| Redact credentials and complete data bodies, including malformed candidates. | |
| static bool | IsFullPath (const std::string &url) |
| Test Kodi absolute-location compatibility, independently of handler availability. | |
| 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 | |
| class | CURIRedactor |
| bool | operator== (const CURL &url, const std::string_view str) |
|
default |
|
default |
| CURL::CURL | ( | CURL && | other | ) |
Transfer all URI/compatibility state, leaving the source Reset().
|
explicit |
|
static |
|
static |
| std::string CURL::Get | ( | ) | const |
Serialize with legacy normalization or exact lossless URI bytes.
| char CURL::GetDirectorySeparator | ( | ) | const |
Return / for URI paths; native and legacy embedded filenames retain native separators.
|
inline |
| std::string CURL::GetExtension | ( | ) | const |
|
inline |
Return the compatibility filename, or the raw path for navigable lossless URIs.
| std::string CURL::GetFileNameWithoutPath | ( | ) | const |
|
inline |
|
inline |
| std::string CURL::GetOption | ( | const std::string & | key | ) | const |
| bool CURL::GetOption | ( | const std::string & | key, |
| std::string & | value ) const |
|
inline |
Return legacy options, or the raw lossless query including its leading ?.
| void CURL::GetOptions | ( | std::map< std::string, std::string > & | options | ) | const |
|
inline |
|
inline |
|
inline |
Return the normalized lower-case scheme; Get() retains lossless source spelling.
| std::string CURL::GetProtocolOption | ( | const std::string & | key | ) | const |
| bool CURL::GetProtocolOption | ( | const std::string & | key, |
| std::string & | value ) const |
|
inline |
| void CURL::GetProtocolOptions | ( | std::map< std::string, std::string > & | options | ) | const |
| std::string CURL::GetRawAuthority | ( | ) | const |
| std::string CURL::GetRawFragment | ( | ) | const |
| std::string CURL::GetRawPath | ( | ) | const |
| std::string CURL::GetRawQuery | ( | ) | const |
| std::string CURL::GetRawScheme | ( | ) | const |
| std::string CURL::GetRedacted | ( | ) | const |
|
static |
Redact credentials and complete data bodies, including malformed candidates.
| std::string CURL::GetSchemeSpecificPart | ( | ) | const |
Copy raw bytes after the scheme colon and before the fragment delimiter.
|
inline |
Borrow a lossless URI's scheme-specific bytes without allocation.
|
inline |
| std::string CURL::GetTranslatedProtocol | ( | ) | const |
|
inline |
| std::string CURL::GetWithoutFilename | ( | ) | const |
Return the legacy filename prefix, or lossless URI bytes preceding the path.
| std::string CURL::GetWithoutOptions | ( | ) | const |
Serialize without legacy options, or without a lossless URI's query and fragment.
| std::string CURL::GetWithoutUserDetails | ( | bool | redact = false | ) | const |
Serialize without credentials, optionally replacing them with redaction labels.
| redact | Also replaces data resources and their wrappers with bounded text when true. |
| bool CURL::HasAuthority | ( | ) | const |
| bool CURL::HasEncodedFilename | ( | ) | const |
| bool CURL::HasEncodedHostname | ( | ) | const |
| bool CURL::HasExtension | ( | std::string_view | extensions | ) | const |
| bool CURL::HasFragment | ( | ) | const |
| bool CURL::HasOption | ( | const std::string & | key | ) | const |
| bool CURL::HasParentInHostname | ( | ) | const |
|
inline |
| bool CURL::HasProtocolOption | ( | const std::string & | key | ) | const |
| bool CURL::HasQuery | ( | ) | const |
| bool CURL::IsAddonsPath | ( | ) | const |
| bool CURL::IsAndroidApp | ( | ) | const |
| bool CURL::IsAPK | ( | ) | const |
| bool CURL::IsArchive | ( | ) | const |
| bool CURL::IsBDFile | ( | ) | const |
| bool CURL::IsBlurayPath | ( | ) | const |
| bool CURL::IsCBR | ( | ) | const |
| bool CURL::IsCBZ | ( | ) | const |
| bool CURL::IsCDDA | ( | ) | const |
| bool CURL::IsDiscImage | ( | ) | const |
| bool CURL::IsDVDFile | ( | ) | const |
| bool CURL::IsFavourite | ( | ) | 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.
| type | a lower-case filetype, e.g. "mp3". |
|
static |
Test Kodi absolute-location compatibility, independently of handler availability.
| bool CURL::IsISO9660 | ( | ) | const |
| bool CURL::IsLibraryContent | ( | ) | const |
| bool CURL::IsLibraryFolder | ( | ) | const |
| bool CURL::IsLocal | ( | ) | const |
Test Kodi local-location compatibility, not the presence of a URI authority.
| bool CURL::IsLocalHost | ( | ) | const |
|
inline |
Whether serialization preserves the source URI bytes, even if malformed.
| bool CURL::IsMultiPath | ( | ) | const |
| bool CURL::IsMusicDb | ( | ) | const |
| bool CURL::IsOpticalMediaFile | ( | ) | const |
| bool CURL::IsPicture | ( | ) | const |
| bool CURL::IsPlugin | ( | ) | const |
|
inline |
Check whether a URL is a given URL scheme. Comparison is case-insensitive as per RFC1738.
| type | a lower-case scheme name, e.g. "smb". |
|
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.
| protocol | a lower-case scheme name, e.g. "ftp" |
| type | a lower-case scheme name, e.g. "smb". |
| bool CURL::IsScript | ( | ) | const |
| bool CURL::IsSourcesPath | ( | ) | const |
| bool CURL::IsStack | ( | ) | const |
| bool CURL::IsUPnP | ( | ) | const |
| bool CURL::IsVideoDb | ( | ) | const |
| bool CURL::IsZIP | ( | ) | const |
| void CURL::Parse | ( | std::string | strURL | ) |
Interpret Kodi mixed native-path/URI input without a strict validity gate.
| void CURL::ParseNativePath | ( | std::string | path | ) |
Store an explicitly native filename without URI detection or normalization.
| bool CURL::ParseURI | ( | std::string | uri | ) |
Parse an explicit URI, including one-letter schemes.
| bool CURL::PreservesQueryIdentity | ( | ) | const |
Whether path operations must retain the query as resource identity.
| void CURL::RemoveOption | ( | const std::string & | key | ) |
| void CURL::RemoveProtocolOption | ( | const std::string & | key | ) |
| void CURL::Reset | ( | ) |
|
inline |
| void CURL::SetFileName | ( | std::string | strFileName | ) |
Replace the legacy filename or lossless navigable raw path.
|
inline |
| void CURL::SetOption | ( | const std::string & | key, |
| const std::string & | value ) |
| void CURL::SetOptions | ( | std::string | strOptions | ) |
Set legacy options; lossless URI forms reject this operation unchanged.
|
inline |
| void CURL::SetProtocol | ( | std::string | strProtocol | ) |
Change the scheme, preserving component bytes for lossless forms.
| void CURL::SetProtocolOption | ( | const std::string & | key, |
| const std::string & | value ) |
| void CURL::SetProtocolOptions | ( | std::string | strOptions | ) |
| bool CURL::SetRawQuery | ( | std::optional< std::string > | query | ) |
Replace the raw query of a lossless URI without a map or form decoding.
| query | No value removes the delimiter; an empty value retains an empty ?. |
| bool CURL::SetURIPath | ( | std::string | path | ) |
Replace a lossless URI's raw path, preserving all other components.
|
inline |
| bool CURL::SupportsPathOperations | ( | ) | const |
Whether this location supports filesystem-style path operations.
|
friend |