Skip to main content

Module backend

Module backend 

Source
Expand description

The object behind the window.

It hands QML the core’s views as JSON (sioul_core::view), already in your language, and runs everything slow on background threads: fetching mail, finding servers, testing logins. Results come back to Qt’s thread through qt_thread().queue. Each mail account has a watcher that keeps its inbox open with IDLE, so a verified code becomes a notification within seconds.

ModulesΒ§

qobject

StructsΒ§

FoundView πŸ”’
The settings found, as the form shows them.
Job πŸ”’
A page computed on a thread, one computation at a time: asked again while one runs, it runs once more after it, with everything changed meanwhile. Fetches and changes ask often; a thread each would pile up on a slow disk.
Shared πŸ”’
What the background threads and the window share.
SioulRust
Views πŸ”’
Everything the window shows, computed off Qt’s thread.
World πŸ”’
What the Porch and the budgets read: the configuration and its lists.

EnumsΒ§

Afterwards πŸ”’
What happens to an attachment once the antivirus found it clean. One the desktop would run rather than show (links::is_program: programs, scripts, shortcuts, installers, disk images) is only saved.

ConstantsΒ§

REPLAN_EVERY πŸ”’
The plan is made again every twelve hours, and when the day changes: a task not done by its planned day moves on, and what waits for it follows.
SAID_FOR πŸ”’
How long what you did stays in the status line before routine news.
WEATHER_FRESH πŸ”’
A forecast is kept half an hour.

StaticsΒ§

AWAY πŸ”’
Sioul put away on a phone: the pages are not computed for nobody (Android stops an app that works in the background); each job asked meanwhile runs once when it is back (back_here).

FunctionsΒ§

