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.

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.
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.
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).
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 โ€œโ€.
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, their margins counted, those set aside left out, as JSON: [{key, day, today, first, second}], each event {key, title, from, to} (โ€œ09:30โ€), 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.
stop_dav_watcher ๐Ÿ”’
Stops an accountโ€™s background sync: it was removed.
with_smtp ๐Ÿ”’
The account with its sending server, found and kept when it had none.