libmpd++
DASH MPD parsing and manipulation library
 
Loading...
Searching...
No Matches
com::bbc::libmpdpp::BaseURL Class Reference

#include <libmpd++/BaseURL.hh>

Inheritance diagram for com::bbc::libmpdpp::BaseURL:
Collaboration diagram for com::bbc::libmpdpp::BaseURL:

Public Types

using duration_type = std::chrono::microseconds
 The type used to represent durations in this class.
 

Public Member Functions

 BaseURL ()
 
 BaseURL (const BaseURL &other)
 
 BaseURL (BaseURL &&other)
 
virtual ~BaseURL ()
 
bool operator== (const BaseURL &other) const
 
BaseURL resolveURL (const std::list< BaseURL > &base_urls) const
 
bool hasServiceLocation () const
 
const std::optional< std::string > & serviceLocation () const
 
BaseURLserviceLocation (const std::nullopt_t &)
 
bool hasByteRange () const
 
const std::optional< std::string > & byteRange () const
 
BaseURLbyteRange (const std::nullopt_t &)
 
bool hasAvailabilityTimeOffset () const
 
const std::optional< double > & availabilityTimeOffset () const
 
BaseURLavailabilityTimeOffset (const std::nullopt_t &)
 
BaseURLavailabilityTimeOffset (double val)
 
bool hasAvailabilityTimeComplete () const
 
const std::optional< bool > & availabilityTimeComplete () const
 
BaseURLavailabilityTimeComplete (const std::nullopt_t &)
 
BaseURLavailabilityTimeComplete (bool val)
 
bool hasTimeShiftBufferDepth () const
 
const std::optional< duration_type > & timeShiftBufferDepth () const
 
BaseURLtimeShiftBufferDepth (const std::nullopt_t &)
 
bool rangeAccess () const
 
BaseURLrangeAccess (bool val)
 
 BaseURL (const std::string &url)
 
 BaseURL (std::string &&url)
 
BaseURLoperator= (const BaseURL &other)
 
BaseURLoperator= (BaseURL &&other)
 
const URIurl () const
 
URIurl ()
 
BaseURLurl (const URI &_url)
 
BaseURLurl (URI &&_url)
 
BaseURLserviceLocation (const std::string &val)
 
BaseURLserviceLocation (std::string &&val)
 
BaseURLbyteRange (const std::string &val)
 
BaseURLbyteRange (std::string &&val)
 
BaseURLtimeShiftBufferDepth (const duration_type &val)
 
BaseURLtimeShiftBufferDepth (duration_type &&val)
 
- Public Member Functions inherited from com::bbc::libmpdpp::URI
 URI ()
 
 URI (const char *uri)
 
 URI (const std::string &uri)
 
 URI (std::string &&uri)
 
 URI (const URI &other)
 
 URI (URI &&other)
 
virtual ~URI ()
 
URIoperator= (const URI &other)
 
URIoperator= (URI &&other)
 
URIoperator= (const std::string &val)
 
URIoperator= (std::string &&val)
 
bool operator== (const URI &other) const
 
 operator std::string () const
 
const std::string & str () const
 
URI resolveUsingBaseURLs (const std::list< BaseURL > &base_urls) const
 
bool isURL () const
 
bool isAbsoluteURL () const
 

Detailed Description

BaseURL class

This is a container for BaseURL element values and attributes as given in the DASH MPD XML schema found in ISO 23009-1:2022 Clause 5.6.3.

Member Typedef Documentation

◆ duration_type

using com::bbc::libmpdpp::BaseURL::duration_type = std::chrono::microseconds

The type used to represent durations in this class.

Constructor & Destructor Documentation

◆ BaseURL() [1/5]

com::bbc::libmpdpp::BaseURL::BaseURL ( )

Default constructor

Create an empty BaseURL element.

◆ BaseURL() [2/5]

com::bbc::libmpdpp::BaseURL::BaseURL ( const std::string & url)

Construct with URL

Make a new BaseURL with url as the URL string.

Parameters
urlThe URL to set this BaseURL value to.

◆ BaseURL() [3/5]

com::bbc::libmpdpp::BaseURL::BaseURL ( std::string && url)

Construct with URL

Make a new BaseURL with url as the URL string.

Parameters
urlThe URL to set this BaseURL value to.

◆ BaseURL() [4/5]

com::bbc::libmpdpp::BaseURL::BaseURL ( const BaseURL & other)

Copy constructor

Create a new BaseURL which is a copy of other.

Parameters
otherThe other BaseURL to copy.

◆ BaseURL() [5/5]

com::bbc::libmpdpp::BaseURL::BaseURL ( BaseURL && other)

Move constructor

Create a new BaseURL by moving the values and resources from the other BaseURL.