add_mail πŸ”’
A mail account added: tested with its password (given, or, None, the one its address’s calendars and contacts use), then kept; its watcher started.
attachment_cache πŸ”’
Where attachments are written to be opened: <cache>/sioul/attachments/<message>/.
call_Sioul_signal_handler_accountAdded πŸ”’
call_Sioul_signal_handler_accountPasswordDone πŸ”’
call_Sioul_signal_handler_accountsChanged πŸ”’
call_Sioul_signal_handler_agendaChanged πŸ”’
call_Sioul_signal_handler_awayChanged πŸ”’
call_Sioul_signal_handler_bitwardenAnswered πŸ”’
call_Sioul_signal_handler_bitwardenFound πŸ”’
call_Sioul_signal_handler_blockedChanged πŸ”’
call_Sioul_signal_handler_budgetsChanged πŸ”’
call_Sioul_signal_handler_busyChanged πŸ”’
call_Sioul_signal_handler_composeRequested πŸ”’
call_Sioul_signal_handler_contactsChanged πŸ”’
call_Sioul_signal_handler_copyRequested πŸ”’
call_Sioul_signal_handler_draftFilesArrived πŸ”’
call_Sioul_signal_handler_draftsChanged πŸ”’
call_Sioul_signal_handler_duplicatesChanged πŸ”’
call_Sioul_signal_handler_focusSessionChanged πŸ”’
call_Sioul_signal_handler_forecastChanged πŸ”’
call_Sioul_signal_handler_formBusyChanged πŸ”’
call_Sioul_signal_handler_formErrorChanged πŸ”’
call_Sioul_signal_handler_foundChanged πŸ”’
call_Sioul_signal_handler_healthViewChanged πŸ”’
call_Sioul_signal_handler_keysChanged πŸ”’
call_Sioul_signal_handler_lettersChanged πŸ”’
call_Sioul_signal_handler_linksChanged πŸ”’
call_Sioul_signal_handler_mailAccountsChanged πŸ”’
call_Sioul_signal_handler_mailFiltersFound πŸ”’
call_Sioul_signal_handler_mailFolderChanged πŸ”’
call_Sioul_signal_handler_mailSearchChanged πŸ”’
call_Sioul_signal_handler_messageRead πŸ”’
call_Sioul_signal_handler_missedViewChanged πŸ”’
call_Sioul_signal_handler_modeChanged πŸ”’
call_Sioul_signal_handler_needsViewChanged πŸ”’
call_Sioul_signal_handler_notesChanged πŸ”’
call_Sioul_signal_handler_openUrl πŸ”’
call_Sioul_signal_handler_overlapsChanged πŸ”’
call_Sioul_signal_handler_paperKept πŸ”’
call_Sioul_signal_handler_phoneAccountChosen πŸ”’
call_Sioul_signal_handler_placesChanged πŸ”’
call_Sioul_signal_handler_placesFoundChanged πŸ”’
call_Sioul_signal_handler_porchChanged πŸ”’
call_Sioul_signal_handler_readingChanged πŸ”’
call_Sioul_signal_handler_realtimeChanged πŸ”’
call_Sioul_signal_handler_reminderOpened πŸ”’
call_Sioul_signal_handler_scanUnavailable πŸ”’
call_Sioul_signal_handler_scoutedChanged πŸ”’
call_Sioul_signal_handler_scoutingChanged πŸ”’
call_Sioul_signal_handler_securityKeyChanged πŸ”’
call_Sioul_signal_handler_shareEstimated πŸ”’
call_Sioul_signal_handler_shareListed πŸ”’
call_Sioul_signal_handler_sharePutBackDone πŸ”’
call_Sioul_signal_handler_shareStarted πŸ”’
call_Sioul_signal_handler_sharedIn πŸ”’
call_Sioul_signal_handler_sitesChanged πŸ”’
call_Sioul_signal_handler_spamChanged πŸ”’
call_Sioul_signal_handler_statusChanged πŸ”’
call_Sioul_signal_handler_taskDone πŸ”’
call_Sioul_signal_handler_tasksChanged πŸ”’
call_Sioul_signal_handler_undoLineChanged πŸ”’
checked_attachment πŸ”’
Writes an attachment to the cache, has the antivirus check it, then opens or saves it; a threat, or no antivirus, and the copy is deleted. On a phone, which has no antivirus Sioul can call, nothing is scanned and nothing claims it: the attachment opens in the app you choose, or Android asks where to save it (attachments).
coalesced πŸ”’
Runs work on a thread for the job which picks out (see Job).
compute πŸ”’
config_path πŸ”’
downloads πŸ”’
The downloads folder the desktop names.
end_work_now πŸ”’
Work time or quiet time, as the window shows it. β€œWork now” taken back, as Sioul starts or closes; the rest of the overrides kept.
file_url πŸ”’
A file’s address for Qt and the desktop: β€œfile:///home/me/A%20b.pdf”, and β€œfile:///C:/Users/me/A%20b.pdf” on Windows; what an address cannot hold as is (β€œ#”, β€œ?”, spaces, accents) percent-encoded, so the file itself is reached.
forget_opened_attachments πŸ”’
Attachments written to be opened in an earlier session, taken out of the cache once a day old: a decrypted one would stay readable there otherwise.
free_path πŸ”’
name, else β€œname (2).ext”, β€œname (3).ext”… so nothing is overwritten.
give_password πŸ”’
An account’s password given on this device: tested with its server (its mail, or its calendars and contacts), kept in the keyring, its sync started again; account_password_done says how it went.
json πŸ”’
learn πŸ”’
Learns the provider’s authserv-id once per session, while it is unknown.
load_config πŸ”’
local_path πŸ”’
The file a file:// address names (from a file dialog, a drop), its percent-escapes undone; β€œfile:///C:/…” is β€œC:\…” on Windows. Anything else is a path already.
mark_from_mail πŸ”’
A file come by mail marked as the system marks what comes from the Internet: the Mark of the Web on Windows, the quarantine on macOS. Office then opens it in Protected View, Gatekeeper checks it. A disk that cannot keep the mark leaves the file as it is.
message_json πŸ”’
A message laid out for reading, as JSON (view::MessageView); empty if it cannot be read. Read on a thread of its own (read_message).
mode_json πŸ”’
mode_now πŸ”’
The time now: what it is for, and until when (docs/areas.md; hours).
notify_codes πŸ”’
One quiet notification per verified code among new mail, with a copy button.
offline πŸ”’
Whether Sioul stays off the network: SIOUL_DEMO set, for a demo profile and its pictures. Nothing is fetched or sent by itself; what is kept on this computer is shown.
one_at_a_time πŸ”’
The lock of something done one at a time, when nothing holds it; a panic in an earlier run (bad data in a file) does not stop it for the session.
one_file_name πŸ”’
An attachment’s name as one file in a folder. The core takes any path out of it; Windows also reads β€œC:x” as a drive, β€œa:b” as a hidden stream and β€œCON”, β€œNUL”… as devices: those characters become β€œ_”, those names get one in front, and the dots and spaces it would drop at the end go.
pace_of πŸ”’
The pace of an address: its own, else everyone’s.
read_shielded πŸ”’
A shielded address that allows the AI: what it has not read yet, read now, before the Porch shows it again. Nothing is sent without a key.
reading_json πŸ”’
How long text reads, for the window’s theme; and whether the places show their names.
reported πŸ”’
What a watcher said: the account’s status, the provider’s id to learn, notifications for new codes, and the views again.
retie_project πŸ”’
A project’s routes changed: the mail already here that only its text or an attachment ties to it, tied now, on a thread (routes on the sender and the subject are matched again each time the project shows). Each message as the Porch takes it (porch::Gate): never one it sets aside (a blocked sender, forged, a borrowed name, spam a route does not protect).
say πŸ”’
session_language πŸ”’
The session’s language: its variables (LC_ALL, LC_MESSAGES, LANG) when it has them, as on Linux; else the system’s own setting, as Qt reads it on Windows and macOS, where a window started from the desktop gets none.
set_status πŸ”’
show πŸ”’
Computes the views on a thread and shows them, unless newer ones came first.
sort_on_server πŸ”’
After a fetch of account (new: its inbox’s arrivals, maybe none), on a thread of its own (it reaches the server; this is the watcher’s): what your own spam filter moves, as you chose, into the Junk folder; then your mail filters (docs/client.md, β€œFilters”), on the arrivals still unread and what waits for another look, never on what the spam filter reviews. What a filter could not act on is told as new mail, and why said in the status line; the Porch is read again when something moved.
start_new_watchers πŸ”’
Syncs for the accounts not started yet this session: those another device’s settings just brought. One that stopped (a password refused) is not tried again here: retries can lock an account.
start_watcher πŸ”’
start_watchers πŸ”’
Starts a watcher for every mail account that has none running.
system_locale πŸ”’
Elsewhere the session’s variables say it all.
tell πŸ”’
Says what became of something you did; it stays a while (SAID_FOR).
tie_to_projects πŸ”’
Mail just fetched that a project takes, by its routes or its conversation: tied to the project, so its page shows it whatever its routes need, and the replies that come later follow it.
tr πŸ”’
One translator for the session: the configuration’s language, else the session’s.
update_paces πŸ”’
Gives every running watcher its pace from the configuration, and real time.
update_weather πŸ”’
The weather applet, from the forecast kept, fetched again when it is half an hour old; nothing without a place.
want_password πŸ”’
Notes whether an account’s password is wanted after what its sync said: none here, or refused. Its card then offers to give one.
weather_cache πŸ”’
Where the forecast is kept between fetches (the phone’s card reads it too, homecard).

Type AliasesΒ§

QtThread πŸ”’