akregator/src

fetchqueue.h

00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2004 Sashmit Bhaduri <smt@vfemail.net>
00005                   2005 Frank Osterfeld <frank.osterfeld at kdemail.net>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020 
00021     As a special exception, permission is given to link this program
00022     with any edition of Qt, and distribute the resulting executable,
00023     without including the source code for Qt in the source distribution.
00024 */
00025 
00026 #ifndef AKREGATOR_FETCHQUEUE_H
00027 #define AKREGATOR_FETCHQUEUE_H
00028 
00029 #include <qobject.h>
00030 
00031 namespace Akregator {
00032 
00033 class Feed;
00034 class TreeNode;
00035 
00036 class FetchQueue : public QObject
00037 {
00038     Q_OBJECT
00039 
00040     public:
00041 
00042         FetchQueue(QObject* parent=0, const char* name=0);
00043         virtual ~FetchQueue();
00044 
00046         bool isEmpty() const;
00047         
00049         void addFeed(Feed *f);
00050 
00051     public slots:
00052     
00054         void slotAbort();
00055         
00056     signals:
00057 
00058         void signalStarted();
00059         void signalStopped();
00060         void fetched(Feed*);
00061         void fetchError(Feed*);
00062 
00063     protected: 
00064 
00066         void fetchNextFeed();
00067         
00068         void feedDone(Feed *f);
00069         void connectToFeed(Feed* feed);
00070         void disconnectFromFeed(Feed* feed);
00071 
00072     protected slots:
00073         
00074         void slotNodeDestroyed(TreeNode* node);
00075         void slotFeedFetched(Feed *);
00076         void slotFetchError(Feed *);
00077         void slotFetchAborted(Feed *);
00078         
00079     private:
00080 
00081         class FetchQueuePrivate;
00082         FetchQueuePrivate* d;
00083 };
00084 
00085 } // namespace Akregator
00086 
00087 #endif
00088 
00089 // vim: set et ts=4 sts=4 sw=4:
00090 
KDE Home | KDE Accessibility Home | Description of Access Keys