Parameters
otherThe other BaseURL to transfer the values and resources from.

◆ ~BaseURL()

virtual com::bbc::libmpdpp::BaseURL::~BaseURL ( )
inlinevirtual

Destructor

Member Function Documentation

◆ availabilityTimeComplete() [1/3]

const std::optional< bool > & com::bbc::libmpdpp::BaseURL::availabilityTimeComplete ( ) const
inline

Get the optional @pvailabilityTimeComplete attribute value

Returns
the Optional @pvailabilityTimeComplete attribute flag.

◆ availabilityTimeComplete() [2/3]

BaseURL & com::bbc::libmpdpp::BaseURL::availabilityTimeComplete ( bool val)
inline

Set the @pvailabilityTimeComplete attribute value

Parameters
valThe value for the @pvailabilityTimeComplete attribute.
Returns
This BaseURL.

◆ availabilityTimeComplete() [3/3]

BaseURL & com::bbc::libmpdpp::BaseURL::availabilityTimeComplete ( const std::nullopt_t & )
inline

Unset the @pvailabilityTimeComplete attribute value

Returns
This BaseURL.

◆ availabilityTimeOffset() [1/3]

const std::optional< double > & com::bbc::libmpdpp::BaseURL::availabilityTimeOffset ( ) const
inline

Get the optional @pvailabilityTimeOffset attribute value

Returns
The optional availability time offset.

◆ availabilityTimeOffset() [2/3]

BaseURL & com::bbc::libmpdpp::BaseURL::availabilityTimeOffset ( const std::nullopt_t & )
inline

Unset the @pvailabilityTimeOffset attribute value

Returns
This BaseURL.

◆ availabilityTimeOffset() [3/3]

BaseURL & com::bbc::libmpdpp::BaseURL::availabilityTimeOffset ( double val)
inline

Set the @pvailabilityTimeOffset attribute value

Parameters
valThe value to set as the @pvailabilityTimeOffset attribute value.
Returns
This BaseURL.

◆ byteRange() [1/4]

const std::optional< std::string > & com::bbc::libmpdpp::BaseURL::byteRange ( ) const
inline

Get the optional @byteRange attribute value

Returns
The optional @byteRange attribute value.

◆ byteRange() [2/4]

BaseURL & com::bbc::libmpdpp::BaseURL::byteRange ( const std::nullopt_t & )
inline

Unset the @byteRange attribute value

Returns
This BaseURL.

◆ byteRange() [3/4]

BaseURL & com::bbc::libmpdpp::BaseURL::byteRange ( const std::string & val)
inline

Set the optional @byteRange attribute value

Parameters
valThe value of the byte range to set as the @byteRange attribute.
Returns
This BaseURL.

◆ byteRange() [4/4]

BaseURL & com::bbc::libmpdpp::BaseURL::byteRange ( std::string && val)
inline

Set the optional @byteRange attribute value

Parameters
valThe value of the byte range to set as the @byteRange attribute.
Returns
This BaseURL.

◆ hasAvailabilityTimeComplete()

bool com::bbc::libmpdpp::BaseURL::hasAvailabilityTimeComplete ( ) const
inline

Check if the @pvailabilityTimeComplete attribute has been set

Returns
true if the @pvailabilityTimeComplete attribute has been set.

◆ hasAvailabilityTimeOffset()

bool com::bbc::libmpdpp::BaseURL::hasAvailabilityTimeOffset ( ) const
inline

Check if the @pvailabilityTimeOffset attribute has been set

Returns
true if the @pvailabilityTimeOffset attribute has been set, otherwise false.

◆ hasByteRange()

bool com::bbc::libmpdpp::BaseURL::hasByteRange ( ) const
inline

Check if the @byteRange attribute has been set

Returns
true if the @byteRange attribute has been set.

◆ hasServiceLocation()

bool com::bbc::libmpdpp::BaseURL::hasServiceLocation ( ) const
inline

Check if the serviceLocation attribute is set

Returns
true if the serviceLocation attribute has been set.

◆ hasTimeShiftBufferDepth()

bool com::bbc::libmpdpp::BaseURL::hasTimeShiftBufferDepth ( ) const
inline

Check if the @timeShiftBufferDepth attribute value has been set

Returns
true if the @timeShiftBufferDepth attribute value has been set.

◆ operator=() [1/2]

BaseURL & com::bbc::libmpdpp::BaseURL::operator= ( BaseURL && other)

Assignment operator

Set this BaseURL to the same value as other.

Parameters
otherThe other BaseURL to copy/move into this BaseURL.
Returns
This BaseURL.

◆ operator=() [2/2]

BaseURL & com::bbc::libmpdpp::BaseURL::operator= ( const BaseURL & other)

Assignment operator

