Phonon  4.7.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | List of all members
Phonon::Mrl Class Reference

#include <phonon/Mrl>

Inheritance diagram for Phonon::Mrl:

Public Member Functions

 Mrl (const Mrl &copy)
 
 Mrl (const QUrl &url)
 
 Mrl (const QString &url)
 
Mrloperator= (const Mrl &copy)
 
Mrloperator= (const QString &url)
 
QByteArray toEncoded (FormattingOptions options=None) const
 

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

Member Function Documentation

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.

  • options QUrl::FormattingOptions to manipulate what the output should look like
Returns
the encoded MRL or an empty QByteArray if the MRL was invalid

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