|
QXmpp Version: 1.15.1
|
Storage backend used by QXmppRosterManager to cache the roster between sessions (RFC 6121 §2.6 Roster Versioning). More...
#include <QXmppRosterStorage.h>

Classes | |
| struct | RosterCache |
| Snapshot of the persisted roster: server version + items. More... | |
Public Member Functions | |
| virtual QXmppTask< RosterCache > | load ()=0 |
| Loads the persisted roster. | |
| virtual QXmppTask< void > | replaceAll (const QString &version, const std::vector< QXmppRosterIq::Item > &items)=0 |
| virtual QXmppTask< void > | upsertItem (const QString &version, const QXmppRosterIq::Item &item)=0 |
| virtual QXmppTask< void > | removeItem (const QString &version, const QString &bareJid)=0 |
| virtual QXmppTask< void > | clear ()=0 |
Storage backend used by QXmppRosterManager to cache the roster between sessions (RFC 6121 §2.6 Roster Versioning).
Implementations are responsible for persisting the version string returned by the server together with the current set of roster items. QXmppRosterManager owns a default in-memory implementation (QXmppRosterMemoryStorage); callers that want real persistence implement this interface and pass an instance via QXmppRosterManager::setStorage() before connecting to the server.
All operations are asynchronous so that disk- or network-backed implementations can run off the GUI thread. Each mutating operation carries the new roster version so that the backend can persist the item change and the version atomically.
The storage instance is scoped to a single account. Multi-account applications should either instantiate one storage object per QXmppRosterManager or implement their own JID-scoped backend.
Out-of-line virtual destructor anchors the vtable in this translation unit.
|
pure virtual |
Wipes all persisted data (items and version). Used on account switch or explicit logout.
|
pure virtual |
Removes the item with the given bare JID (if present) and stores the new version. Called for roster pushes with subscription == Remove.
|
pure virtual |
Replaces every persisted item with the given list and stores the new version. Called when the server returns a full roster snapshot.
|
pure virtual |
Inserts or replaces a single item and stores the new version. Called for roster pushes with subscription != Remove.