• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

akregator

articlejobs.h

Go to the documentation of this file.
00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2007 Frank Osterfeld <osterfeld@kde.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 
00025 #ifndef AKREGATOR_ARTICLE_JOBS_H
00026 #define AKREGATOR_ARTICLE_JOBS_H
00027 
00028 #include <KJob>
00029 
00030 #include <QList>
00031 #include <QMap>
00032 #include <QString>
00033 
00034 //transitional job classes
00035 namespace Akregator {
00036 
00037 class FeedList;
00038 
00039 struct ArticleId
00040 {
00041     QString feedUrl;
00042     QString guid;
00043     bool operator<( const ArticleId& other ) const
00044     {
00045         return feedUrl < other.feedUrl || ( feedUrl == other.feedUrl  && guid < other.guid );
00046     }
00047 };
00048 
00049 typedef QList<Akregator::ArticleId> ArticleIdList;
00050 
00051 class ArticleDeleteJob : public KJob
00052 {
00053     Q_OBJECT
00054 public:
00055     explicit ArticleDeleteJob( QObject* parent = 0 );
00056 
00057     void appendArticleIds( const Akregator::ArticleIdList& ids );
00058     void appendArticleId( const Akregator::ArticleId& id );
00059 
00060     void start();
00061     
00062 private Q_SLOTS:
00063     void doStart();
00064     
00065 private:
00066     Akregator::FeedList* m_feedList;
00067     ArticleIdList m_ids;
00068 };
00069 
00070 class ArticleModifyJob : public KJob
00071 {
00072     Q_OBJECT
00073 public:
00074     explicit ArticleModifyJob( QObject* parent = 0 );
00075 
00076     // TODO replace this by passing modified item later
00077     void setStatus( const ArticleId& id, int status );
00078     void setKeep( const ArticleId& id, bool keep );
00079 
00080     void start();
00081 
00082 private Q_SLOTS:
00083     void doStart();
00084 
00085 private:
00086     Akregator::FeedList* m_feedList;
00087     QMap<ArticleId, bool> m_keepFlags;
00088     QMap<ArticleId, int> m_status;
00089 };
00090 
00091 } // namespace akregator
00092 
00093 #endif // AKREGATOR_ARTICLE_JOBS_H

akregator

Skip menu "akregator"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal