| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/services/abstract/feed.h`/ |
| 2 | |
| 3 | #ifndef FEED_H |
| 4 | #define FEED_Hcxx . . $ `src/librssguard/services/abstract/feed.h:4:9`! |
| 5 | |
| 6 | #include "core/message.h"cxx . . $ `<file>/src/librssguard/core/message.h`/ |
| 7 | #include "core/messagefilter.h"cxx . . $ `<file>/src/librssguard/core/messagefilter.h`/ |
| 8 | #include "services/abstract/feedrtlbehavior.h"cxx . . $ `<file>/src/librssguard/services/abstract/feedrtlbehavior.h`/ |
| 9 | #include "services/abstract/rootitem.h"cxx . . $ `<file>/src/librssguard/services/abstract/rootitem.h`/ |
| 10 | |
| 11 | #include <QPointer> |
| 12 | #include <QVariant> |
| 13 | |
| 14 | // Base class for "feed" nodes. |
| 15 | class RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! Feedcxx . . $ Feed# : public RootItemcxx . . $ RootItem# { |
| 16 | Q_OBJECTcxx . . $ Feed#QPrivateSignal#QPrivateSignal(49f6e7a06ebc5aa8). |
| 17 | |
| 18 | public: |
| 19 | struct ArticleIgnoreLimitcxx . . $ Feed#ArticleIgnoreLimit# { |
| 20 | // Ignoring articles. |
| 21 | bool m_avoidOldArticlescxx . . $ Feed#ArticleIgnoreLimit#m_avoidOldArticles. = false; |
| 22 | bool m_addAnyArticlesToDbcxx . . $ Feed#ArticleIgnoreLimit#m_addAnyArticlesToDb. = false; |
| 23 | QDateTimecxx . . $ QDateTime# m_dtToAvoidcxx . . $ Feed#ArticleIgnoreLimit#m_dtToAvoid. = QDateTimecxx . . $ QDateTime#QDateTime(ced63f7c635d850d).(); |
| 24 | int m_hoursToAvoidcxx . . $ Feed#ArticleIgnoreLimit#m_hoursToAvoid. = 0; |
| 25 | |
| 26 | // Limitting articles. |
| 27 | bool m_customizeLimittingcxx . . $ Feed#ArticleIgnoreLimit#m_customizeLimitting. = false; |
| 28 | int m_keepCountOfArticlescxx . . $ Feed#ArticleIgnoreLimit#m_keepCountOfArticles. = 0; |
| 29 | bool m_doNotRemoveStarredcxx . . $ Feed#ArticleIgnoreLimit#m_doNotRemoveStarred. = true; |
| 30 | bool m_doNotRemoveUnreadcxx . . $ Feed#ArticleIgnoreLimit#m_doNotRemoveUnread. = true; |
| 31 | bool m_moveToBinDontPurgecxx . . $ Feed#ArticleIgnoreLimit#m_moveToBinDontPurge. = false; |
| 32 | |
| 33 | static ArticleIgnoreLimitcxx . . $ Feed#ArticleIgnoreLimit# fromSettingscxx . . $ Feed#ArticleIgnoreLimit#fromSettings(f38245e3f85e3198).(); |
| 34 | }; |
| 35 | |
| 36 | // Specifies the auto-download strategy for the feed. |
| 37 | enum class AutoUpdateTypecxx . . $ Feed#AutoUpdateType# { |
| 38 | DontAutoUpdatecxx . . $ Feed#AutoUpdateType#DontAutoUpdate. = 0, |
| 39 | DefaultAutoUpdatecxx . . $ Feed#AutoUpdateType#DefaultAutoUpdate. = 1, |
| 40 | SpecificAutoUpdatecxx . . $ Feed#AutoUpdateType#SpecificAutoUpdate. = 2 |
| 41 | }; |
| 42 | |
| 43 | // Specifies the actual "status" of the feed. |
| 44 | // For example if it has new messages, error |
| 45 | // occurred, and so on. |
| 46 | enum class Statuscxx . . $ Feed#Status# { |
| 47 | Normalcxx . . $ Feed#Status#Normal. = 0, |
| 48 | NewMessagescxx . . $ Feed#Status#NewMessages. = 1, |
| 49 | NetworkErrorcxx . . $ Feed#Status#NetworkError. = 2, |
| 50 | AuthErrorcxx . . $ Feed#Status#AuthError. = 3, |
| 51 | ParsingErrorcxx . . $ Feed#Status#ParsingError. = 4, |
| 52 | OtherErrorcxx . . $ Feed#Status#OtherError. = 5, |
| 53 | Fetchingcxx . . $ Feed#Status#Fetching. = 6 |
| 54 | }; |
| 55 | |
| 56 | Q_ENUMcxx . . $ Feed#Status#(Status) |
| 57 | |
| 58 | explicit Feedcxx . . $ Feed#Feed(cb16baca005cfe86).(RootItemcxx . . $ RootItem#* parent = nullptr); |
| 59 | explicit Feedcxx . . $ Feed#Feed(5bcfbf2caa02147a).(const Feedcxx . . $ Feed#& other); |
| 60 | explicit Feedcxx . . $ Feed#Feed(803b672b99a678ae).(const QStringcxx . . $ QString#& title, const QStringcxx . . $ QString#& custom_id, const QIconcxx . . $ QIcon#& icon, RootItemcxx . . $ RootItem#* parent = nullptr); |
| 61 | |
| 62 | virtual QListcxx . . $ QList#<Messagecxx . . $ Message#> undeletedMessagescxx . . $ Feed#undeletedMessages(96785ab56182243a).() const; |
| 63 | virtual QStringcxx . . $ QString# additionalTooltipcxx . . $ Feed#additionalTooltip(6ef7b6c27b00b43d).() const; |
| 64 | virtual Qtcxx . . $ Qt/::ItemFlagscxx . . $ Qt/ItemFlags# additionalFlagscxx . . $ Feed#additionalFlags(24da1317fea73b2e).() const; |
| 65 | virtual bool markAsReadUnreadcxx . . $ Feed#markAsReadUnread(c2f07a1f8834328b).(ReadStatuscxx . . $ RootItem#ReadStatus# status); |
| 66 | virtual bool cleanMessagescxx . . $ Feed#cleanMessages(efaadfb7dc14930a).(bool clean_read_only); |
| 67 | virtual int countOfAllMessagescxx . . $ Feed#countOfAllMessages(455f465bc33b4cdf).() const; |
| 68 | virtual int countOfUnreadMessagescxx . . $ Feed#countOfUnreadMessages(455f465bc33b4cdf).() const; |
| 69 | virtual QVariantHashcxx . . $ QVariantHash# customDatabaseDatacxx . . $ Feed#customDatabaseData(556033a494fe4eb9).() const; |
| 70 | virtual void setCustomDatabaseDatacxx . . $ Feed#setCustomDatabaseData(3e473b083d16b808).(const QVariantHashcxx . . $ QVariantHash#& data); |
| 71 | virtual bool canBeEditedcxx . . $ Feed#canBeEdited(50ce9a9e25b4a850).() const; |
| 72 | virtual bool isFetchingcxx . . $ Feed#isFetching(50ce9a9e25b4a850).() const; |
| 73 | virtual QVariantcxx . . $ QVariant# datacxx . . $ Feed#data(db8258505c7ad0b0).(int column, int role) const; |
| 74 | |
| 75 | void setCountOfAllMessagescxx . . $ Feed#setCountOfAllMessages(d4f767463ce0a6b3).(int count_all_messages); |
| 76 | void setCountOfUnreadMessagescxx . . $ Feed#setCountOfUnreadMessages(d4f767463ce0a6b3).(int count_unread_messages); |
| 77 | |
| 78 | int autoUpdateIntervalcxx . . $ Feed#autoUpdateInterval(455f465bc33b4cdf).() const; |
| 79 | void setAutoUpdateIntervalcxx . . $ Feed#setAutoUpdateInterval(d4f767463ce0a6b3).(int auto_update_interval); |
| 80 | |
| 81 | AutoUpdateTypecxx . . $ Feed#AutoUpdateType# autoUpdateTypecxx . . $ Feed#autoUpdateType(32c2e86181102346).() const; |
| 82 | void setAutoUpdateTypecxx . . $ Feed#setAutoUpdateType(7ae5fab062cd3b96).(AutoUpdateTypecxx . . $ Feed#AutoUpdateType# auto_update_type); |
| 83 | |
| 84 | Statuscxx . . $ Feed#Status# statuscxx . . $ Feed#status(3ef043b41d362a5c).() const; |
| 85 | QStringcxx . . $ QString# statusStringcxx . . $ Feed#statusString(6ef7b6c27b00b43d).() const; |
| 86 | void setStatuscxx . . $ Feed#setStatus(999e77df611af5d5).(Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status# status, const QStringcxx . . $ QString#& status_text =cxx . . $ QString#QString(ced63f7c635d850d). {}); |
| 87 | |
| 88 | QStringcxx . . $ QString# sourcecxx . . $ Feed#source(6ef7b6c27b00b43d).() const; |
| 89 | void setSourcecxx . . $ Feed#setSource(3520e46b33348bf6).(const QStringcxx . . $ QString#& source); |
| 90 | |
| 91 | bool openArticlesDirectlycxx . . $ Feed#openArticlesDirectly(50ce9a9e25b4a850).() const; |
| 92 | void setOpenArticlesDirectlycxx . . $ Feed#setOpenArticlesDirectly(b45ddcbc8423892c).(bool opn); |
| 93 | |
| 94 | bool isSwitchedOffcxx . . $ Feed#isSwitchedOff(50ce9a9e25b4a850).() const; |
| 95 | void setIsSwitchedOffcxx . . $ Feed#setIsSwitchedOff(b45ddcbc8423892c).(bool switched_off); |
| 96 | |
| 97 | bool isQuietcxx . . $ Feed#isQuiet(50ce9a9e25b4a850).() const; |
| 98 | void setIsQuietcxx . . $ Feed#setIsQuiet(b45ddcbc8423892c).(bool quiet); |
| 99 | |
| 100 | void appendMessageFiltercxx . . $ Feed#appendMessageFilter(f54bde6f47b2d4fb).(MessageFiltercxx . . $ MessageFilter#* filter); |
| 101 | QListcxx . . $ QList#<QPointercxx . . $ QPointer#<MessageFiltercxx . . $ MessageFilter#>> messageFilterscxx . . $ Feed#messageFilters(98143e7d5e66961a).() const; |
| 102 | void setMessageFilterscxx . . $ Feed#setMessageFilters(4ec3624c54094509).(const QListcxx . . $ QList#<QPointercxx . . $ QPointer#<MessageFiltercxx . . $ MessageFilter#>>& messageFilters); |
| 103 | void removeMessageFiltercxx . . $ Feed#removeMessageFilter(f54bde6f47b2d4fb).(MessageFiltercxx . . $ MessageFilter#* filter); |
| 104 | |
| 105 | QDateTimecxx . . $ QDateTime# lastUpdatedcxx . . $ Feed#lastUpdated(4e062b5c490497ac).() const; |
| 106 | void setLastUpdatedcxx . . $ Feed#setLastUpdated(3672ecc950120406).(const QDateTimecxx . . $ QDateTime#& last_updated); |
| 107 | |
| 108 | RtlBehaviorcxx . . $ RtlBehavior# rtlBehaviorcxx . . $ Feed#rtlBehavior(1d55ef3bd2b2e67d).() const; |
| 109 | void setRtlBehaviorcxx . . $ Feed#setRtlBehavior(b6daccf987b91b23).(RtlBehaviorcxx . . $ RtlBehavior# rtl); |
| 110 | |
| 111 | bool removeUnwantedArticlescxx . . $ Feed#removeUnwantedArticles(9c3ef8cf2d66c955).(QSqlDatabasecxx . . $ QSqlDatabase#& db); |
| 112 | |
| 113 | ArticleIgnoreLimitcxx . . $ Feed#ArticleIgnoreLimit#& articleIgnoreLimitcxx . . $ Feed#articleIgnoreLimit(a6099ccba00faa1d).(); |
| 114 | const ArticleIgnoreLimitcxx . . $ Feed#ArticleIgnoreLimit#& articleIgnoreLimitcxx . . $ Feed#articleIgnoreLimit(593905a40018e52b).() const; |
| 115 | void setArticleIgnoreLimitcxx . . $ Feed#setArticleIgnoreLimit(7e15ed05aac05e0d).(const ArticleIgnoreLimitcxx . . $ Feed#ArticleIgnoreLimit#& ignore_limit); |
| 116 | |
| 117 | public slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 118 | virtual void updateCountscxx . . $ Feed#updateCounts(b45ddcbc8423892c).(bool including_total_count); |
| 119 | |
| 120 | protected: |
| 121 | QStringcxx . . $ QString# getAutoUpdateStatusDescriptioncxx . . $ Feed#getAutoUpdateStatusDescription(6ef7b6c27b00b43d).() const; |
| 122 | QStringcxx . . $ QString# getStatusDescriptioncxx . . $ Feed#getStatusDescription(6ef7b6c27b00b43d).() const; |
| 123 | |
| 124 | private: |
| 125 | QStringcxx . . $ QString# m_sourcecxx . . $ Feed#m_source.; |
| 126 | Statuscxx . . $ Feed#Status# m_statuscxx . . $ Feed#m_status.; |
| 127 | QStringcxx . . $ QString# m_statusStringcxx . . $ Feed#m_statusString.; |
| 128 | AutoUpdateTypecxx . . $ Feed#AutoUpdateType# m_autoUpdateTypecxx . . $ Feed#m_autoUpdateType.; |
| 129 | int m_autoUpdateIntervalcxx . . $ Feed#m_autoUpdateInterval.{}; // In seconds. |
| 130 | QDateTimecxx . . $ QDateTime# m_lastUpdatedcxx . . $ Feed#m_lastUpdated.; |
| 131 | bool m_isSwitchedOffcxx . . $ Feed#m_isSwitchedOff.; |
| 132 | bool m_isQuietcxx . . $ Feed#m_isQuiet.; |
| 133 | bool m_openArticlesDirectlycxx . . $ Feed#m_openArticlesDirectly.; |
| 134 | RtlBehaviorcxx . . $ RtlBehavior# m_rtlBehaviorcxx . . $ Feed#m_rtlBehavior.; |
| 135 | |
| 136 | // NOTE: These are used to filter out older articles |
| 137 | // than needed. Either absolute value is given (date/time) |
| 138 | // or relative value given in minutes. |
| 139 | // Amount |
| 140 | ArticleIgnoreLimitcxx . . $ Feed#ArticleIgnoreLimit# m_articleIgnoreLimitcxx . . $ Feed#m_articleIgnoreLimit.; |
| 141 | |
| 142 | int m_totalCountcxx . . $ Feed#m_totalCount.{}; |
| 143 | int m_unreadCountcxx . . $ Feed#m_unreadCount.{}; |
| 144 | QListcxx . . $ QList#<QPointercxx . . $ QPointer#<MessageFiltercxx . . $ MessageFilter#>> m_messageFilterscxx . . $ Feed#m_messageFilters.; |
| 145 | }; |
| 146 | |
| 147 | Q_DECLARE_METATYPEcxx . . $ QMetaTypeId#$anonymous_type_0#(Feed::AutoUpdateType) |
| 148 | Q_DECLARE_METATYPEcxx . . $ QBasicAtomicInt#(Feed::Status) |
| 149 | Q_DECLARE_METATYPEcxx . . $ QMetaTypeId#(Feed::ArticleIgnoreLimit) |
| 150 | |
| 151 | #endif // FEED_H |