MythTV
master
|
#include <mythplugins/mythnews/mythnews/newssite.h>
Classes | |
class | List |
Public Types | |
enum | State : std::uint8_t { Retrieving = 0, RetrieveFailed, WriteFailed, Success } |
Signals | |
void | finished (NewsSite *item) |
Public Member Functions | |
NewsSite (QString name, const QString &url, QDateTime updated, bool podcast) | |
virtual void | deleteLater () |
void | customEvent (QEvent *event) override |
QString | url (void) const |
QString | name (void) const |
QString | sortName (void) const |
QString | description (void) const |
QDateTime | lastUpdated (void) const |
QString | imageURL (void) const |
bool | podcast (void) const |
std::chrono::minutes | timeSinceLastUpdate (void) const |
void | insertNewsArticle (const NewsArticle &item) |
void | clearNewsArticles (void) |
NewsArticle::List | GetArticleList (void) const |
void | retrieve (void) |
void | stop (void) |
void | process (void) |
void | parseRSS (const QDomDocument &domDoc) |
void | parseAtom (const QDomDocument &domDoc) |
bool | successful (void) const |
QString | errorMsg (void) const |
Static Public Member Functions | |
static bool | sortByName (NewsSite *a, NewsSite *b) |
Private Member Functions | |
~NewsSite () override | |
Static Private Member Functions | |
static QString | ReplaceHtmlChar (const QString &orig) |
Private Attributes | |
QRecursiveMutex | m_lock |
QString | m_name |
QString | m_sortName |
QString | m_url |
QUrl | m_urlReq |
QString | m_desc |
QDateTime | m_updated |
QString | m_destDir |
QByteArray | m_data |
State | m_state {NewsSite::Success} |
QString | m_errorString |
QString | m_updateErrorString |
QString | m_imageURL |
bool | m_podcast |
NewsArticle::List | m_articleList |
Definition at line 50 of file newssite.h.
enum NewsSite::State : std::uint8_t |
Enumerator | |
---|---|
Retrieving | |
RetrieveFailed | |
WriteFailed | |
Success |
Definition at line 56 of file newssite.h.
NewsSite::NewsSite | ( | QString | name, |
const QString & | url, | ||
QDateTime | updated, | ||
bool | podcast | ||
) |
Definition at line 19 of file newssite.cpp.
|
overrideprivate |
Definition at line 39 of file newssite.cpp.
|
virtual |
Definition at line 30 of file newssite.cpp.
|
override |
Definition at line 155 of file newssite.cpp.
QString NewsSite::url | ( | void | ) | const |
Definition at line 90 of file newssite.cpp.
Referenced by MythNewsEditor::Create(), customEvent(), parseAtom(), and parseRSS().
QString NewsSite::name | ( | void | ) | const |
Definition at line 96 of file newssite.cpp.
Referenced by MythNewsEditor::Create(), MythNews::slotNewsRetrieved(), and MythNews::updateInfoView().
QString NewsSite::sortName | ( | void | ) | const |
Definition at line 102 of file newssite.cpp.
QString NewsSite::description | ( | void | ) | const |
Definition at line 114 of file newssite.cpp.
Referenced by parseAtom(), parseRSS(), and MythNews::updateInfoView().
QDateTime NewsSite::lastUpdated | ( | void | ) | const |
Definition at line 140 of file newssite.cpp.
Referenced by MythNews::slotNewsRetrieved(), and MythNews::updateInfoView().
QString NewsSite::imageURL | ( | void | ) | const |
Definition at line 128 of file newssite.cpp.
Referenced by MythNewsEditor::Create(), and MythNews::updateInfoView().
bool NewsSite::podcast | ( | void | ) | const |
Definition at line 108 of file newssite.cpp.
Referenced by MythNewsEditor::Create(), and MythNews::updateInfoView().
std::chrono::minutes NewsSite::timeSinceLastUpdate | ( | void | ) | const |
Definition at line 146 of file newssite.cpp.
void NewsSite::insertNewsArticle | ( | const NewsArticle & | item | ) |
Definition at line 46 of file newssite.cpp.
Referenced by parseAtom(), parseRSS(), and process().
void NewsSite::clearNewsArticles | ( | void | ) |
Definition at line 52 of file newssite.cpp.
NewsArticle::List NewsSite::GetArticleList | ( | void | ) | const |
Definition at line 134 of file newssite.cpp.
Referenced by MythNews::processAndShowNews().
void NewsSite::retrieve | ( | void | ) |
Definition at line 58 of file newssite.cpp.
void NewsSite::stop | ( | void | ) |
Definition at line 71 of file newssite.cpp.
Referenced by retrieve().
void NewsSite::process | ( | void | ) |
Definition at line 221 of file newssite.cpp.
Referenced by MythNews::processAndShowNews().
void NewsSite::parseRSS | ( | const QDomDocument & | domDoc | ) |
Definition at line 301 of file newssite.cpp.
Referenced by process().
void NewsSite::parseAtom | ( | const QDomDocument & | domDoc | ) |
Definition at line 457 of file newssite.cpp.
Referenced by process().
Definition at line 102 of file newssite.h.
Referenced by MythNews::loadSites().
bool NewsSite::successful | ( | void | ) | const |
Definition at line 78 of file newssite.cpp.
QString NewsSite::errorMsg | ( | void | ) | const |
Definition at line 84 of file newssite.cpp.
|
staticprivate |
Definition at line 488 of file newssite.cpp.
Referenced by parseAtom(), and parseRSS().
|
signal |
Referenced by customEvent(), and MythNews::loadSites().
|
mutableprivate |
Definition at line 111 of file newssite.h.
Referenced by clearNewsArticles(), deleteLater(), description(), errorMsg(), GetArticleList(), imageURL(), insertNewsArticle(), lastUpdated(), name(), parseRSS(), podcast(), process(), retrieve(), sortName(), stop(), successful(), timeSinceLastUpdate(), url(), and ~NewsSite().
|
private |
Definition at line 112 of file newssite.h.
Referenced by customEvent(), name(), NewsSite(), process(), and retrieve().
|
private |
Definition at line 113 of file newssite.h.
Referenced by NewsSite(), sortByName(), and sortName().
|
private |
Definition at line 114 of file newssite.h.
Referenced by deleteLater(), retrieve(), stop(), url(), and ~NewsSite().
|
private |
Definition at line 115 of file newssite.h.
|
private |
Definition at line 116 of file newssite.h.
Referenced by description(), and parseRSS().
|
private |
Definition at line 117 of file newssite.h.
Referenced by customEvent(), lastUpdated(), and timeSinceLastUpdate().
|
private |
Definition at line 118 of file newssite.h.
Referenced by process(), and retrieve().
|
private |
Definition at line 119 of file newssite.h.
|
private |
Definition at line 120 of file newssite.h.
Referenced by customEvent(), process(), retrieve(), and successful().
|
private |
Definition at line 121 of file newssite.h.
Referenced by description(), errorMsg(), process(), and retrieve().
|
private |
Definition at line 122 of file newssite.h.
Referenced by customEvent(), process(), and retrieve().
|
private |
Definition at line 123 of file newssite.h.
Referenced by imageURL(), and parseRSS().
|
private |
Definition at line 124 of file newssite.h.
Referenced by podcast().
|
private |
Definition at line 126 of file newssite.h.
Referenced by clearNewsArticles(), deleteLater(), GetArticleList(), insertNewsArticle(), process(), and retrieve().