|
libfuoten 0.8.2
Qt based library to access the Nextcloud News App API.
|
Abstract class to handle the storage of requested News App data. More...
#include <Fuoten/Storage/AbstractStorage>
Properties | |
| AbstractConfiguration * | configuration |
| Pointer to an AbstractConfiguration derived class. | |
| Fuoten::Error * | error |
| Returns a pointer to an Error object, if any error occures, otherwise a nullptr. | |
| bool | inOperation |
| Returns true while the storage is in operation. | |
| Fuoten::AbstractNotificator * | notificator |
| Pointer to an object derived from AbstractNotificator. | |
| bool | ready |
| Returns true when the storage handler has finished its initialization. | |
| int | starred |
| Amount of starred items. | |
| int | totalUnread |
| Total amount of unread items in the storage. | |
Public Member Functions | |
| AbstractStorage (QObject *parent=nullptr) | |
| Constructs a new abstract local storage with the given parent. | |
| ~AbstractStorage () override | |
| Deconstructs the AbstractStorage object. | |
| virtual void | clearQueue () |
| Clears the local queue. Does not revert the action itself. | |
| virtual Q_INVOKABLE void | clearStorage () |
| Removes all data from the storage. | |
| AbstractConfiguration * | configuration () const |
| Getter function for the configuration property. | |
| virtual bool | enqueueItem (FuotenEnums::QueueAction action, Article *article) |
| Enqueues an action for the given article. | |
| virtual Q_INVOKABLE bool | enqueueMarkAllItemsRead () |
| Adds all local articles that are unread to the queue and marks them as read. | |
| virtual bool | enqueueMarkFeedRead (qint64 feedId, qint64 newestItemId) |
| Adds all articles older than newestItemId in the feed identified by feedId as read to the local queue. | |
| virtual bool | enqueueMarkFolderRead (qint64 folderId, qint64 newestItemId) |
| Adds all articles older than newestItemId in the folder identified folderId as read to the local queue. | |
| Error * | error () const |
| Retruns a pointer to an Error object, if any error occures, otherwise returns a nullptr. | |
| virtual Article * | getArticle (qint64 id, int bodyLimit=0)=0 |
| Returns the Article identified by id. | |
| virtual Q_INVOKABLE QString | getArticleBody (qint64 id)=0 |
| Returns the full body of an Article identified by id. | |
| virtual QList< Article * > | getArticles (const QueryArgs &args)=0 |
| Returns a list of Article objects from the local storage. | |
| virtual void | getArticlesAsync (const QueryArgs &args) |
| Invokes a query for Article objects from the local storage, limited by args. | |
| virtual Feed * | getFeed (qint64 id)=0 |
| Returns the Feed identified by id. | |
| virtual QList< Feed * > | getFeeds (const QueryArgs &args)=0 |
| Returns a list of Feed objects from the local storage. | |
| virtual QList< Folder * > | getFolders (FuotenEnums::SortingRole sortingRole=FuotenEnums::Name, Qt::SortOrder sortOrder=Qt::AscendingOrder, const IdList &ids=IdList(), FuotenEnums::Type idType=FuotenEnums::Folder, int limit=0)=0 |
| Returns a list of Folder objects from the local storage. | |
| virtual qint64 | getNewestItemId (FuotenEnums::Type type=FuotenEnums::All, qint64 id=-1)=0 |
| Returns the newest item/article ID for the given type. | |
| virtual void | init ()=0 |
| Initializes the storage handler. | |
| bool | inOperation () const |
| Getter function for the inOperation property. | |
| AbstractNotificator * | notificator () const |
| Getter function for the notificator property. | |
| bool | ready () const |
| Returns true when the storage is ready to handle data, otherwise false. | |
| void | setConfiguration (AbstractConfiguration *nConfiguration) |
| Setter function for the configuration property. Emits the configurationChanged() signal if nConfiguration is not equal to the stored value. | |
| void | setNotificator (AbstractNotificator *notificator) |
| Setter function for the notificator property. | |
| virtual int | starred () const |
| Returns the total number of starred articles. | |
| virtual int | totalUnread () const |
| Returns the total number of unread articles. | |
Public Slots | |
| virtual void | allItemsMarkedRead (qint64 newestItemId)=0 |
| Receives the reply data from the MarkAllItemsRead request. | |
| virtual void | feedCreated (const QJsonDocument &json)=0 |
| Receives the reply data of the CreateFeed request. | |
| virtual void | feedDeleted (qint64 id)=0 |
| Receives the reply data of the DeleteFeed request. | |
| virtual void | feedMarkedRead (qint64 id, qint64 newestItem)=0 |
| Receives the reply data of the MarkFeedRead request. | |
| virtual void | feedMoved (qint64 id, qint64 targetFolder)=0 |
| Receives the reply data of the MoveFeed request. | |
| virtual void | feedRenamed (qint64 id, const QString &newTitle)=0 |
| Receives the reply data of the RenameFeed request. | |
| virtual void | feedsRequested (const QJsonDocument &json)=0 |
| Receives the reply data of the GetFeeds request. | |
| virtual void | folderCreated (const QJsonDocument &json)=0 |
| Receives the reply data of the CreateFolder request. | |
| virtual void | folderDeleted (qint64 id)=0 |
| Receives the reply data of the DeleteFolder request. | |
| virtual void | folderMarkedRead (qint64 id, qint64 newestItem)=0 |
| Receives the reply data of the MarkFolderRead request. | |
| virtual void | folderRenamed (qint64 id, const QString &newName)=0 |
| Receives the reply data of the RenameFolder request. | |
| virtual void | foldersRequested (const QJsonDocument &json)=0 |
| Receives the reply data of the GetFolders request. | |
| static qint64 | getIdFromJson (const QJsonValue &value) |
| Convert a JSON value into an integer id. | |
| virtual void | itemMarked (qint64 itemId, bool unread)=0 |
| Receives the reply data for the MarkItem request. | |
| virtual void | itemsMarked (const Fuoten::IdList &itemIds, bool unread)=0 |
| Receives the reply data for the MarkItems request. | |
| virtual void | itemsRequested (const QJsonDocument &json)=0 |
| Receives the reply data of the GetItems request. | |
| virtual void | itemsStarred (const QList< QPair< qint64, QString > > &articles, bool star)=0 |
| Receives the reply data for the StarItems request. | |
| virtual void | itemStarred (qint64 feedId, const QString &guidHash, bool star)=0 |
| Receives the reply data from the StarItem request. | |
Signals | |
| void | configurationChanged (Fuoten::AbstractConfiguration *configuration) |
| This is emitted if the value of the configuration property changes. | |
| void | createdFeed (qint64 id, qint64 folderId) |
| Emit this after a new feed has been created. | |
| void | createdFolder (qint64 id, const QString &name) |
| Emit this after a new folder has been created. | |
| void | deletedFeed (qint64 id) |
| Emit this after a feed has been deleted. | |
| void | deletedFolder (qint64 id) |
| Emit this after a folder has been deleted. | |
| void | errorChanged (Fuoten::Error *error) |
| Emitted whenever the error property changes. | |
| void | gotArticlesAsync (const Fuoten::ArticleList &articles) |
| Emit this after getArticlesAsync() has been called and articles have been queried. | |
| void | inOperationChanged (bool inOperation) |
| This is emitted if the value of the inOperation property changes. | |
| void | markedAllItemsRead (qint64 newestItemId) |
| Emit this signal after all items/articles have been marked as read. | |
| void | markedAllItemsReadInQueue () |
| Emit this signal after all items/articles have been marked as read in the local queue. | |
| void | markedItem (qint64 itemId, bool unread) |
| Emit this after an item/article has been marked read or unread. | |
| void | markedItems (const Fuoten::IdList &itemIds, bool unread) |
| Emit this after items/articles have been marked as read or unread. | |
| void | markedReadFeed (qint64 id, qint64 newestItem) |
| Emit this after a feed has been marked as read. | |
| void | markedReadFeedInQueue (qint64 feedId, qint64 newestItemId) |
| Emit this after a feed has been marked as read in the local queue. | |
| void | markedReadFolder (qint64 id, qint64 newestItem) |
| Emit this after a folder has been marked as read. | |
| void | markedReadFolderInQueue (qint64 folderId, qint64 newestItemId) |
| Emit this after a folder has been marked as read in the local queue. | |
| void | movedFeed (qint64 id, qint64 targetFolder) |
| Emit this signal after a feed has been moved to another folder. | |
| void | notificatorChanged (Fuoten::AbstractNotificator *notificator) |
| Notifier signal for the notificator property. | |
| void | queueCleared () |
| This is emitted after the local queue has been cleared. | |
| void | readyChanged (bool ready) |
| Emitted whenever the ready property changes. | |
| void | renamedFeed (qint64 id, const QString &newName) |
| Emit this signal after a feed has been renamed. | |
| void | renamedFolder (qint64 id, const QString &newName) |
| Emit this after a folder has been renamed. | |
| void | requestedFeeds (const Fuoten::IdList &updatedFeeds, const Fuoten::IdList &newFeeds, const Fuoten::IdList &deletedFeeds) |
| Emit this after feeds have been received and processed. | |
| void | requestedFolders (const QList< QPair< qint64, QString > > &updatedFolders, const QList< QPair< qint64, QString > > &newFolders, const Fuoten::IdList &deletedFolders) |
| Emit this after folders have been received and processed. | |
| void | requestedItems (const Fuoten::IdList &updatedItems, const Fuoten::IdList &newItems, const Fuoten::IdList &deletedItems) |
| Emit this after items/articles have been received and processed. | |
| void | starredChanged (int starred) |
| This signal is emitted if the amount of total starred articles changes. | |
| void | starredItem (qint64 feedId, const QString &guidHash, bool starred) |
| Emit this after an item/article has been starred or unstarred. | |
| void | starredItems (const QList< QPair< qint64, QString > > &articles, bool star) |
| Emit this after items/articles have been starred or unstarred. | |
| void | storageCleared () |
| This is emitted after the local storage has been cleared. | |
| void | totalUnreadChanged (int totalUnread) |
| This signal is emitted if the amount of total unread articles changes. | |
Protected Slots | |
| virtual void | setStarred (int nStarred) |
| Sets the total number of starred articles. | |
| virtual void | setTotalUnread (int nTotalUnread) |
| Sets the total number of unread articles. | |
Protected Member Functions | |
| void | notify (AbstractNotificator::Type type, QtMsgType severity, const QVariant &data) const |
| Checks if a notificator has been set and will use it to notify the user. | |
| void | notify (const Error *e) const |
| Checks if a notificator has been set and will use it to notify about an occured error. | |
| void | setError (Error *nError) |
| Sets the Error object. | |
| void | setInOperation (bool nInOperation) |
| Setter function for the inOperation property. Emits the inOperationChanged() signal if nInOperation is not equal to the stored value. | |
| void | setReady (bool nReady) |
| Set this to true when the storage has finished it's initialization. | |
Abstract class to handle the storage of requested News App data.
Reimplement this class to store the data requested from the News App API. You can set your derived class to the Component::storage property, that all classes use that derive from Component. Also BaseItem hast the BaseItem::storage property for derived classes, that is used to set the storage handler to API classes that perfrom API actions.
If you derive from AbstractStorage, initialize the storage in init() and set setReady() to true when your storage is ready to handle data.
|
readwrite |
Pointer to an AbstractConfiguration derived class.
| AbstractConfiguration* | configuration() const |
| void | setConfiguration(AbstractConfiguration *nConfiguration) |
| void | configurationChanged(AbstractConfiguration *configuration) |
|
read |
Returns a pointer to an Error object, if any error occures, otherwise a nullptr.
| Error* | error() const |
| void | errorChanged(Error *error) |
|
read |
Returns true while the storage is in operation.
This will only be set to true by pure storage functions (like queue functions), not when processing requested data.
| bool | inOperation() const |
| void | inOperationChanged(bool inOperation) |
|
readwrite |
Pointer to an object derived from AbstractNotificator.
Set a notificator to notify users about errors and events. This is not mandatory. You have to derive your own notificator that uses the notification system of the target platform.
If no notificator has been set via setNotificator(), the one set via Component::setDefaultConfigurator() will be used - if any has been set. If you do not set a notificator either per instance or global, this property will hold a nullptr. If a notificator is set to an instance of this class via setNotificator(), this notificator will take precedence over the global default notificator object (if any set).
|
read |
Returns true when the storage handler has finished its initialization.
| bool | ready() const |
| void | readyChanged(bool ready) |
|
read |
Amount of starred items.
| int | starred() const |
| void | starredChanged(int starred) |
|
read |
Total amount of unread items in the storage.
| int | totalUnread() const |
| void | totalUnreadChanged(int totalUnread) |
|
explicit |
Constructs a new abstract local storage with the given parent.
|
override |
Deconstructs the AbstractStorage object.
|
pure virtualslot |
Receives the reply data from the MarkAllItemsRead request.
Will mark all items in the local database as read which have an ID lower or equal to newestItemId.
|
virtual |
Clears the local queue. Does not revert the action itself.
The default implementation does nothing. When reimplementing this function, only remove the queue entry but do not revert the action already done locally. It will be called after working the queue.
Reimplemented in Fuoten::SQLiteStorage.
|
virtual |
Removes all data from the storage.
The default implementation does nothing. When reimplementing this, emit storageCleared() after successfully clear all stored data. Do not forget to also reset last sync time with AbstractConfiguration::setLastSync().
Reimplemented in Fuoten::SQLiteStorage.
| AbstractConfiguration * AbstractStorage::configuration | ( | ) | const |
Getter function for the configuration property.
|
signal |
This is emitted if the value of the configuration property changes.
|
signal |
Emit this after a new feed has been created.
Best loaction to emit this signal is your implementation of feedCreated(). The signal has to contain the id of the new feed it's parent folderId.
|
signal |
Emit this after a new folder has been created.
Best loaction to emit this signal is your implementation of folderCreated(). The signal has to contain the id and the name of the new folder.
|
signal |
Emit this after a feed has been deleted.
Best location to emit this signal is your implementation of feedDeleted(). The signal has to contain the id fo the deleted feed.
|
signal |
Emit this after a folder has been deleted.
Best location to emit this signal is your implementation of folderDeleted(). The signal has to contain the id fo the deleted folder.
|
virtual |
Enqueues an action for the given article.
When enqueueing an article, the performed action should already be saved in the local storage together with the queue action. If the article is marked as read for example, add the action to your local queue and also mark the article as read in your local storage.
The default implementation does nothing and returns false.
| action | the action that should be enqueued |
| article | pointer to the Article object that should be enqueued |
true if the enqueue was successful, otherwise false Reimplemented in Fuoten::SQLiteStorage.
|
virtual |
Adds all local articles that are unread to the queue and marks them as read.
After successfully addint the items/articles to the local queue, emit the markedAllItemsReadInQueue() signal. The default implementation does nothing and returns false.
true on success, otherwise false Reimplemented in Fuoten::SQLiteStorage.
|
virtual |
Adds all articles older than newestItemId in the feed identified by feedId as read to the local queue.
After successfully adding the items/articles to the local queue, emit the markedReadFeedInQueue() signal. The default implementation does nothing and returns false.
| feedId | ID of the feed to be marked as read |
| newestItemId | ID of the newest item in the feed |
true on success, otherwise false Reimplemented in Fuoten::SQLiteStorage.
|
virtual |
Adds all articles older than newestItemId in the folder identified folderId as read to the local queue.
After successfully adding the items/articles to the local queue, emit the markedReadFolderInQueue() signal. The default implementation does nothing and returns false.
| folderId | ID of the folder to be marked as read |
| newestItemId | ID of the newest item in the folder |
true on success, otherwise false Reimplemented in Fuoten::SQLiteStorage.
| Error * AbstractStorage::error | ( | ) | const |
Retruns a pointer to an Error object, if any error occures, otherwise returns a nullptr.
|
signal |
Emitted whenever the error property changes.
|
pure virtualslot |
Receives the reply data of the CreateFeed request.
Implement this in a derived class to store new feed data, for example in a local SQL databse. You my want to emit createdFeed() in your implementation after you processed the data.
|
pure virtualslot |
Receives the reply data of the DeleteFeed request.
Will delete the feed identified by id in the local storage and emits the deletedFeed() signal.
|
pure virtualslot |
Receives the reply data of the MarkFeedRead request.
Will mark all items in the feed identified by id that have a lower ID than newestItem as read in the local storage. Will than emit the markedReadFeed() signal.
|
pure virtualslot |
Receives the reply data of the MoveFeed request.
Will move the feed identified by id to the targetFolder id and emits the movedFeed() signal.
|
pure virtualslot |
Receives the reply data of the RenameFeed request.
Will rename the feed identified by id to the newTitle and emits the renamedFeed() signal.
|
pure virtualslot |
Receives the reply data of the GetFeeds request.
Implement this in a derived class to store feed data, for example in a local SQL database. You may want to emit requestedFeeds() in your implementation after you processed the data.
|
pure virtualslot |
Receives the reply data of the CreateFolder request.
Implement this in a derived class to store new folder data, for example in a local SQL databse. You my want to emit createdFolder() in your implementation after you processed the data.
|
pure virtualslot |
Receives the reply data of the DeleteFolder request.
Will delete the folder identified by id in the local storage and emits the deletedFolder() signal.
|
pure virtualslot |
Receives the reply data of the MarkFolderRead request.
Will mark all items in the folder identified by id that have a lower ID than newestItem as read in the local storage. Will than emit the markedReadFolder() signal.
|
pure virtualslot |
Receives the reply data of the RenameFolder request.
Will rename the folder identified by id in the local storage to newName and emits the renamedFolder() signal.
|
pure virtualslot |
Receives the reply data of the GetFolders request.
Implement this in a derived class to store folder data, for example in a local SQL database. You may want to emit requestedFolders() in your implementation after you processed the data.
|
pure virtual |
Returns the Article identified by id.
bodyLimit limits the size of the body text in number of characters. Values lower than 0 will return no body text, 0 will return the full body text, any other positive value will return a body stripped from HTML tags and limited to the amount of characters.
Returns a nullptr if the Article can not be found.
Implemented in Fuoten::SQLiteStorage.
|
pure virtual |
Returns the full body of an Article identified by id.
Implemented in Fuoten::SQLiteStorage.
|
pure virtual |
Returns a list of Article objects from the local storage.
See QueryArgs for a list of possible query arguments.
Implemented in Fuoten::SQLiteStorage.
|
virtual |
Invokes a query for Article objects from the local storage, limited by args.
This should emit the gotArticlesAsync() signal containing a list of Article objects. The default implementation is not really asynchronous, it simply calls getArticles() and emits gotArticlesSync() with the return value of that function.
When reimplementing this and connecting to the gotArticlesSync() signal, be aware that the Article objects in the list might have been created in a different thread.
Reimplemented in Fuoten::SQLiteStorage.
|
pure virtual |
Returns the Feed identified by id.
Returns a nullptr if the Feed can not be found.
Implemented in Fuoten::SQLiteStorage.
Returns a list of Feed objects from the local storage.
See QueryArgs for a list of possible query arguments.
Implemented in Fuoten::SQLiteStorage.
|
pure virtual |
Returns a list of Folder objects from the local storage.
The returned list will be sorted by sortingRole and sortOrder. If ids is not empty, only folders with IDs of idType from the list will be returned. The idType specifies the id the folder is compared with. If the idType is not one of out of the table below, it will be treated as FuotenEnums::Folder.
| FuotenEnums::Folder | Only folders with an ID in ids will be returned |
| FuotenEnums::Feed | Only folders will be returned that contain feeds with an ID in ids |
| FuotenEnums::Item | Only folders will be returned that contain items with an ID in ids |
Setting limit > 0 returns only the amount of items up to that limit.
The Folder objects in the returned list will have their parent set to nullptr.
Implemented in Fuoten::SQLiteStorage.
|
staticslot |
Convert a JSON value into an integer id.
Based on the News App API version, IDs are either returned as numbers or as strings. This will check the JSON value type and convert it into an appropriate id value.
|
pure virtual |
Returns the newest item/article ID for the given type.
Supported Types: FuotenEnums::Feed, FuotenEnums::Folder, FuotenEnums::All. For folder and feed type a valid id has to be provided that identifieds the folder or feed.
If the type does not match one of the supported or if there are not items, -1 is returned.
Implemented in Fuoten::SQLiteStorage.
|
signal |
Emit this after getArticlesAsync() has been called and articles have been queried.
Be aware that the objects in the list might have been created in a different thread when you connect to this signal.
| articles | list of Article objects |
|
pure virtual |
Initializes the storage handler.
For example, create your database layout. When finished set setReady() to true.
Implemented in Fuoten::SQLiteStorage.
| bool AbstractStorage::inOperation | ( | ) | const |
Getter function for the inOperation property.
|
signal |
This is emitted if the value of the inOperation property changes.
|
pure virtualslot |
Receives the reply data for the MarkItem request.
Will mark the item identified by itemId in the local storage as read or unread.
| itemId | ID of the item/article that has been marked |
| unread | true if the item has been marked as unread, false if marked as read |
|
pure virtualslot |
Receives the reply data for the MarkItems request.
Will mark the items identified by their ID in the itemIds as read if unread is set to false, otherwise it will mark them as unread. You should emit markedItems() in your implementation after you processed the data to update connected models.
| itemIds | IDs of articles that have been marked as read or unread |
| unread | true if the articles have been marked as unread, false if marked as read |
|
pure virtualslot |
Receives the reply data of the GetItems request.
Implement this in a derived class to store item data, for example in a local SQL database. You may want to emit requestedItems() in your implementation after you processed the data.
|
pure virtualslot |
Receives the reply data for the StarItems request.
The lists contains the item/article IDs and the guid hash of the items/articles that have been either starred or unstarred. You should emit starredItems() in your implementation after you processed the data to update connected models.
| articles | list of pairs of feed ID and guid hash of starred/unstarred articles |
| star | true if the articles have been starred, false if they have been unstarred |
|
pure virtualslot |
Receives the reply data from the StarItem request.
Will star or unstar the item/article identified by itemId and guidHash in the local storage.
| feedId | ID of the feed the item/article that has been starred or unstarred belongs to |
| guidHash | global unique ID hash of the item/article that has been starred or unstarred |
| star | true if the article has been starred, false if it has been unstarred |
|
signal |
Emit this signal after all items/articles have been marked as read.
Best location to emit this signal is your implementation of allItemsMarkedRead().
| newestItemId | highest/newest ID of the local available items/articles |
|
signal |
Emit this signal after all items/articles have been marked as read in the local queue.
Best location to emit this signal is your implemetation of enqueueMarkAllItemsRead().
|
signal |
Emit this after an item/article has been marked read or unread.
Best location to emit this signal is your implementation of itemMarked().
| itemId | the ID of the item/article that has been marked as read or unread |
| unread | true if the article has been marked as unread, false if marked as read |
|
signal |
Emit this after items/articles have been marked as read or unread.
Best location to emit this signal is your implementation of itemsMarked().
The lists have to conatin the item/article IDs that haven been marked as read or unread.
| itemIds | IDs of articles that have been marked as read or unread |
| unread | true if the articles have been marked as unread, false if marked as read |
|
signal |
Emit this after a feed has been marked as read.
Best location to emit this signal is your implementation of feedMarkedRead(). The signal has to contain the id of the feed that has been marked as read as well as the ID of the newestItem that has been marked as read.
|
signal |
Emit this after a feed has been marked as read in the local queue.
| feedId | ID of the feed that has been marked as read |
| newestItemId | ID of the newest item in the feed |
|
signal |
Emit this after a folder has been marked as read.
Best location to emit this signal is your implementation of folderMarkedRead(). The signal has to contain the id of the folder that has been marked as read as well as the ID of the newestItem that has been marked as read.
|
signal |
Emit this after a folder has been marked as read in the local queue.
Best location to emit this signal is your implementation of enqueueMarkFolderRead().
| folderId | ID of the folder that has been marked as read in the local queue |
| newestItemId | ID of the newest item in folder that has been marked as read in the local queue |
|
signal |
Emit this signal after a feed has been moved to another folder.
Best location to emit this signal is your implementation of feedMoved(). The signal has to contain the id of the moved feed and the targetFolder id.
| AbstractNotificator * AbstractStorage::notificator | ( | ) | const |
Getter function for the notificator property.
|
signal |
Notifier signal for the notificator property.
|
protected |
Checks if a notificator has been set and will use it to notify the user.
|
protected |
Checks if a notificator has been set and will use it to notify about an occured error.
|
signal |
This is emitted after the local queue has been cleared.
Emit this in your implementation of clearQueue().
| bool AbstractStorage::ready | ( | ) | const |
Returns true when the storage is ready to handle data, otherwise false.
|
signal |
Emitted whenever the ready property changes.
|
signal |
Emit this signal after a feed has been renamed.
Best location to emit this signal is your implementation of feedRename(). The signal has to contain the id of the renamed feed and the newName.
|
signal |
Emit this after a folder has been renamed.
Best location to emit this signal is your implementation of folderRenamed(). The signal has to contain the id and the newName of the folder.
|
signal |
Emit this after feeds have been received and processed.
Best location to emit this signal is your implementation of feedsRequested().
Every argument of the signal should contain a list of feed IDs that are either updated, new or deleted.
|
signal |
Emit this after folders have been received and processed.
Best location to emit this signal is your implementation of foldersRequested().
updatedFolders should contain a list of the database IDs and names of updated folders, newFolders should contain a list of databaes IDs and names of new folders, and deletedFolders should contain a list of database IDs of deleted folders.
|
signal |
Emit this after items/articles have been received and processed.
Best location to emit this signal is your implementation of itemsRequested().
Every argument of the signal should contain a list of item IDs that are either updated, new or deleted.
| updatedItems | list of IDs from items that have been updated |
| newItems | list of IDs from items that are new in the local storage |
| deletedItems | list of IDs from items that have been remove from the local storage |
| void AbstractStorage::setConfiguration | ( | AbstractConfiguration * | nConfiguration | ) |
Setter function for the configuration property. Emits the configurationChanged() signal if nConfiguration is not equal to the stored value.
|
protected |
Setter function for the inOperation property. Emits the inOperationChanged() signal if nInOperation is not equal to the stored value.
| void AbstractStorage::setNotificator | ( | AbstractNotificator * | notificator | ) |
Setter function for the notificator property.
|
protected |
Set this to true when the storage has finished it's initialization.
|
protectedvirtualslot |
Sets the total number of starred articles.
|
protectedvirtualslot |
Sets the total number of unread articles.
|
virtual |
Returns the total number of starred articles.
|
signal |
This signal is emitted if the amount of total starred articles changes.
|
signal |
Emit this after an item/article has been starred or unstarred.
Best location to emit this signal is your implementation of itemStarred().
| feedId | the ID of the feed the item/article that has been starred or unstarred belongs to |
| guidHash | the global unique ID hash of the article that has been starred or unstarred |
| starred | true if the article has been starred, false if it has been unstarred |
|
signal |
Emit this after items/articles have been starred or unstarred.
Best location to emit this signal is your implementation of itemsStarred().
| articles | list of pairs of feed ID and guid hash of starred/unstarred articles |
| star | true if the articles have been starred, false if they have been unstarred |
|
signal |
This is emitted after the local storage has been cleared.
Emit this in your implementation of clearStorage() after all local data has been deleted successfully.
|
virtual |
Returns the total number of unread articles.
|
signal |
This signal is emitted if the amount of total unread articles changes.