Clementine-audio-player-Mac.../src/radioplaylistitem.h

47 lines
867 B
C
Raw Normal View History

2009-12-26 22:35:45 +01:00
#ifndef RADIOPLAYLISTITEM_H
#define RADIOPLAYLISTITEM_H
#include "playlistitem.h"
2009-12-26 23:15:57 +01:00
#include "song.h"
2009-12-26 22:35:45 +01:00
#include <QUrl>
class RadioService;
class RadioPlaylistItem : public PlaylistItem {
public:
RadioPlaylistItem();
2010-01-18 03:23:55 +01:00
RadioPlaylistItem(RadioService* service, const QUrl& url,
const QString& title, const QString& artist);
2009-12-26 22:35:45 +01:00
Type type() const { return Type_Radio; }
2009-12-29 17:12:08 +01:00
Options options() const;
2009-12-26 22:35:45 +01:00
void Save(QSettings& settings) const;
void Restore(const QSettings& settings);
2009-12-29 20:22:02 +01:00
Song Metadata() const;
2009-12-26 22:35:45 +01:00
2009-12-29 17:12:08 +01:00
void StartLoading();
2009-12-26 22:35:45 +01:00
QUrl Url();
2009-12-29 17:12:08 +01:00
void LoadNext();
2009-12-26 23:15:57 +01:00
void SetTemporaryMetadata(const Song& metadata);
void ClearTemporaryMetadata();
2009-12-29 20:22:02 +01:00
private:
void InitMetadata();
2009-12-26 22:35:45 +01:00
private:
RadioService* service_;
QUrl url_;
2009-12-26 23:15:57 +01:00
QString title_;
2010-01-18 03:23:55 +01:00
QString artist_;
2009-12-26 23:15:57 +01:00
Song metadata_;
2009-12-29 20:22:02 +01:00
Song temp_metadata_;
2009-12-26 22:35:45 +01:00
};
#endif // RADIOPLAYLISTITEM_H