libfuoten 0.8.2
Qt based library to access the Nextcloud News App API.
Loading...
Searching...
No Matches
Fuoten::WipeManager Class Reference

Handles and manages remote wipe requests. More...

#include <Fuoten/Helper/WipeManager>

Inheritance diagram for Fuoten::WipeManager:
QObject

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.

Detailed Description

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().

Since
0.8.0
See also
PostWipeSuccess, GetWipeStatus

Property Documentation

◆ inOperation

bool Fuoten::WipeManager::inOperation
read

Returns true while remote wipe is running.

Access functions
Notifier signal

Constructor & Destructor Documentation

◆ WipeManager()

WipeManager::WipeManager ( QObject * parent = nullptr)
explicit

Constructs a new WipeManager object with the given parent.

◆ ~WipeManager()

WipeManager::~WipeManager ( )
override

Destroys the WipeManager object.

Member Function Documentation

◆ checkForWipe()

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.

◆ inOperation()

bool WipeManager::inOperation ( ) const

Returns true while remote wipe is running.

See also
WipeManager::inOperation, inOperationChanged()

◆ inOperationChanged

void Fuoten::WipeManager::inOperationChanged ( bool inOperation)
signal

Emitted if the inOperation property changes.

◆ setConfiguration()

void WipeManager::setConfiguration ( AbstractConfiguration * configuration)

Sets the configuration.

If no configuration has been set, Component::defaultConfiguration() will be used.

◆ setNotificator()

void WipeManager::setNotificator ( AbstractNotificator * notificator)

Sets the notificator.

If no notificator has been set, Component::defaultNotificator() will be used.

◆ setStorage()

void WipeManager::setStorage ( AbstractStorage * storage)

Sets the storage.

If no storage has been set, Component::defaultStorage() will be used.

◆ wipeDone

void Fuoten::WipeManager::wipeDone ( )
signal

Emitted if the wipe has been done.

◆ wipeFailed

void Fuoten::WipeManager::wipeFailed ( )
signal

Emitted if the wipe has been failed.

◆ wipeStarted

void Fuoten::WipeManager::wipeStarted ( )
signal

Emitted if the wipe has been started.


The documentation for this class was generated from the following files:
  • Fuoten/Helpers/wipemanager.h
  • build/Fuoten/FuotenQt5_autogen/include/moc_wipemanager.cpp
  • Fuoten/Helpers/wipemanager.cpp