Set this BaseURL to the same value as other.

Parameters
otherThe other BaseURL to copy/move into this BaseURL.
Returns
This BaseURL.

◆ operator==()

bool com::bbc::libmpdpp::BaseURL::operator== ( const BaseURL & other) const

Comparison operator

Parameters
otherThe other BaseURL to comnpare to this one.
Returns
true if the value of other is the same as the value of this BaseURL, otherwise false.

◆ rangeAccess() [1/2]

bool com::bbc::libmpdpp::BaseURL::rangeAccess ( ) const
inline

Get the @rangeAccess attribute value

Returns
The @rangeAccess attribute value.

◆ rangeAccess() [2/2]

BaseURL & com::bbc::libmpdpp::BaseURL::rangeAccess ( bool val)
inline

Set the @rangeAccess attribute value

Sets the @rangeAccess attribute value. Setting this to the default value of false will cause this field to be omitted from XML output.

Parameters
valThe value to set the @rangeAccess attribute to.
Returns
This BaseURL.

◆ resolveURL()

BaseURL com::bbc::libmpdpp::BaseURL::resolveURL ( const std::list< BaseURL > & base_urls) const

Create a new BaseURL with the resolved version of this URL

Create a copy of this BaseURL with the url resolved using the provided base_urls. If this BaseURL is absolute then the result will just be a copy of this one. If this BaseURL is relative then the base_urls list will be used to generate an absolute (if possible) URL by combining the relative URL from this BaseURL with one of the absolute URLs from base_urls.

Parameters
base_urlsThe list of BaseURL to use as base URL when resolving this URL.
Returns
A copy of this BaseURL resolved using base_urls.

◆ serviceLocation() [1/4]

const std::optional< std::string > & com::bbc::libmpdpp::BaseURL::serviceLocation ( ) const
inline

Get the optional serviceLocation attribute value

Returns
The optional serviceLocation attribute value.

◆ serviceLocation() [2/4]

BaseURL & com::bbc::libmpdpp::BaseURL::serviceLocation ( const std::nullopt_t & )
inline

Unset the serviceLocation attribute value

Returns
This BaseURL.

◆ serviceLocation() [3/4]

BaseURL & com::bbc::libmpdpp::BaseURL::serviceLocation ( const std::string & val)
inline

Set the @serviceLocation attribute value

Parameters
valThe value to set for the @serviceLocation attribute.
Returns
This BaseURL.

◆ serviceLocation() [4/4]

BaseURL & com::bbc::libmpdpp::BaseURL::serviceLocation ( std::string && val)
inline

Set the @serviceLocation attribute value

Parameters
valThe value to set for the @serviceLocation attribute.
Returns
This BaseURL.

◆ timeShiftBufferDepth() [1/4]

const std::optional< duration_type > & com::bbc::libmpdpp::BaseURL::timeShiftBufferDepth ( ) const
inline

Get the optional @timeShiftBufferDepth attribute value

Returns
The optional value for the @timeShiftBufferDepth attribute.

◆ timeShiftBufferDepth() [2/4]

BaseURL & com::bbc::libmpdpp::BaseURL::timeShiftBufferDepth ( const duration_type & val)
inline

Set the @timeShiftBufferDepth attribute value

Parameters
valThe value to set for the @timeShiftBufferDepth attribute.
Returns
This BaseURL.

◆ timeShiftBufferDepth() [3/4]

BaseURL & com::bbc::libmpdpp::BaseURL::timeShiftBufferDepth ( const std::nullopt_t & )
inline

Unset the @timeShiftBufferDepth attribute value

Returns
This BaseURL.

◆ timeShiftBufferDepth() [4/4]

BaseURL & com::bbc::libmpdpp::BaseURL::timeShiftBufferDepth ( duration_type && val)
inline

Set the @timeShiftBufferDepth attribute value

Parameters
valThe value to set for the @timeShiftBufferDepth attribute.
Returns
This BaseURL.

◆ url() [1/4]

URI & com::bbc::libmpdpp::BaseURL::url ( )
inline

Get the URL value

Returns
the URL value for this BaseURL.

◆ url() [2/4]

const URI & com::bbc::libmpdpp::BaseURL::url ( ) const
inline

Get the URL value

Returns
the URL value for this BaseURL.

◆ url() [3/4]

BaseURL & com::bbc::libmpdpp::BaseURL::url ( const URI & _url)
inline

Set the URL value

Parameters
_urlThe URL to set this BaseURL to.
Returns
This BaseURL.

◆ url() [4/4]

BaseURL & com::bbc::libmpdpp::BaseURL::url ( URI && _url)
inline

Set the URL value

Parameters
_urlThe URL to set this BaseURL to.
Returns
This BaseURL.

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