#include <phonon/Mrl>
Public Member Functions | |
Mrl (const Mrl ©) | |
Mrl (const QUrl &url) | |
Mrl (const QString &url) | |
Mrl & | operator= (const Mrl ©) |
Mrl & | operator= (const QString &url) |
QByteArray | toEncoded (FormattingOptions options=None) const |
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.
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.