signon
8.42
|
Base class for server objects that can be automatically destroyed after a certain period of inactivity. More...
#include <signondisposable.h>
Public Slots | |
static void | destroyUnused () |
Deletes all disposable object for which the inactivity time has elapsed. |
Public Member Functions | |
SignonDisposable (int maxInactivity, QObject *parent) | |
Construct an object that can be automatically destroyed after having being unused for seconds. | |
virtual void | destroy () |
Performs any predestruction operations and the destruction itself. | |
void | keepInUse () const |
Mark the object as used. | |
void | setAutoDestruct (bool value=true) const |
Mark the object as used. |
Static Public Member Functions | |
static void | invokeOnIdle (int maxInactivity, QObject *object, const char *member) |
Invoke the specified method on when there are no disposable objects for more than seconds. |
Protected Member Functions | |
virtual | ~SignonDisposable () |
Base class for server objects that can be automatically destroyed after a certain period of inactivity.
Definition at line 39 of file signondisposable.h.
|
protectedvirtual |
Definition at line 52 of file signondisposable.cpp.
SignonDaemonNS::SignonDisposable::SignonDisposable | ( | int | maxInactivity, |
QObject * | parent | ||
) |
Construct an object that can be automatically destroyed after having being unused for seconds.
maxInactivity | the number of seconds of inactivity. |
parent | the parent object. |
Definition at line 33 of file signondisposable.cpp.
References destroyUnused(), and keepInUse().
|
inlinevirtual |
Performs any predestruction operations and the destruction itself.
Reimplement this for smoother control.
Reimplemented in SignonDaemonNS::SignonSessionCore, and SignonDaemonNS::SignonIdentity.
Definition at line 60 of file signondisposable.h.
Referenced by destroyUnused().
|
staticslot |
Deletes all disposable object for which the inactivity time has elapsed.
Definition at line 109 of file signondisposable.cpp.
References destroy(), and TRACE.
Referenced by SignonDaemonNS::SignonSessionCore::childEvent(), SignonDaemonNS::SignonDaemonAdaptor::getAuthSessionObjectPath(), SignonDaemonNS::SignonDaemonAdaptor::getIdentity(), invokeOnIdle(), SignonDaemonNS::SignonDaemonAdaptor::registerNewIdentity(), and SignonDisposable().
|
static |
Invoke the specified method on when there are no disposable objects for more than seconds.
To keep the implementation simpler, this function can be called only once, and the variable must still be accessible when the method will be invoked (use a static string).
Definition at line 81 of file signondisposable.cpp.
References destroyUnused().
void SignonDaemonNS::SignonDisposable::keepInUse | ( | ) | const |
Mark the object as used.
Calling this method causes the inactivity timer to be reset.
Definition at line 57 of file signondisposable.cpp.
Referenced by SignonDaemonNS::SignonIdentity::addReference(), SignonDaemonNS::SignonSessionCore::childEvent(), SignonDaemonNS::SignonSessionCore::destroy(), SignonDaemonNS::SignonDaemon::getIdentity(), SignonDaemonNS::SignonIdentity::getInfo(), SignonDaemonNS::SignonSessionCore::id(), SignonDaemonNS::SignonSessionCore::method(), SignonDaemonNS::SignonSessionCore::process(), SignonDaemonNS::SignonSessionCore::queryAvailableMechanisms(), SignonDaemonNS::SignonIdentity::remove(), SignonDaemonNS::SignonIdentity::removeReference(), setAutoDestruct(), SignonDaemonNS::SignonSessionCore::setId(), SignonDisposable(), SignonDaemonNS::SignonIdentity::signOut(), SignonDaemonNS::SignonIdentity::store(), and SignonDaemonNS::SignonIdentity::verifySecret().
void SignonDaemonNS::SignonDisposable::setAutoDestruct | ( | bool | value = true | ) | const |
Mark the object as used.
Calling this method enables/disables autodestruction.
value | enable/disable autodestruction |
Definition at line 75 of file signondisposable.cpp.
References keepInUse().
Referenced by SignonDaemonNS::SignonIdentity::queryUiSlot(), SignonDaemonNS::SignonIdentity::requestCredentialsUpdate(), and SignonDaemonNS::SignonIdentity::verifyUiSlot().