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

Engines

rss.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright (C) 2007 Aaron Seigo <aseigo@kde.org>
00003  *   Copyright (C) 2007 Petri Damsten <damu@iki.fi>
00004  *   Copyright (C) 2008 Rob Scheepmaker <r.scheepmaker@student.utwente.nl>
00005  *
00006  *   This program is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU Library General Public License version 2 as
00008  *   published by the Free Software Foundation
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details
00014  *
00015  *   You should have received a copy of the GNU Library General Public
00016  *   License along with this program; if not, write to the
00017  *   Free Software Foundation, Inc.,
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 #ifndef RSS_DATAENGINE_H
00022 #define RSS_DATAENGINE_H
00023 
00024 #include <syndication/item.h>
00025 #include <syndication/loader.h>
00026 #include <syndication/feed.h> 
00027 #include <Plasma/DataEngine>
00028 
00029 class QDBusInterface;
00030 class QSignalMapper;
00031 
00041 class RssEngine : public Plasma::DataEngine
00042 {
00043     Q_OBJECT
00044 
00045     public:
00046         RssEngine(QObject* parent, const QVariantList& args);
00047         virtual ~RssEngine();
00048 
00049     protected:
00050         bool sourceRequestEvent(const QString &name);
00051         bool updateSourceEvent(const QString& name);
00052 
00053     protected slots:
00054         void processRss(Syndication::Loader* loader,
00055                         Syndication::FeedPtr feed,
00056                         Syndication::ErrorCode error);
00057         void slotIconChanged(bool isHost, const QString& hostOrURL,
00058                                           const QString& iconName);
00059         void timeout(const QString & source);
00060 
00061     private:
00062         QVariantList mergeFeeds(QString source) const;
00063         void updateFeeds(const QString & source,
00064                          const QString & title);
00065         bool cachesUpToDate(const QString & source) const;
00066         QString iconLocation(const KUrl & url) const;
00067 
00068         QHash<Syndication::Loader*, QString> m_feedMap;
00069         QHash<Syndication::Loader*, QString> m_sourceMap;
00070         QHash<QString, QTimer*>              m_timerMap;
00071         QHash<QString, QVariantList>         m_feedItems;
00072         QHash<QString, QString>              m_feedIcons;
00073         QHash<QString, QString>              m_feedTitles;
00074         QHash<QString, QDateTime>            m_feedTimes;
00075 
00076         QDBusInterface *                     m_favIconsModule;
00077         QSignalMapper *                      m_signalMapper;
00078 };
00079 
00080 K_EXPORT_PLASMA_DATAENGINE(rss, RssEngine)
00081 
00082 #endif
00083 

Engines

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
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