![]() |
LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Describes a single radio station. More...
#include "iradiostation.h"
Public Member Functions | |
virtual | ~IRadioStation () |
virtual QObject * | GetQObject ()=0 |
Returns this object as a QObject. More... | |
virtual void | RequestNewStream ()=0 |
Request a new stream if this is a multistream radio. More... | |
virtual QString | GetRadioName () const =0 |
Returns the human-readable name of this radio station. More... | |
Protected Member Functions | |
virtual void | gotNewStream (const QUrl &url, const AudioInfo &info)=0 |
Emitted when there is a new audio stream available. More... | |
virtual void | gotPlaylist (const QString &filename, const QString &format)=0 |
Emitted when a playlist for this radio is fetched. More... | |
virtual void | gotAudioInfos (const QList< AudioInfo > &infos)=0 |
Emitted when just a set of audio infos is available. More... | |
virtual void | gotError (const QString &error)=0 |
Emitted when there is an error. More... | |
Describes a single radio station.
Radio stations can be either single-stream or multistream. Single-stream stations have only one continuous stream of music like an Icecast/Shoutcast broadcasting. Multistream radio stations announce tracks one by one, like Last.FM radio. The difference is that it makes sense to skip a track in multistream radios, while there is nothing to skip in single-stream ones.
Multistream radio stations will typically emit gotNewStream() signals from time to time and as a response to RequestNewStream(), while single-stream radio stations will emit gotPlaylist() once.
This class has some signals (gotNewStream(), gotPlaylist() and gotError()), and one can use the GetQObject() method to get an object of this class as a QObject and connect to those signals.
Ownership of this class is either passed to the caller or remains belonging to the returning plugin, this class never deletes itself.
Definition at line 43 of file iradiostation.h.
|
inlinevirtual |
Definition at line 46 of file iradiostation.h.
|
pure virtual |
Returns this object as a QObject.
This function can be used to connect to the signals of this class.
|
pure virtual |
Returns the human-readable name of this radio station.
|
protectedpure virtual |
Emitted when just a set of audio infos is available.
This signal can be used by radio stations that get audio streams in a form different of a playlist file.
The audio infos in the infos list must contain the URL field.
[out] | infos | The infos corresponding to this radio station. |
|
protectedpure virtual |
Emitted when there is an error.
[out] | error | The human-readable error text. |
|
protectedpure virtual |
Emitted when there is a new audio stream available.
[out] | url | The URL of the stream. |
[out] | info | The track metadata. |
|
protectedpure virtual |
Emitted when a playlist for this radio is fetched.
Ownership of the playlist is passed to the owner of this radio station, and it is responsible for deleting the playlist file after it is not needed.
Playlist format is passed in the format parameter, and it can be one of:
[out] | filename | The local path to the playlist. |
[out] | format | The format of the playlist. |
|
pure virtual |
Request a new stream if this is a multistream radio.
Otherwise, this function does nothing.