[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [amarok] src: Remove unused AudioCdTrackProvider
From:       Matěj_Laitl <matej () laitl ! cz>
Date:       2013-02-17 17:39:38
Message-ID: 20130217173938.64696A6091 () git ! kde ! org
[Download RAW message or body]

Git commit d6251e08012056b1e3920edb7ae2d451bcdf9218 by Matěj Laitl.
Committed on 17/02/2013 at 18:38.
Pushed by laitl into branch 'master'.

Remove unused AudioCdTrackProvider

Amount of crap we have never stops to surprise me.

M  +0    -11   src/CMakeLists.txt
D  +0    -49   src/core-impl/meta/cdda/AudioCdTrackProvider.cpp
D  +0    -46   src/core-impl/meta/cdda/AudioCdTrackProvider.h
D  +0    -123  src/core-impl/meta/cdda/AudioCdTrackProvider_p.cpp
D  +0    -42   src/core-impl/meta/cdda/AudioCdTrackProvider_p.h

http://commits.kde.org/amarok/d6251e08012056b1e3920edb7ae2d451bcdf9218

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 043dc64..1152ca9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -428,17 +428,6 @@ kde4_add_ui_files(libplaylist_SRCS
 )
 
 #####################################################################
-# AUDIO CD SUPPORT
-#####################################################################
-
-if(KDEMULTIMEDIA_FOUND)
-    set(audiocdsupport_SRCS
-        core-impl/meta/cdda/AudioCdTrackProvider.cpp
-        core-impl/meta/cdda/AudioCdTrackProvider_p.cpp
-       )
-endif(KDEMULTIMEDIA_FOUND)
-
-#####################################################################
 # DYNAMIC
 #####################################################################
 set(libdynamic_SRCS
diff --git a/src/core-impl/meta/cdda/AudioCdTrackProvider.cpp \
b/src/core-impl/meta/cdda/AudioCdTrackProvider.cpp deleted file mode 100644
index 702e324..0000000
--- a/src/core-impl/meta/cdda/AudioCdTrackProvider.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************************
                
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick@googlemail.com>         \
                *
- *                                                                                   \
                *
- * This program 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 2 of the License, or (at your option) any later        \
                *
- * version.                                                                          \
                *
- *                                                                                   \
                *
- * This program 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      \
                *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                        \
                *
- ****************************************************************************************/
                
-
-#include "CDDAManager.h"
-#include "CDDAManager_p.h"
-
-CDDAManager::CDDAManager( QObject *parent )
-    : QObject( parent )
-    , d( new Private() )
-{
-}
-
-CDDAManager::~CDDAManager()
-{
-    delete d;
-}
-
-QStringList
-CDDAManager::audioCdUdis() const
-{
-    return QStringList();
-}
-
-QString
-CDDAManager::audioCdName( const QString &udi ) const
-{
-    return QString();
-}
-
-void
-CDDAManager::playAudioCd( const QString &udi ) const
-{
-}
-
-#include "CDDAManager.moc"
-
diff --git a/src/core-impl/meta/cdda/AudioCdTrackProvider.h \
b/src/core-impl/meta/cdda/AudioCdTrackProvider.h deleted file mode 100644
index 2f44c63..0000000
--- a/src/core-impl/meta/cdda/AudioCdTrackProvider.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************************
                
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick@googlemail.com>         \
                *
- *                                                                                   \
                *
- * This program 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 2 of the License, or (at your option) any later        \
                *
- * version.                                                                          \
                *
- *                                                                                   \
                *
- * This program 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      \
                *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                        \
                *
- ****************************************************************************************/
                
-
-#ifndef AUDIOCDTRACKPROVIDER_H
-#define AUDIOCDTRACKPROVIDER_H
-
-#include "core/meta/Meta.h"
-
-#include <QObject>
-#include <QStringList>
-
-/**
- * This manager handles audio cds. Audio CDs require special treatment because
- * we are not operating on files, instead we tell the engine to play the cd \
                directly.
- * Therefore CollectionManager::trackForUrl cannot be used.
- */
-class CDDAManager : public QObject
-{
-    Q_OBJECT
-    public:
-        CDDAManager( QObject *parent );
-        ~CDDAManager();
-
-        QStringList audioCdUdis() const;
-        QString audioCdName( const QString &udi ) const;
-        void playAudioCd( const QString &udi ) const;
-
-    private:
-        class Private;
-        Private * const d;
-};
-
-#endif
diff --git a/src/core-impl/meta/cdda/AudioCdTrackProvider_p.cpp \
b/src/core-impl/meta/cdda/AudioCdTrackProvider_p.cpp deleted file mode 100644
index e697367..0000000
--- a/src/core-impl/meta/cdda/AudioCdTrackProvider_p.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************************************
                
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick@googlemail.com>         \
                *
- *                                                                                   \
                *
- * This program 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 2 of the License, or (at your option) any later        \
                *
- * version.                                                                          \
                *
- *                                                                                   \
                *
- * This program 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      \
                *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                        \
                *
- ****************************************************************************************/
                
-
-#include "AudioCdTrackProvider_p.h"
-
-#include "core/support/Debug.h"
-
-#include <solid/block.h>
-#include <solid/device.h>
-#include <solid/deviceinterface.h>
-#include <solid/devicenotifier.h>
-#include <solid/storagevolume.h>
-
-#include <kcompactdisc.h>
-
-#include <QList>
-
-AudioCdTrackProvider::Private::Private()
-    : QObejct()
-{
-    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceAdded( const QString ) \
                ), SLOT( deviceAdded( const QString ) ) );
-    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceRemoved( const QString \
                ) ), SLOT( deviceRemoved( const QString ) ) );
