2 Copyright (c) 2005 by Volker Krause <vkrause@kde.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 You should have received a copy of the GNU General Public License
9 along with this program; if not, write to the Free Software Foundation,
10 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
13 #ifndef KNODE_NNTPJOBS_H
14 #define KNODE_NNTPJOBS_H
16 #include "knjobdata.h"
17 #include "kngroupmanager.h"
27 /** Download and update newsgroups lists */
28 class GroupListJob
: public KNJobData
32 GroupListJob( KNJobConsumer
*c
, KNServerInfo::Ptr a
, KNJobItem::Ptr i
, bool incremental
= false );
34 virtual void execute();
37 void slotEntries( KIO::Job
*job
, const KIO::UDSEntryList
&list
);
38 void slotResult( KJob
*job
);
41 QList
<KNGroupInfo
> mGroupList
;
47 /** Loads the newsgroup list from the disk. */
48 class GroupLoadJob
: public KNJobData
51 GroupLoadJob( KNJobConsumer
*c
, KNServerInfo::Ptr a
, KNJobItem::Ptr i
);
53 virtual void execute();
58 /** Downloads all or a selected part of the article list for a specific
61 class ArticleListJob
: public KNJobData
65 ArticleListJob( KNJobConsumer
*c
, KNServerInfo::Ptr a
, KNJobItem::Ptr i
, bool silent
= false );
67 virtual void execute();
68 /** Returns whether an error message should be shown. */
69 bool silent() { return mSilent
; }
72 void slotEntries( KIO::Job
*job
, const KIO::UDSEntryList
&list
);
73 void slotResult( KJob
*_job
);
76 KIO::UDSEntryList mArticleList
;
82 /** Downloads one specific article from the news server. */
83 class ArticleFetchJob
: public KNJobData
87 ArticleFetchJob( KNJobConsumer
*c
, KNServerInfo::Ptr a
, KNJobItem::Ptr i
, bool parse
= true );
89 virtual void execute();
92 void slotResult( KJob
*job
);
100 /** Post a article to the given news server. */
101 class ArticlePostJob
: public KNJobData
105 ArticlePostJob( KNJobConsumer
*c
, KNServerInfo::Ptr a
, KNJobItem::Ptr i
);
107 virtual void execute();
110 void slotResult( KJob
*job
);