MythTV  master
Go to the documentation of this file.
1 #ifndef NETUTILS_H_
2 #define NETUTILS_H_
4 #include <QString>
5 #include <QDateTime>
7 #include "rssparse.h"
8 #include "netgrabbermanager.h"
9 #include "mythrssmanager.h"
11 // Generic Data Formatting
12 MPUBLIC QString GetDownloadFilename(const QString& title, const QString& url);
14 // Tree DB Utils
16 MPUBLIC bool findTreeGrabberInDB(const QString &commandline, ArticleType type);
20 MPUBLIC bool findSearchGrabberInDB(const QString &commandline, ArticleType type);
23 MPUBLIC bool markTreeUpdated(GrabberScript *script, const QDateTime& curTime);
24 MPUBLIC bool needsUpdate(GrabberScript *script, uint updateFreq);
25 MPUBLIC QDateTime lastUpdate(GrabberScript* script);
27 MPUBLIC bool clearTreeItems(const QString &feedcommand);
28 MPUBLIC bool isTreeInUse(const QString &feedcommand);
29 MPUBLIC bool insertTreeArticleInDB(const QString &feedtitle, const QString &path,
30  const QString &paththumb, ResultItem *item, ArticleType type);
31 MPUBLIC QMultiMap<QPair<QString,QString>, ResultItem*> getTreeArticles(const QString &feedtitle,
36 MPUBLIC bool insertGrabberInDB(const QString &name, const QString &thumbnail,
37  ArticleType type, const QString &author,
38  const QString &description, const QString &commandline,
39  const double &version, bool search, bool tree,
40  bool podcast);
44 MPUBLIC bool removeGrabberFromDB(const QString &commandline, const bool &search);
46 // RSS DB Utils
48 MPUBLIC bool findInDB(const QString &url, ArticleType type);
49 MPUBLIC RSSSite* findByURL(const QString &url, ArticleType type);
52 MPUBLIC bool insertInDB(RSSSite *site);
53 MPUBLIC bool insertInDB(const QString &name, const QString &sortname,
54  const QString &thumbnail,
55  const QString &description, const QString &url,
56  const QString &author, const bool &download,
57  const QDateTime &updated, ArticleType type);
59 MPUBLIC bool removeFromDB(RSSSite *site);
60 MPUBLIC bool removeFromDB(const QString &url, ArticleType type);
62 MPUBLIC void markUpdated(RSSSite *site);
63 MPUBLIC bool clearRSSArticles(const QString &feedtitle, ArticleType type);
64 MPUBLIC bool insertRSSArticleInDB(const QString &feedtitle, ResultItem *item,
66 MPUBLIC ResultItem::resultList getRSSArticles(const QString &feedtitle,
69 #endif // NETUTILS_H_
MPUBLIC GrabberScript * findTreeGrabberByCommand(const QString &url, ArticleType type)
Definition: netutils.cpp:51
MPUBLIC bool findSearchGrabberInDB(const QString &commandline, ArticleType type)
Definition: netutils.cpp:31
MPUBLIC QMultiMap< QPair< QString, QString >, ResultItem * > getTreeArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:460
#define MPUBLIC
Definition: mythexp.h:10
MPUBLIC bool clearTreeItems(const QString &feedcommand)
Definition: netutils.cpp:356
MPUBLIC bool removeFromDB(RSSSite *site)
Definition: netutils.cpp:682
MPUBLIC bool removeSearchFromDB(GrabberScript *script)
Definition: netutils.cpp:283
MPUBLIC bool findInDB(const QString &url, ArticleType type)
Definition: netutils.cpp:524
MPUBLIC GrabberScript::scriptList findAllDBSearchGrabbers(ArticleType type)
Definition: netutils.cpp:184
MPUBLIC RSSSite * findByURL(const QString &url, ArticleType type)
Definition: netutils.cpp:539
MPUBLIC bool markTreeUpdated(GrabberScript *script, const QDateTime &curTime)
Definition: netutils.cpp:310
QList< ResultItem * > resultList
Definition: rssparse.h:114
MPUBLIC QString GetDownloadFilename(const QString &title, const QString &url)
Definition: netutils.cpp:851
MPUBLIC GrabberScript * findSearchGrabberByCommand(const QString &url, ArticleType type)
Definition: netutils.cpp:83
MPUBLIC RSSSite::rssList findAllDBRSS(void)
Definition: netutils.cpp:607
Definition: rssparse.h:20
QList< GrabberScript * > scriptList
MPUBLIC bool insertInDB(RSSSite *site)
Definition: netutils.cpp:640
MPUBLIC bool insertTreeArticleInDB(const QString &feedtitle, const QString &path, const QString &paththumb, ResultItem *item, ArticleType type)
Definition: netutils.cpp:395
MPUBLIC bool findTreeGrabberInDB(const QString &commandline, ArticleType type)
Definition: netutils.cpp:11
unsigned int uint
Definition: compat.h:140
MPUBLIC bool insertRSSArticleInDB(const QString &feedtitle, ResultItem *item, ArticleType type)
Definition: netutils.cpp:738
MPUBLIC GrabberScript::scriptList findAllDBTreeGrabbersByHost(ArticleType type)
Definition: netutils.cpp:149
MPUBLIC bool removeGrabberFromDB(const QString &commandline, const bool &search)
Definition: netutils.cpp:290
MPUBLIC bool insertTreeInDB(GrabberScript *script, ArticleType type)
Definition: netutils.cpp:230
MPUBLIC RSSSite::rssList findAllDBRSSByType(ArticleType type)
Definition: netutils.cpp:574
MPUBLIC bool needsUpdate(GrabberScript *script, uint updateFreq)
Definition: netutils.cpp:326
QList< RSSSite * > rssList
MPUBLIC GrabberScript::scriptList findAllDBTreeGrabbers(void)
Definition: netutils.cpp:115
MPUBLIC bool clearRSSArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:718
MPUBLIC QDateTime lastUpdate(GrabberScript *script)
Definition: netutils.cpp:334
MPUBLIC bool insertSearchInDB(GrabberScript *script, ArticleType type)
Definition: netutils.cpp:219
MPUBLIC bool insertGrabberInDB(const QString &name, const QString &thumbnail, ArticleType type, const QString &author, const QString &description, const QString &commandline, const double &version, bool search, bool tree, bool podcast)
Definition: netutils.cpp:241
MPUBLIC bool removeTreeFromDB(GrabberScript *script)
Definition: netutils.cpp:276
MPUBLIC bool isTreeInUse(const QString &feedcommand)
Definition: netutils.cpp:375
MPUBLIC void markUpdated(RSSSite *site)
Definition: netutils.cpp:704
MPUBLIC ResultItem::resultList getRSSArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:794