File indexing completed on 2024-05-19 04:50:11

0001 /****************************************************************************************
0002  * Copyright (c) 2011 Stefan Derkits <stefan@derkits.at>                                *
0003  * Copyright (c) 2011 Christian Wagner <christian.wagner86@gmx.at>                      *
0004  * Copyright (c) 2011 Felix Winter <ixos01@gmail.com>                                   *
0005  *                                                                                      *
0006  * This program is free software; you can redistribute it and/or modify it under        *
0007  * the terms of the GNU General Public License as published by the Free Software        *
0008  * Foundation; either version 2 of the License, or (at your option) any later           *
0009  * version.                                                                             *
0010  *                                                                                      *
0011  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0012  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0013  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0014  *                                                                                      *
0015  * You should have received a copy of the GNU General Public License along with         *
0016  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0017  ****************************************************************************************/
0018 
0019 #include "GpodderPodcastRequestHandler.h"
0020 
0021 #include "core/support/Debug.h"
0022 
0023 GpodderPodcastRequestHandler::GpodderPodcastRequestHandler( mygpo::PodcastListPtr podcasts, const QModelIndex &parentItem,
0024         GpodderServiceModel *model )
0025     : QObject( model )
0026     , m_podcasts( podcasts )
0027     , m_parentItem( parentItem )
0028     , m_model( model )
0029 {
0030 }
0031 
0032 GpodderPodcastRequestHandler::~GpodderPodcastRequestHandler()
0033 {
0034 
0035 }
0036 
0037 void GpodderPodcastRequestHandler::finished()
0038 {
0039     m_model->insertPodcastList( m_podcasts, m_parentItem );
0040 }
0041 
0042 void GpodderPodcastRequestHandler::requestError( QNetworkReply::NetworkError error )
0043 {
0044     debug() << "Error in Podcast request: " << error;
0045 }
0046 
0047 void GpodderPodcastRequestHandler::parseError()
0048 {
0049     debug() << "Error while parsing gpodder.net Podcasts";
0050 }