Skip to main content

Module pim

Module pim 

Source
Expand description

Contacts and calendars behind the window.

What you change is written to the folders on disk at once, then the account’s sync sends it, right away when the server answers, later when it does not: nothing waits on the network. Each contacts-and-calendars account syncs in the background every fifteen minutes, and at once after a change here. Deleting waits ten seconds with “Undo”, as in the mail.

Structs§

CalendarChoice 🔒
EventView 🔒
InvitationView 🔒
PimState 🔒
What the contacts and agenda pages show: their search and their stretch of days.
SavedEvent 🔒
What saving the event form wrote: its file at last, the accounts to tell, the task of a time block renamed, and its title.

Constants§

DAV_PAUSE 🔒
Between two syncs of an account’s contacts and calendars, unless something changed here.

Functions§

account_of 🔒
The account a contact or event file belongs to, from its folder.
add_account 🔒
Adds a contacts-and-calendars account: finds where they are, tests the password, keeps it in the keyring, and starts syncing. On a thread.
add_google_account 🔒
Adds a Google account, or signs one in again (again: its id): Google’s page opens in your browser, Sioul waits for its answer here (Cancel stops the wait), finds the calendars and contacts, and syncs them. On a thread.
add_sender 🔒
A sender becomes a contact, in the first address book.
agenda_items 🔒
What every agenda shows from from to to (Unix seconds), the window’s, the phone’s and the home card alike (21 October 2026): the calendars’ events, those whose deletion waits (“Undo”) aside, a task’s time block marked as the task it is, with its list (agenda::mark_tasks).
agenda_read 🔒
The calendars’ events from from to to, those whose deletion waits aside, before their tasks are known (agenda_items; the home card marks them with the tasks of its plan).
answer 🔒
Answers an invitation: “accepted”, “tentative” or “declined”. Accepted or maybe, the event goes into your first calendar; then your answer goes to the organizer, from the account the invitation came to. “add” only adds it (an event published, not asked); “remove” takes a cancelled one out.
books 🔒
The address books a contact can go into: [{id, name}].
calendars 🔒
The calendars an event can go into.
collection_of 🔒
The collection a file is in.
completions 🔒
Addresses to complete what is typed in an address field, as JSON.
contact 🔒
A contact, every field, for its card and its form.
contact_for 🔒
The contact with this address, by file; empty when there is none.
delete_contact 🔒
Deletes a contact, after ten seconds to undo.
delete_event 🔒
Deletes an event, or only this occurrence of a repeating one, after ten seconds to undo.
event 🔒
An event as its form shows it: the calendar it belongs to, by name too, and whether that calendar stays on this device alone.
find_uid 🔒
The event file with this UID, in any calendar.
google_sentence 🔒
What went wrong while signing in with Google, in your language (its mail’s sign-in too, gmail.rs).
here_only 🔒
Whether a calendar stays on this device alone (21 October 2026): this device’s own (vdir::LOCAL) while the sharing does not carry them (no sharing set up, or its part “lists” off here). A server’s calendar is on every device that has its account.
invitation 🔒
The invitation a message carries, as the reader shows it; empty when it carries none.
move_contact 🔒
A contact moved to another address book: written there, then taken out here. When the book would not keep something the card holds, nothing moves until confirmed: returns {"losses": [words]}, else {"key"} or {"error"}.
move_event 🔒
An event moved by a drag in the agenda: its occurrence starting at start now from new_start to new_end (Unix seconds), that time alone or every time (agenda::moved); then sent, the agenda and the plan made again, and “Undo” offered for ten seconds, which writes back what the file held, unless it changed since (a sync, another device). Returns what went wrong, else “”.
move_event_file 🔒
An event’s file moved to another calendar (its editor, 21 October 2026), of any account, this device’s own to a server’s above all, so that an event filed there by mistake reaches your other devices: noted, written there, taken out here (vdir::move_item, a step cut short finished at the next look), never twice, never lost. The sync sends both: the new item there, the deletion here. Its new path.
nudge 🔒
The account’s background sync runs now.
ours 🔒
A file inside Sioul’s address books and calendars, never elsewhere: no “..”, which starts_with would let through (“contacts/../../.bashrc”).
overlaps 🔒
Two events at once in the next days days, or closer than a time you set between them (overlaps::overlaps), those set aside left out, as JSON: [{key, day, today, first, second, gap, needed, at_once, source}], each event {key, title, from, to} (“09:30”), gap and needed in minutes, source where that time is set, in words, for the Porch and the agenda.
reported 🔒
What a sync said: the account’s status, conflicts in the status line, the pages again.
save_contact 🔒
Saves the contact form: into its file, or a new one in the first address book; then sent. Returns the contact’s file.
save_event 🔒
Saves the event form: into its file, or a new one in calendar (“account/id”); then sent.
send_answer 🔒
The REPLY to the organizer, through the account the invitation came to.
set_overlap_aside 🔒
An overlap set aside for good; returns what went wrong, else “”.
show_pim 🔒
Computes both pages on a thread and shows them.
start_dav_watcher 🔒
start_dav_watchers 🔒
Starts a background sync for each contacts-and-calendars account that has none.
status_of 🔒
An account’s status after a sync that listed its collections: how many were found and how many synced whole, at what time; with what went wrong with some of them, the first (the phone’s calendars of 21 October 2026: a partial state is never silent).
stop_dav_watcher 🔒
Stops an account’s background sync: it was removed.
sync_line 🔒
The phone’s log after each sync of an account (21 October 2026): counts only, and what went wrong as a code; never a name, an address or a calendar’s.
watchers_line 🔒
The phone’s log at the start of the syncs: how many contacts-and-calendars accounts this device has, switched on and off, and those it cannot sync (no server named); never which.
with_others 🔒
Whether an event’s text names an organizer or guests: a meeting with others, which a server’s scheduling answers for (RFC 6638), mail to them included.
with_smtp 🔒
The account with its sending server, found and kept when it had none.
write_event 🔒
The event form written (save_event, off the window): into its file, or a new one in calendar; an event already there moved to calendar when another is chosen (move_event_file).