-
Notifications
You must be signed in to change notification settings - Fork 663
Design
Christian Kamm edited this page Jul 17, 2019
·
7 revisions
This document is not up to date, but still somewhat applicable. Prefer in-source documentation where possible.
The key is the Account
class, which represents an account. The accounts are held by the the AccountManager
class. It's main features are:
- Saving and restoring itself from config file
- Holding the current state
- Holding the current URL
- Holding the credentials (currently: HTTP Basic, Shibboleth, Dummy)
- Holding a
QNetworkAccessManager
instance (with convenience methods to createQNetworkReply
s. - Access the current quota info
The classes that contribute to state changes are:
-
Application
: SetSigned Out
on explicit sign out. When the credentials have been fetched, but have not been provided, setSignedOut
, if they are wrong (set toInvalidCredentials
), set toDisconnected
and try again. -
ConnectionValidator
: KeepSignedOut
or setDisconnected
if authentication fails. SetDisconnected
ifstatus.php
could not be found in the first place. When in disconnected state, runs every 32 seconds and attempt to connect when the network is available again. If the authentication succeeds, it's set toConnected
. -
Folder
: Switch toDisconnected
if E-Tag request fails -
AbstractNetworkJob
: Switch toInvalidCredentials
state if the credentials are invalid and they job needs to run authenticated. -
QuotaInfo
: Switch associated Account toDisconnected
in failure.
Network Jobs are based on the AbstractNetworkJob
class, which provides convenience functions. They require an Account
object.
☁️