-    QList<Solid::Device> devices = Solid::Device::listFromType( \
                Solid::DeviceInterface::OpticalDisc );
-    foreach( const Solid::Device &device, devices )
-    {
-        Solid::OpticalDisc *od = device.as<Solid::OpticalDisc>();
-        if( od->availableContent() != Solid::OpticalDisc::Audio )
-        {
-            continue;
-        }
-        if( device.is<Solid::StorageVolume>() )
-        {
-            Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
-            if( sv->isIgnored() )
-            {
-                continue;
-            }
-        }
-        if( device.is<Solid::Block>() )
-        {
-            //does this actually work on windows???
-            Solid::Block *sb = device.as<Solid::Block>();
-            m_cddaDevices.insert( device.udi(), sb->device() );
-        }
-    }
-}
-
-AudioCdTrackProvider::Private::~Private()
-{
-}
-
-void
-AudioCdTrackProvider::Private::deviceAdded( const QString &udi )
-{
-    Solid::Device device( udi );
-    if( !device.is<Solid::OpticalDisc>() )
-    {
-        return;
-    }
-    if( device.is<Solid::StorageVolume>() )
-    {
-        Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
-        if( sv->isIgnored() )
-        {
-            return;
-        }
-    }
-    if( device.is<Solid::Block>() )
-    {
-            //does this actually work on windows???
-        Solid::Block *sb = device.as<Solid::Block>();
-        m_cddaDevices.insert( device.udi(), sb->device() );
-        KCompactDisc cd;
-        cd.setDevice( sb->device() );
-        QList<unsigned> signature = cd.discSignature();
-        if( signature.isEmpty() )
-        {
-            warning() << "Could not get CDDB disc signature for " << sb->device();
-            return;
-        }
-    }
-}
-
-void
-AudioCdTrackProvider::Private::deviceRemoved( const QString &udi )
-{
-    m_cddaDevices.remove( udi );
-}
-
-bool
-AudioCdTrackProvider::Private::isPathOnCd( const QString &path ) const
-{
-    const QStringList paths = m_cdMountPaths.values();
-    foreach( const QString &mountPoint, paths )
-    {
-        //path can be entered by the user, therefore we cannot make any assumptions \
                about the case
-        //of the path on windows -> d:/ and D:/ are equivalent
-#ifdef Q_WS_WIN
-        if( path.startsWith( mountPoint, Qt::CaseInsensitive ) );
-#else
-        if( path.startsWith( mountPoint ) )
-#endif
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-#include "AudioCdTrackProvider_p.moc"
diff --git a/src/core-impl/meta/cdda/AudioCdTrackProvider_p.h \
b/src/core-impl/meta/cdda/AudioCdTrackProvider_p.h deleted file mode 100644
index 17ce27e..0000000
--- a/src/core-impl/meta/cdda/AudioCdTrackProvider_p.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************************
                
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick@googlemail.com>         \
                *
- *                                                                                   \
                *
- * This program 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 2 of the License, or (at your option) any later        \
                *
- * version.                                                                          \
                *
- *                                                                                   \
                *
- * This program 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      \
                *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                        \
                *
- ****************************************************************************************/
                
-
-#ifndef AMAROK_AUDIOCDTRACKPROVIDER_P_H
-#define AMAROK_AUDIOCDTRACKPROVIDER_P_H
-
-#include <QMap>
-#include <QObject>
-#include <QString>
-
-class AudioCdTrackProvider::Private : public QObject
-{
-    Q_OBJECT
-    public:
-        Private();
-        ~Private();
-
-        bool isPathOnCd( const QString &path ) const;
-        
-
-    public slots:
-        void deviceAdded( const QString &udi );
-        void deviceRemoved( const QString &udi );
-
-    private:
-        QMap<QString, QString> m_cddaDevices;
-};
-
-#endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic