Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
URIPolicy Namespace Reference

Classes

struct  Policy
 Operation policy, independent of URI validity and installed handlers. More...
 

Functions

std::optional< std::string_view > GetScheme (std::string_view input)
 Extract a scheme, respecting native drive prefixes.
 
bool IsURILocation (std::string_view input)
 Classify mixed input as a recognized URI scheme or legacy VFS URL.
 
bool SchemeEquals (std::string_view left, std::string_view right)
 Compare raw ASCII scheme names case-insensitively, without decoding.
 
Policy GetPolicy (std::string_view scheme)
 Return the policy for a case-insensitive scheme name.
 
bool IsLegacyURL (std::string_view input)
 Recognize Kodi's legacy leading scheme:// spelling, not every URI or URL.
 
bool UsesLegacyURL (std::string_view input)
 Select Kodi compatibility for a mixed-input location, including legacy backslashes.
 
bool SupportsPathOperations (const CURI &uri)
 
bool CanSetPath (const CURI &uri, std::string_view path)
 

Function Documentation

◆ CanSetPath()

bool URIPolicy::CanSetPath ( const CURI & uri,
std::string_view path )

◆ GetPolicy()

Policy URIPolicy::GetPolicy ( std::string_view scheme)

Return the policy for a case-insensitive scheme name.

Note
Filesystem policy alone does not establish a navigable magnet path.

◆ GetScheme()

std::optional< std::string_view > URIPolicy::GetScheme ( std::string_view input)

Extract a scheme, respecting native drive prefixes.

Returns
A source view valid until input changes or is destroyed.
Note
On Windows, one-letter prefixes are always drives; elsewhere, // selects VFS. Use IsURILocation to classify mixed input, or CURL::ParseURI for explicit intent.

◆ IsLegacyURL()

bool URIPolicy::IsLegacyURL ( std::string_view input)

Recognize Kodi's legacy leading scheme:// spelling, not every URI or URL.

Note
Native drive prefixes take precedence. Body validity and backend support are unchecked.

◆ IsURILocation()

bool URIPolicy::IsURILocation ( std::string_view input)

Classify mixed input as a recognized URI scheme or legacy VFS URL.

Note
Unknown authority-free identifiers require explicit CURL::ParseURI intent.

◆ SchemeEquals()

bool URIPolicy::SchemeEquals ( std::string_view left,
std::string_view right )

Compare raw ASCII scheme names case-insensitively, without decoding.

◆ SupportsPathOperations()

bool URIPolicy::SupportsPathOperations ( const CURI & uri)

◆ UsesLegacyURL()

bool URIPolicy::UsesLegacyURL ( std::string_view input)

Select Kodi compatibility for a mixed-input location, including legacy backslashes.