-
Notifications
You must be signed in to change notification settings - Fork 683
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
QNetworkAccessManagerinstance (with convenience methods to createQNetworkReplys. - Access the current quota info
The classes that contribute to state changes are:
-
Application: SetSigned Outon explicit sign out. When the credentials have been fetched, but have not been provided, setSignedOut, if they are wrong (set toInvalidCredentials), set toDisconnectedand try again. -
ConnectionValidator: KeepSignedOutor setDisconnectedif authentication fails. SetDisconnectedifstatus.phpcould 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 toDisconnectedif E-Tag request fails -
AbstractNetworkJob: Switch toInvalidCredentialsstate if the credentials are invalid and they job needs to run authenticated. -
QuotaInfo: Switch associated Account toDisconnectedin failure.
Network Jobs are based on the AbstractNetworkJob class, which provides convenience functions. They require an Account object.
☁️