MythTV  master
netutils.h
Go to the documentation of this file.
1 #ifndef NETUTILS_H_
2 #define NETUTILS_H_
3 
4 #include <QString>
5 #include <QDateTime>
6 
7 #include "rssparse.h"
8 #include "netgrabbermanager.h"
9 #include "mythrssmanager.h"
10 
11 // Generic Data Formatting
12 MPUBLIC QString GetDownloadFilename(const QString& title, const QString& url);
13 
14 // Tree DB Utils
15 
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);
26 
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,
33 
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);
41 
44 MPUBLIC bool removeGrabberFromDB(const QString &commandline, const bool &search);
45 
46 // RSS DB Utils
47 
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);
58 
59 MPUBLIC bool removeFromDB(RSSSite *site);
60 MPUBLIC bool removeFromDB(const QString &url, ArticleType type);
61 
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,
68 
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
QList< RSSSite * > rssList
MPUBLIC GrabberScript::scriptList findAllDBSearchGrabbers(ArticleType type)
Definition: netutils.cpp:184
unsigned int uint
Definition: compat.h:140
QList< GrabberScript * > scriptList
MPUBLIC RSSSite * findByURL(const QString &url, ArticleType type)
Definition: netutils.cpp:539
MPUBLIC bool markTreeUpdated(GrabberScript *script, const QDateTime &curTime)
Definition: netutils.cpp:310
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
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
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
const char * name
Definition: ParseText.cpp:328
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
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
QList< ResultItem * > resultList
Definition: rssparse.h:114
MPUBLIC void markUpdated(RSSSite *site)
Definition: netutils.cpp:704
enum ArticleTypes ArticleType
MPUBLIC ResultItem::resultList getRSSArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:794