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 TQt, and distribute the resulting executable, 00023 without including the source code for TQt in the source distribution. 00024 */ 00025 00026 #ifndef AKREGATOR_FETCHQUEUE_H 00027 #define AKREGATOR_FETCHQUEUE_H 00028 00029 #include <tqobject.h> 00030 00031 namespace Akregator { 00032 00033 class Feed; 00034 class TreeNode; 00035 00036 class FetchQueue : public TQObject 00037 { 00038 Q_OBJECT 00039 00040 00041 public: 00042 00043 FetchQueue(TQObject* parent=0, const char* name=0); 00044 virtual ~FetchQueue(); 00045 00047 bool isEmpty() const; 00048 00050 void addFeed(Feed *f); 00051 00052 public slots: 00053 00055 void slotAbort(); 00056 00057 signals: 00058 00059 void signalStarted(); 00060 void signalStopped(); 00061 void fetched(Feed*); 00062 void fetchError(Feed*); 00063 00064 protected: 00065 00067 void fetchNextFeed(); 00068 00069 void feedDone(Feed *f); 00070 void connectToFeed(Feed* feed); 00071 void disconnectFromFeed(Feed* feed); 00072 00073 protected slots: 00074 00075 void slotNodeDestroyed(TreeNode* node); 00076 void slotFeedFetched(Feed *); 00077 void slotFetchError(Feed *); 00078 void slotFetchAborted(Feed *); 00079 00080 private: 00081 00082 class FetchQueuePrivate; 00083 FetchQueuePrivate* d; 00084 }; 00085 00086 } // namespace Akregator 00087 00088 #endif 00089 00090 // vim: set et ts=4 sts=4 sw=4: 00091