File indexing completed on 2024-05-05 04:49:16
0001 /**************************************************************************************** 0002 * Copyright (c) 2008 Casey Link <unnamedrambler@gmail.com> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) any later * 0007 * version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0012 * * 0013 * You should have received a copy of the GNU General Public License along with * 0014 * this program. If not, see <http://www.gnu.org/licenses/>. * 0015 ****************************************************************************************/ 0016 0017 #include "ServiceCollectionLocation.h" 0018 #include "core/support/Debug.h" 0019 0020 using namespace Collections; 0021 0022 ServiceCollectionLocation::ServiceCollectionLocation() 0023 : CollectionLocation() 0024 , m_removeSources( false ) 0025 , m_overwriteFiles( false ) 0026 {} 0027 0028 ServiceCollectionLocation::ServiceCollectionLocation( ServiceCollection *parentCollection ) 0029 : CollectionLocation( parentCollection ) 0030 , m_collection( parentCollection ) 0031 , m_removeSources( false ) 0032 , m_overwriteFiles( false ) 0033 {} 0034 0035 ServiceCollectionLocation::~ServiceCollectionLocation() 0036 { 0037 } 0038 0039 QString ServiceCollectionLocation::prettyLocation() const 0040 { 0041 return QString(); 0042 } 0043 0044 bool ServiceCollectionLocation::isWritable() const 0045 { 0046 return false; 0047 } 0048 0049 bool ServiceCollectionLocation::isOrganizable() const 0050 { 0051 return false; 0052 } 0053 0054 void 0055 ServiceCollectionLocation::getKIOCopyableUrls( const Meta::TrackList &tracks ) 0056 { 0057 QMap<Meta::TrackPtr, QUrl> urls; 0058 foreach( const Meta::TrackPtr &track, tracks ) 0059 { 0060 Meta::ServiceTrack *servtrack = static_cast<Meta::ServiceTrack *>( track.data() ); 0061 if( servtrack->isPlayable() ) 0062 urls.insert( track, servtrack->downloadableUrl() ); 0063 } 0064 0065 slotGetKIOCopyableUrlsDone( urls ); 0066 }