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 "mythbaseexp.h"
8#include "rssparse.h"
9#include "netgrabbermanager.h"
10#include "rssmanager.h"
11
12// Generic Data Formatting
13MBASE_PUBLIC QString GetDownloadFilename(const QString& title, const QString& url);
14
15// Tree DB Utils
16
17MBASE_PUBLIC bool findTreeGrabberInDB(const QString &commandline, ArticleType type);
21MBASE_PUBLIC bool findSearchGrabberInDB(const QString &commandline, ArticleType type);
24MBASE_PUBLIC bool markTreeUpdated(GrabberScript *script, const QDateTime& curTime);
25MBASE_PUBLIC bool needsUpdate(GrabberScript *script, std::chrono::hours updateFreq);
26MBASE_PUBLIC QDateTime lastUpdate(GrabberScript* script);
27
28MBASE_PUBLIC bool clearTreeItems(const QString &feedcommand);
29MBASE_PUBLIC bool isTreeInUse(const QString &feedcommand);
30MBASE_PUBLIC bool insertTreeArticleInDB(const QString &feedtitle, const QString &path,
31 const QString &paththumb, ResultItem *item, ArticleType type);
32MBASE_PUBLIC QMultiMap<QPair<QString,QString>, ResultItem*> getTreeArticles(const QString &feedtitle,
34
37MBASE_PUBLIC bool insertGrabberInDB(const QString &name, const QString &thumbnail,
38 ArticleType type, const QString &author,
39 const QString &description, const QString &commandline,
40 double version, bool search, bool tree,
41 bool podcast);
42
45MBASE_PUBLIC bool removeGrabberFromDB(const QString &commandline, bool search);
46
47// RSS DB Utils
48
49MBASE_PUBLIC bool findInDB(const QString &url, ArticleType type);
50MBASE_PUBLIC RSSSite* findByURL(const QString &url, ArticleType type);
54MBASE_PUBLIC bool insertInDB(const QString &name, const QString &sortname,
55 const QString &thumbnail,
56 const QString &description, const QString &url,
57 const QString &author, bool download,
58 const QDateTime &updated, ArticleType type);
59
61MBASE_PUBLIC bool removeFromDB(const QString &url, ArticleType type);
62
64MBASE_PUBLIC bool clearRSSArticles(const QString &feedtitle, ArticleType type);
65MBASE_PUBLIC bool insertRSSArticleInDB(const QString &feedtitle, ResultItem *item,
69
70#endif // NETUTILS_H_
QList< GrabberScript * > scriptList
QList< RSSSite * > rssList
Definition: rssmanager.h:53
QList< ResultItem * > resultList
Definition: rssparse.h:114
#define MBASE_PUBLIC
Definition: mythbaseexp.h:15
string version
Definition: giantbomb.py:185
MBASE_PUBLIC RSSSite::rssList findAllDBRSSByType(ArticleType type)
Definition: netutils.cpp:577
MBASE_PUBLIC QMultiMap< QPair< QString, QString >, ResultItem * > getTreeArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:463
MBASE_PUBLIC bool markTreeUpdated(GrabberScript *script, const QDateTime &curTime)
Definition: netutils.cpp:314
MBASE_PUBLIC bool removeSearchFromDB(GrabberScript *script)
Definition: netutils.cpp:283
MBASE_PUBLIC bool insertRSSArticleInDB(const QString &feedtitle, ResultItem *item, ArticleType type)
Definition: netutils.cpp:742
MBASE_PUBLIC bool isTreeInUse(const QString &feedcommand)
Definition: netutils.cpp:379
MBASE_PUBLIC bool findInDB(const QString &url, ArticleType type)
Definition: netutils.cpp:527
MBASE_PUBLIC bool removeGrabberFromDB(const QString &commandline, bool search)
Definition: netutils.cpp:290
MBASE_PUBLIC bool findSearchGrabberInDB(const QString &commandline, ArticleType type)
Definition: netutils.cpp:31
MBASE_PUBLIC QDateTime lastUpdate(GrabberScript *script)
Definition: netutils.cpp:338
MBASE_PUBLIC ResultItem::resultList getRSSArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:797
MBASE_PUBLIC bool insertSearchInDB(GrabberScript *script, ArticleType type)
Definition: netutils.cpp:219
MBASE_PUBLIC GrabberScript::scriptList findAllDBSearchGrabbers(ArticleType type)
Definition: netutils.cpp:184
MBASE_PUBLIC void markUpdated(RSSSite *site)
Definition: netutils.cpp:708
MBASE_PUBLIC bool findTreeGrabberInDB(const QString &commandline, ArticleType type)
Definition: netutils.cpp:11
MBASE_PUBLIC GrabberScript * findTreeGrabberByCommand(const QString &url, ArticleType type)
Definition: netutils.cpp:51
MBASE_PUBLIC bool insertTreeArticleInDB(const QString &feedtitle, const QString &path, const QString &paththumb, ResultItem *item, ArticleType type)
Definition: netutils.cpp:399
MBASE_PUBLIC RSSSite::rssList findAllDBRSS(void)
Definition: netutils.cpp:610
MBASE_PUBLIC bool clearRSSArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:722
MBASE_PUBLIC GrabberScript * findSearchGrabberByCommand(const QString &url, ArticleType type)
Definition: netutils.cpp:83
MBASE_PUBLIC bool insertGrabberInDB(const QString &name, const QString &thumbnail, ArticleType type, const QString &author, const QString &description, const QString &commandline, double version, bool search, bool tree, bool podcast)
Definition: netutils.cpp:241
MBASE_PUBLIC GrabberScript::scriptList findAllDBTreeGrabbers(void)
Definition: netutils.cpp:115
MBASE_PUBLIC RSSSite * findByURL(const QString &url, ArticleType type)
Definition: netutils.cpp:542
MBASE_PUBLIC bool clearTreeItems(const QString &feedcommand)
Definition: netutils.cpp:360
MBASE_PUBLIC GrabberScript::scriptList findAllDBTreeGrabbersByHost(ArticleType type)
Definition: netutils.cpp:149
MBASE_PUBLIC bool removeFromDB(RSSSite *site)
Definition: netutils.cpp:686
MBASE_PUBLIC bool needsUpdate(GrabberScript *script, std::chrono::hours updateFreq)
Definition: netutils.cpp:330
MBASE_PUBLIC bool removeTreeFromDB(GrabberScript *script)
Definition: netutils.cpp:276
MBASE_PUBLIC bool insertInDB(RSSSite *site)
Definition: netutils.cpp:643
MBASE_PUBLIC bool insertTreeInDB(GrabberScript *script, ArticleType type)
Definition: netutils.cpp:230
MBASE_PUBLIC QString GetDownloadFilename(const QString &title, const QString &url)
Definition: netutils.cpp:854
ArticleType
Definition: rssparse.h:20