|
libfuoten 0.8.1
Qt based library to access the ownCloud/Nextcloud News App API
|
#include <Fuoten/Helper/WipeManager>
Properties | |
| bool | inOperation |
Public Member Functions | |
| WipeManager (QObject *parent=nullptr) | |
| ~WipeManager () override | |
| void | checkForWipe () |
| bool | inOperation () const |
| void | setConfiguration (AbstractConfiguration *configuration) |
| void | setNotificator (AbstractNotificator *notificator) |
| void | setStorage (AbstractStorage *storage) |
Signals | |
| void | inOperationChanged (bool inOperation) |
| void | wipeDone () |
| void | wipeFailed () |
| void | wipeStarted () |
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 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 inOperation | ( | ) | const |
Returns true while remote wipe is running.
|
signal |
Emitted if the inOperation property changes.
| void setConfiguration | ( | AbstractConfiguration * | configuration | ) |
Sets the configuration.
If no configuration has been set, Component::defaultConfiguration() will be used.
| void setNotificator | ( | AbstractNotificator * | notificator | ) |
Sets the notificator.
If no notificator has been set, Component::defaultNotificator() will be used.
| void 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.