File indexing completed on 2024-05-05 04:48:50
0001 /**************************************************************************************** 0002 * Copyright (c) 2010 Bart Cerneels <bart.cerneels@kde.org> * 0003 * Copyright (c) 2011 Lucas Lira Gomes <x8lucas8x@gmail.com> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify it under * 0006 * the terms of the GNU General Public License as published by the Free Software * 0007 * Foundation; either version 2 of the License, or (at your option) any later * 0008 * version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0012 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License along with * 0015 * this program. If not, see <http://www.gnu.org/licenses/>. * 0016 ****************************************************************************************/ 0017 0018 #include "SyncRelationStorage.h" 0019 0020 #include "core/support/Debug.h" 0021 0022 SyncRelationStorage::SyncRelationStorage() 0023 { 0024 } 0025 0026 //TODO: this is a hack. No special cases allowed. 0027 SyncedPlaylistPtr 0028 SyncRelationStorage::createSyncedPlaylist( const Playlists::PlaylistPtr playlist ) 0029 { 0030 DEBUG_BLOCK 0031 debug() << "playlist: " << playlist->uidUrl(); 0032 0033 SyncedPlaylistPtr syncedPlaylist; 0034 0035 if( Podcasts::PodcastChannelPtr::dynamicCast( playlist ) ) 0036 syncedPlaylist = SyncedPlaylistPtr( new SyncedPodcast( 0037 Podcasts::PodcastChannelPtr::dynamicCast( playlist ) ) ); 0038 else 0039 syncedPlaylist = SyncedPlaylistPtr( new SyncedPlaylist( playlist ) ); 0040 0041 return syncedPlaylist; 0042 }