2011-08-05 02:15:16 +02:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
Copyright 2010, David Sansome <me@davidsansome.com>
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CDDADEVICE_H
|
|
|
|
#define CDDADEVICE_H
|
|
|
|
|
2012-10-31 18:42:38 +01:00
|
|
|
#include <QMutex>
|
|
|
|
|
|
|
|
// These must come after Qt includes (issue 3247)
|
2011-08-05 02:15:16 +02:00
|
|
|
#include <cdio/cdio.h>
|
2014-09-22 14:28:53 +02:00
|
|
|
#include <gst/audio/gstaudiocdsrc.h>
|
2011-08-05 02:15:16 +02:00
|
|
|
|
2014-10-26 03:32:37 +01:00
|
|
|
#include "cddasongloader.h"
|
2011-08-05 02:15:16 +02:00
|
|
|
#include "connecteddevice.h"
|
|
|
|
#include "core/song.h"
|
|
|
|
#include "musicbrainz/musicbrainzclient.h"
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
class CddaDevice : public ConnectedDevice {
|
2011-08-05 02:15:16 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
public:
|
2011-08-05 02:15:16 +02:00
|
|
|
Q_INVOKABLE CddaDevice(const QUrl& url, DeviceLister* lister,
|
2014-02-07 16:34:20 +01:00
|
|
|
const QString& unique_id, DeviceManager* manager,
|
|
|
|
Application* app, int database_id, bool first_time);
|
2011-08-05 02:15:16 +02:00
|
|
|
~CddaDevice();
|
|
|
|
|
|
|
|
void Init();
|
|
|
|
void Refresh();
|
2011-08-11 01:16:08 +02:00
|
|
|
bool CopyToStorage(const MusicStorage::CopyJob&) { return false; }
|
|
|
|
bool DeleteFromStorage(const MusicStorage::DeleteJob&) { return false; }
|
2011-08-05 02:15:16 +02:00
|
|
|
|
|
|
|
static QStringList url_schemes() { return QStringList() << "cdda"; }
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void SongsDiscovered(const SongList& songs);
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private slots:
|
2014-10-26 03:32:37 +01:00
|
|
|
void SongsLoaded(const SongList& songs);
|
2011-08-05 02:15:16 +02:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private:
|
2014-10-26 03:32:37 +01:00
|
|
|
CddaSongLoader cdda_song_loader_;
|
2011-08-05 02:15:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|