Persistent storage for storing deleted item IDs.
More...
#include <DeletedItemsIdStorage.h>
|
| DeletedItemsIdStorage () |
| Contructor.
|
|
| ~DeletedItemsIdStorage () |
| Destructor.
|
|
bool | init (const QString &aDbFile) |
| Initializes backend. More...
|
|
bool | uninit () |
| Uninitializes backend. More...
|
|
bool | getSnapshot (QList< QString > &aItems, QList< QDateTime > &aCreationTimes) const |
| Retrieves persistently stored snapshot of item id's. More...
|
|
bool | setSnapshot (const QList< QString > &aItems, const QList< QDateTime > &aCreationTimes) |
| Store a snapshot of item id's persistently. More...
|
|
void | addDeletedItem (const QString &aItem, const QDateTime &aCreationTime, const QDateTime &aDeleteTime) |
| Adds a deleted item to backend. More...
|
|
void | addDeletedItems (const QList< QString > &aItems, const QList< QDateTime > &aCreationTimes, const QList< QDateTime > &aDeleteTimes) |
| Adds deleted items to backend. More...
|
|
bool | getDeletedItems (QList< QString > &aItems, const QDateTime &aTime) |
| Returns the deleted items after given time. More...
|
|
Persistent storage for storing deleted item IDs.
◆ addDeletedItem()
void DeletedItemsIdStorage::addDeletedItem |
( |
const QString & |
aItem, |
|
|
const QDateTime & |
aCreationTime, |
|
|
const QDateTime & |
aDeleteTime |
|
) |
| |
Adds a deleted item to backend.
- Parameters
-
aItem | Item Id |
aCreationTime | Time when item was initially created |
aDeleteTime | Time of deletion |
◆ addDeletedItems()
void DeletedItemsIdStorage::addDeletedItems |
( |
const QList< QString > & |
aItems, |
|
|
const QList< QDateTime > & |
aCreationTimes, |
|
|
const QList< QDateTime > & |
aDeleteTimes |
|
) |
| |
Adds deleted items to backend.
- Parameters
-
aItems | Items Ids |
aCreationTimes | Times when the items were initially created |
aDeleteTimes | Times of deletion |
◆ ensureDeletedItemsExists()
bool DeletedItemsIdStorage::ensureDeletedItemsExists |
( |
| ) |
|
|
protected |
Checks whether item id table exists and creates it if needed.
- Returns
- True on success, otherwise false
◆ ensureItemSnapshotExists()
bool DeletedItemsIdStorage::ensureItemSnapshotExists |
( |
| ) |
|
|
protected |
Checks whether snapshot table exists and creates it if needed.
- Returns
- True on success, otherwise false
◆ getDeletedItems()
bool DeletedItemsIdStorage::getDeletedItems |
( |
QList< QString > & |
aItems, |
|
|
const QDateTime & |
aTime |
|
) |
| |
Returns the deleted items after given time.
- Parameters
-
aItems | Returned deleted items |
aTime | Items deleted after this time are considered deleted |
- Returns
- True on success, otherwise false
◆ getSnapshot()
bool DeletedItemsIdStorage::getSnapshot |
( |
QList< QString > & |
aItems, |
|
|
QList< QDateTime > & |
aCreationTimes |
|
) |
| const |
Retrieves persistently stored snapshot of item id's.
- Parameters
-
aItems | Items of the snapshot |
aCreationTimes | Creation times of the items |
- Returns
- True on success, otherwise false
◆ init()
bool DeletedItemsIdStorage::init |
( |
const QString & |
aDbFile | ) |
|
Initializes backend.
- Parameters
-
aDbFile | Path to database to use as persistent storage |
- Returns
- True on success, otherwise false
◆ setSnapshot()
bool DeletedItemsIdStorage::setSnapshot |
( |
const QList< QString > & |
aItems, |
|
|
const QList< QDateTime > & |
aCreationTimes |
|
) |
| |
Store a snapshot of item id's persistently.
- Parameters
-
aItems | Item id's to store |
aCreationTimes | Creation times of the items |
- Returns
- True on success, otherwise false
◆ uninit()
bool DeletedItemsIdStorage::uninit |
( |
| ) |
|
Uninitializes backend.
- Returns
- True on success, otherwise false
The documentation for this class was generated from the following files: