|
libfuoten 0.8.2
Qt based library to access the Nextcloud News App API.
|
Handles and manages remote wipe requests. More...
#include <Fuoten/Helper/WipeManager>
Properties | |
| bool | inOperation |
Returns true while remote wipe is running. | |
Public Member Functions | |
| WipeManager (QObject *parent=nullptr) | |
| Constructs a new WipeManager object with the given parent. | |
| ~WipeManager () override | |
| Destroys the WipeManager object. | |
| void | checkForWipe () |
| Call this to check if remote wipe should be performed. | |
| bool | inOperation () const |
Returns true while remote wipe is running. | |
| void | setConfiguration (AbstractConfiguration *configuration) |
| Sets the configuration. | |
| void | setNotificator (AbstractNotificator *notificator) |
| Sets the notificator. | |
| void | setStorage (AbstractStorage *storage) |
| Sets the storage. | |
Signals | |
| void | inOperationChanged (bool inOperation) |
| Emitted if the inOperation property changes. | |
| void | wipeDone () |
| Emitted if the wipe has been done. | |
| void | wipeFailed () |
| Emitted if the wipe has been failed. | |
| void | wipeStarted () |
| Emitted if the wipe has been started. | |
Handles and manages remote wipe requests.
Coordinates the use of different classes and objects to perform remotely requested wipe of application data on this device. It is used in the implementations of Component::extractError() after the Nextcloud server replied with a 401 or 403 HTTP status code. If that happens, checkForWipe() is called. It uses GetWipeStatus to check if a remote wipe is requested by the server for this application. If a wipe is requested, it will use AbstractStorage::clearStorage() and AbstractConfiguration::deleteAccount() to delete the local data. After the data has been wiped it will use PostWipeSuccess to inform the Nextcloud server about the performed wipe.
If no configuration or no storage or no notificator has been set to this object, Component::defaultConfiguration(), Component::defaultStorage() or Component::defaultNotifactor() will be used if they have been set. At least a configuration is mandatory.
To set a default wipe manager that will be used for all actions, use Component::setDefaultWipemanager().
|
read |
Returns true while remote wipe is running.
|
explicit |
Constructs a new WipeManager object with the given parent.
|
override |
Destroys the WipeManager object.
| void WipeManager::checkForWipe | ( | ) |
Call this to check if remote wipe should be performed.
This will use GetWipeStatus to check if a remote wipe has been requested by the Nextcloud server. If a wipe has been requested, the wipe will be performed and the wipeStarted() signal will be emitted. If something fails, wipeFailed() will be emitted. If the wipe has been performed, wipeDone() will be emitted.
| bool WipeManager::inOperation | ( | ) | const |
Returns true while remote wipe is running.
|
signal |
Emitted if the inOperation property changes.
| void WipeManager::setConfiguration | ( | AbstractConfiguration * | configuration | ) |
Sets the configuration.
If no configuration has been set, Component::defaultConfiguration() will be used.
| void WipeManager::setNotificator | ( | AbstractNotificator * | notificator | ) |
Sets the notificator.
If no notificator has been set, Component::defaultNotificator() will be used.
| void WipeManager::setStorage | ( | AbstractStorage * | storage | ) |
Sets the storage.
If no storage has been set, Component::defaultStorage() will be used.
|
signal |
Emitted if the wipe has been done.
|
signal |
Emitted if the wipe has been failed.
|
signal |
Emitted if the wipe has been started.