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
13 MBASE_PUBLIC QString GetDownloadFilename(const QString& title, const QString& url);
14 
15 // Tree DB Utils
16 
17 MBASE_PUBLIC bool findTreeGrabberInDB(const QString &commandline, ArticleType type);
21 MBASE_PUBLIC bool findSearchGrabberInDB(const QString &commandline, ArticleType type);
24 MBASE_PUBLIC bool markTreeUpdated(GrabberScript *script, const QDateTime& curTime);
25 MBASE_PUBLIC bool needsUpdate(GrabberScript *script, std::chrono::hours updateFreq);
26 MBASE_PUBLIC QDateTime lastUpdate(GrabberScript* script);
27 
28 MBASE_PUBLIC bool clearTreeItems(const QString &feedcommand);
29 MBASE_PUBLIC bool isTreeInUse(const QString &feedcommand);
30 MBASE_PUBLIC bool insertTreeArticleInDB(const QString &feedtitle, const QString &path,
31  const QString &paththumb, ResultItem *item, ArticleType type);
32 MBASE_PUBLIC QMultiMap<QPair<QString,QString>, ResultItem*> getTreeArticles(const QString &feedtitle,
34 
37 MBASE_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 
45 MBASE_PUBLIC bool removeGrabberFromDB(const QString &commandline, bool search);
46 
47 // RSS DB Utils
48 
49 MBASE_PUBLIC bool findInDB(const QString &url, ArticleType type);
50 MBASE_PUBLIC RSSSite* findByURL(const QString &url, ArticleType type);
53 MBASE_PUBLIC bool insertInDB(RSSSite *site);
54 MBASE_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 
61 MBASE_PUBLIC bool removeFromDB(const QString &url, ArticleType type);
62 
63 MBASE_PUBLIC void markUpdated(RSSSite *site);
64 MBASE_PUBLIC bool clearRSSArticles(const QString &feedtitle, ArticleType type);
65 MBASE_PUBLIC bool insertRSSArticleInDB(const QString &feedtitle, ResultItem *item,
67 MBASE_PUBLIC ResultItem::resultList getRSSArticles(const QString &feedtitle,
69 
70 #endif // NETUTILS_H_
findAllDBTreeGrabbers
MBASE_PUBLIC GrabberScript::scriptList findAllDBTreeGrabbers(void)
Definition: netutils.cpp:115
getTreeArticles
MBASE_PUBLIC QMultiMap< QPair< QString, QString >, ResultItem * > getTreeArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:463
mythbaseexp.h
removeTreeFromDB
MBASE_PUBLIC bool removeTreeFromDB(GrabberScript *script)
Definition: netutils.cpp:276
rssparse.h
GetDownloadFilename
MBASE_PUBLIC QString GetDownloadFilename(const QString &title, const QString &url)
Definition: netutils.cpp:854
findSearchGrabberByCommand
MBASE_PUBLIC GrabberScript * findSearchGrabberByCommand(const QString &url, ArticleType type)
Definition: netutils.cpp:83
lastUpdate
MBASE_PUBLIC QDateTime lastUpdate(GrabberScript *script)
Definition: netutils.cpp:338
insertTreeInDB
MBASE_PUBLIC bool insertTreeInDB(GrabberScript *script, ArticleType type)
Definition: netutils.cpp:230
findAllDBRSS
MBASE_PUBLIC RSSSite::rssList findAllDBRSS(void)
Definition: netutils.cpp:610
GrabberScript::scriptList
QList< GrabberScript * > scriptList
Definition: netgrabbermanager.h:52
MBASE_PUBLIC
#define MBASE_PUBLIC
Definition: mythbaseexp.h:15
markUpdated
MBASE_PUBLIC void markUpdated(RSSSite *site)
Definition: netutils.cpp:708
rssmanager.h
netgrabbermanager.h
needsUpdate
MBASE_PUBLIC bool needsUpdate(GrabberScript *script, std::chrono::hours updateFreq)
Definition: netutils.cpp:330
clearRSSArticles
MBASE_PUBLIC bool clearRSSArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:722
findSearchGrabberInDB
MBASE_PUBLIC bool findSearchGrabberInDB(const QString &commandline, ArticleType type)
Definition: netutils.cpp:31
insertInDB
MBASE_PUBLIC bool insertInDB(RSSSite *site)
Definition: netutils.cpp:643
GrabberScript
Definition: netgrabbermanager.h:17
ArticleType
ArticleType
Definition: rssparse.h:20
removeFromDB
MBASE_PUBLIC bool removeFromDB(RSSSite *site)
Definition: netutils.cpp:686
findTreeGrabberInDB
MBASE_PUBLIC bool findTreeGrabberInDB(const QString &commandline, ArticleType type)
Definition: netutils.cpp:11
isTreeInUse
MBASE_PUBLIC bool isTreeInUse(const QString &feedcommand)
Definition: netutils.cpp:379
findTreeGrabberByCommand
MBASE_PUBLIC GrabberScript * findTreeGrabberByCommand(const QString &url, ArticleType type)
Definition: netutils.cpp:51
ResultItem
Definition: rssparse.h:109
findByURL
MBASE_PUBLIC RSSSite * findByURL(const QString &url, ArticleType type)
Definition: netutils.cpp:542
markTreeUpdated
MBASE_PUBLIC bool markTreeUpdated(GrabberScript *script, const QDateTime &curTime)
Definition: netutils.cpp:314
ResultItem::resultList
QList< ResultItem * > resultList
Definition: rssparse.h:114
findInDB
MBASE_PUBLIC bool findInDB(const QString &url, ArticleType type)
Definition: netutils.cpp:527
insertRSSArticleInDB
MBASE_PUBLIC bool insertRSSArticleInDB(const QString &feedtitle, ResultItem *item, ArticleType type)
Definition: netutils.cpp:742
insertSearchInDB
MBASE_PUBLIC bool insertSearchInDB(GrabberScript *script, ArticleType type)
Definition: netutils.cpp:219
removeGrabberFromDB
MBASE_PUBLIC bool removeGrabberFromDB(const QString &commandline, bool search)
Definition: netutils.cpp:290
removeSearchFromDB
MBASE_PUBLIC bool removeSearchFromDB(GrabberScript *script)
Definition: netutils.cpp:283
getRSSArticles
MBASE_PUBLIC ResultItem::resultList getRSSArticles(const QString &feedtitle, ArticleType type)
Definition: netutils.cpp:797
findAllDBSearchGrabbers
MBASE_PUBLIC GrabberScript::scriptList findAllDBSearchGrabbers(ArticleType type)
Definition: netutils.cpp:184
findAllDBTreeGrabbersByHost
MBASE_PUBLIC GrabberScript::scriptList findAllDBTreeGrabbersByHost(ArticleType type)
Definition: netutils.cpp:149
nv_python_libs.bbciplayer.bbciplayer_api.version
string version
Definition: bbciplayer_api.py:77
insertGrabberInDB
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
findAllDBRSSByType
MBASE_PUBLIC RSSSite::rssList findAllDBRSSByType(ArticleType type)
Definition: netutils.cpp:577
RSSSite
Definition: rssmanager.h:21
insertTreeArticleInDB
MBASE_PUBLIC bool insertTreeArticleInDB(const QString &feedtitle, const QString &path, const QString &paththumb, ResultItem *item, ArticleType type)
Definition: netutils.cpp:399
RSSSite::rssList
QList< RSSSite * > rssList
Definition: rssmanager.h:53
clearTreeItems
MBASE_PUBLIC bool clearTreeItems(const QString &feedcommand)
Definition: netutils.cpp:360