Skip to main content

Module handed

Module handed 

Source
Expand description

What other applications hand Sioul to write: files and text shared to it (Android’s share sheet, or one of your addresses straight from it), a mailto: link (Android, or the computer’s mail program). Each becomes a draft, its window opened; nothing is sent until you press Send (docs/client.md, “Writing from other applications”).

A request waits in handed/incoming/ (in Sioul’s data folder) until the window takes it: <id>.json, the request (Handed), written once and whole by whoever hands it (Android’s ShareActivity.java, a second sioul-app mailto:…); <id>.done.json (Arrived), the files copied for it, written once they all are; <id>.draft (Mark), the draft made from it while its files are still coming. The files are Sioul’s own copies, in handed/files/<id>/: they go with the draft when it is sent or discarded (Draft::discard). Neither travels to your other devices: the sharing carries the drafts, not this folder, and a request is this device’s.

Structs§

Arrived
The files copied for a request.
ArrivedFile
Handed
A message another application asks Sioul to write.
Incoming
The folders of requests and of their files.
Mark
A request taken, its files still coming: the draft made from it.

Functions§

attach
The files of arrived attached to draft, those copied into folder (their request’s) only; returns those that could not be, by name, with why.
draft
The draft a request asks for, not saved yet: its recipients (the mailto: address’s, then those handed beside it, each once), its subject, its text (the address’s body, then the text shared), the message it answers, and the account’s signature below. None when no account sends.
new_id 🔒
A name for a request: the moment, and a little of the process, as drafts’ names are.
sender
The account a message handed to Sioul goes out from: the one asked (by its id or its address) when it sends, else Sioul’s usual one, the first by priority among those that send, as for “Write”. None when no account sends.
valid_id
Whether id can name a request: letters, digits and “-”, nothing that leaves its folder.
write_whole 🔒
A text written whole: under another name, then renamed.