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

Owned, lossless URI bytes and RFC 3986 component boundaries. Recognizable malformed URIs are retained; IsValid() reports generic syntax only. Component views refer to this object's storage and are invalidated by mutation. More...

#include <URI.h>

Public Member Functions

 CURI ()=default
 
 CURI (std::string uri)
 
 CURI (const CURI &)=default
 
CURI & operator= (const CURI &)=default
 
 CURI (CURI &&other) noexcept
 
CURI & operator= (CURI &&other) noexcept
 
bool Parse (std::string uri)
 Store a URI candidate and return its validity; no scheme resets to empty.
 
bool IsValid () const
 
const std::string & Get () const
 
const URIParser::Components & GetComponents () const
 
std::string_view GetRawScheme () const
 
std::string_view GetRawAuthority () const
 
std::string_view GetRawPath () const
 
std::string_view GetRawQuery () const
 
std::string_view GetRawFragment () const
 
bool HasAuthority () const
 
bool HasQuery () const
 
bool HasFragment () const
 
std::string_view GetSchemeSpecificPart () const
 
std::string_view GetPathPrefix () const
 
std::string_view GetWithoutQueryAndFragment () const
 
bool SetPath (std::string path)
 Replace a valid URI's path without changing other components. Invalid component syntax or authority shape leaves the URI unchanged.
 
bool SetRawQuery (std::optional< std::string > query)
 Replace a raw query; nullopt removes ?, an empty string retains it. Invalid query syntax leaves the URI unchanged. Malformed candidates are supported.
 

Detailed Description

Owned, lossless URI bytes and RFC 3986 component boundaries. Recognizable malformed URIs are retained; IsValid() reports generic syntax only. Component views refer to this object's storage and are invalidated by mutation.

Constructor & Destructor Documentation

◆ CURI() [1/4]

CURI::CURI ( )
default

◆ CURI() [2/4]

CURI::CURI ( std::string uri)
explicit

◆ CURI() [3/4]

CURI::CURI ( const CURI & )
default

◆ CURI() [4/4]

CURI::CURI ( CURI && other)
noexcept

Member Function Documentation

◆ Get()

const std::string & CURI::Get ( ) const
inline

◆ GetComponents()

const URIParser::Components & CURI::GetComponents ( ) const
inline

◆ GetPathPrefix()

std::string_view CURI::GetPathPrefix ( ) const

◆ GetRawAuthority()

std::string_view CURI::GetRawAuthority ( ) const

◆ GetRawFragment()

std::string_view CURI::GetRawFragment ( ) const

◆ GetRawPath()

std::string_view CURI::GetRawPath ( ) const
inline

◆ GetRawQuery()

std::string_view CURI::GetRawQuery ( ) const

◆ GetRawScheme()

std::string_view CURI::GetRawScheme ( ) const

◆ GetSchemeSpecificPart()

std::string_view CURI::GetSchemeSpecificPart ( ) const

◆ GetWithoutQueryAndFragment()

std::string_view CURI::GetWithoutQueryAndFragment ( ) const

◆ HasAuthority()

bool CURI::HasAuthority ( ) const
inline

◆ HasFragment()

bool CURI::HasFragment ( ) const
inline

◆ HasQuery()

bool CURI::HasQuery ( ) const
inline

◆ IsValid()

bool CURI::IsValid ( ) const
inline

◆ operator=() [1/2]

CURI & CURI::operator= ( const CURI & )
default

◆ operator=() [2/2]

CURI & CURI::operator= ( CURI && other)
noexcept

◆ Parse()

bool CURI::Parse ( std::string uri)

Store a URI candidate and return its validity; no scheme resets to empty.

◆ SetPath()

bool CURI::SetPath ( std::string path)

Replace a valid URI's path without changing other components. Invalid component syntax or authority shape leaves the URI unchanged.

◆ SetRawQuery()

bool CURI::SetRawQuery ( std::optional< std::string > query)

Replace a raw query; nullopt removes ?, an empty string retains it. Invalid query syntax leaves the URI unchanged. Malformed candidates are supported.


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