Phonon::Mrl

Search for usage in LXR

Phonon::Mrl Class Reference

#include <phonon/Mrl>

Inheritance diagram for Phonon::Mrl:

Public Member Functions

 Mrl (const Mrl &copy)
 
 Mrl (const QString &url)
 
 Mrl (const QUrl &url)
 
Mrloperator= (const Mrl &copy)
 
Mrloperator= (const QString &url)
 
QByteArray toEncoded (FormattingOptions options=None) const
 
- Public Member Functions inherited from QUrl
 QUrl (const QString &url, ParsingMode parsingMode)
 
 QUrl (const QUrl &other)
 
 QUrl (QUrl &&other)
 
QUrl adjusted (FormattingOptions options) const const
 
QString authority (ComponentFormattingOptions options) const const
 
void clear ()
 
QString errorString () const const
 
QString fileName (ComponentFormattingOptions options) const const
 
QString fragment (ComponentFormattingOptions options) const const
 
bool hasFragment () const const
 
bool hasQuery () const const
 
QString host (ComponentFormattingOptions options) const const
 
bool isEmpty () const const
 
bool isLocalFile () const const
 
bool isParentOf (const QUrl &childUrl) const const
 
bool isRelative () const const
 
bool isValid () const const
 
bool matches (const QUrl &url, FormattingOptions options) const const
 
bool operator!= (const QUrl &url) const const
 
QDataStreamoperator<< (QDataStream &out, const QUrl &url)
 
QUrloperator= (const QString &url)
 
QUrloperator= (const QUrl &url)
 
QUrloperator= (QUrl &&other)
 
bool operator== (const QUrl &url) const const
 
QDataStreamoperator>> (QDataStream &in, QUrl &url)
 
QString password (ComponentFormattingOptions options) const const
 
QString path (ComponentFormattingOptions options) const const
 
int port (int defaultPort) const const
 
 QT_NO_URL_CAST_FROM_STRING QT_NO_URL_CAST_FROM_STRING
 
QString query (ComponentFormattingOptions options) const const
 
QUrl resolved (const QUrl &relative) const const
 
QString scheme () const const
 
void setAuthority (const QString &authority, ParsingMode mode)
 
void setFragment (const QString &fragment, ParsingMode mode)
 
void setHost (const QString &host, ParsingMode mode)
 
void setPassword (const QString &password, ParsingMode mode)
 
void setPath (const QString &path, ParsingMode mode)
 
void setPort (int port)
 
void setQuery (const QString &query, ParsingMode mode)
 
void setQuery (const QUrlQuery &query)
 
void setScheme (const QString &scheme)
 
void setUrl (const QString &url, ParsingMode parsingMode)
 
void setUserInfo (const QString &userInfo, ParsingMode mode)
 
void setUserName (const QString &userName, ParsingMode mode)
 
void swap (QUrl &other)
 
CFURLRef toCFURL () const const
 
QString toDisplayString (FormattingOptions options) const const
 
QByteArray toEncoded (FormattingOptions options) const const
 
QString toLocalFile () const const
 
NSURL * toNSURL () const const
 
QString toString (FormattingOptions options) const const
 
QString url (FormattingOptions options) const const
 
QString userInfo (ComponentFormattingOptions options) const const
 
QString userName (ComponentFormattingOptions options) const const
 

Additional Inherited Members

- Public Types inherited from QUrl
enum  AceProcessingOption
 
enum  ComponentFormattingOption
 
enum  ParsingMode
 
enum  UrlFormattingOption
 
enum  UserInputResolutionOption
 
- Static Public Member Functions inherited from QUrl
QString fromAce (const QByteArray &domain, AceProcessingOptions options)
 
QUrl fromCFURL (CFURLRef url)
 
QUrl fromEncoded (const QByteArray &input, ParsingMode parsingMode)
 
QUrl fromLocalFile (const QString &localFile)
 
QUrl fromNSURL (const NSURL *url)
 
QString fromPercentEncoding (const QByteArray &input)
 
QList< QUrlfromStringList (const QStringList &urls, ParsingMode mode)
 
QUrl fromUserInput (const QString &userInput, const QString &workingDirectory, UserInputResolutionOptions options)
 
QStringList idnWhitelist ()
 
void setIdnWhitelist (const QStringList &list)
 
QByteArray toAce (const QString &domain, AceProcessingOptions options)
 
QByteArray toPercentEncoding (const QString &input, const QByteArray &exclude, const QByteArray &include)
 
QStringList toStringList (const QList< QUrl > &urls, FormattingOptions options)
 
- Public Attributes inherited from QUrl
typedef AceProcessingOptions
 
 AceTransitionalProcessing
 
 AssumeLocalFile
 
typedef ComponentFormattingOptions
 
 DecodedMode
 
 DecodeReserved
 
 DefaultResolution
 
 EncodeDelimiters
 
 EncodeReserved
 
 EncodeSpaces
 
 EncodeUnicode
 
typedef FormattingOptions
 
 FullyDecoded
 
 FullyEncoded
 
 IgnoreIDNWhitelist
 
 None
 
 NormalizePathSegments
 
 PreferLocalFile
 
 PrettyDecoded
 
 RemoveAuthority
 
 RemoveFilename
 
 RemoveFragment
 
 RemovePassword
 
 RemovePath
 
 RemovePort
 
 RemoveQuery
 
 RemoveScheme
 
 RemoveUserInfo
 
 StrictMode
 
 StripTrailingSlash
 
 TolerantMode
 
typedef UserInputResolutionOptions
 

Detailed Description

Media Resource Locator - A QUrl particularly for MediaSources.

Whenever working with URLs/URIs that actually are referencing a media resource a Mrl should be used rather than a QUrl. Mrl has functions particularly made for a media related use case and additionally overloads some of QUrl's functions to work more reasonable in a Phonon context.

A Mrl can be used just like a QUrl.

Author
Harald Sitter sitte.nosp@m.r@kd.nosp@m.e.org

Definition at line 46 of file mrl.h.

Constructor & Destructor Documentation

◆ Mrl() [1/4]

Phonon::Mrl::Mrl ( )

Definition at line 29 of file mrl.cpp.

◆ Mrl() [2/4]

Phonon::Mrl::Mrl ( const Mrl & copy)

Definition at line 34 of file mrl.cpp.

◆ Mrl() [3/4]

Phonon::Mrl::Mrl ( const QUrl & url)

Definition at line 39 of file mrl.cpp.

◆ Mrl() [4/4]

Phonon::Mrl::Mrl ( const QString & url)

Definition at line 44 of file mrl.cpp.

Member Function Documentation

◆ operator=() [1/2]

Mrl & Phonon::Mrl::operator= ( const Mrl & copy)

Definition at line 49 of file mrl.cpp.

◆ operator=() [2/2]

Mrl & Phonon::Mrl::operator= ( const QString & url)

Definition at line 56 of file mrl.cpp.

◆ toEncoded()

QByteArray Phonon::Mrl::toEncoded ( FormattingOptions options = None) const

Returns the encoded representation of the MRL if it's valid; otherwise an empty QByteArray is returned.

The output can be customized by passing flags with options.

If the MRL is a local file it will first be encoded using the local encoding, otherwise it gets converted to UTF-8, and all non-ASCII characters are then percent encoded.

Returns
the encoded MRL or an empty QByteArray if the MRL was invalid

Definition at line 63 of file mrl.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.