2010-03-24 00:11:46 +01:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
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();
|
2010-03-24 21:58:17 +01:00
|
|
|
QUrl Url() const;
|
2009-12-26 22:35:45 +01:00
|
|
|
|
2009-12-29 17:12:08 +01:00
|
|
|
void LoadNext();
|
2009-12-26 23:59:11 +01:00
|
|
|
|
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
|