Skip to main content

Module replies

Module replies 

Source
Expand description

Replies from your computers to your phone’s notifications, on the phone (docs/android.md, “Replies from your computers”; the rules are sioul_core::replies). The listener’s side, in its own process (AppNotes.java, Replies.java), through sioul_replies_listener:

  • What is due (“due”): what the background step handed over, sealed in the phone’s private replies folder, not taken yet: its key, its verb and its notification’s name, never the words.
  • Checked (“check”): the live notification Java found by that name is still the conversation answered (replies::check), and whether their newer messages crossed the reply.
  • Taken (“taken”): written and flushed before Java sends anything; the words only then, in memory.
  • What happened (“result”): said in the private folder, never the words; a reply handed is looked for in its app’s next notification, and said “shown” when its words are there as yours (heard).
  • Gone (“removed”): a relayed notification gone from the phone, said in its live lines (replies::went), so that your computers no longer offer its Reply.

And for the lines the listener writes (phonemsgs::note): what each relayed notification offers, in this phone’s live lines (offered).

The phone’s step (phone_step, and before each exchange): each request for this phone decided once by the texts’ rules (replies::verdict), claimed in its private ledger and flushed, then handed to the listener; the listener’s words copied into its outcomes. On a computer: a reply written there (ask), or taken back while it waits (take_back).

Structs§

Sent 🔒
A reply on its way, in the listener’s process, never its words: its key, its notification’s name, its words’ hash (replies::words_hash), its conversation’s key (to let their answer through: replies::note_answered), when it was taken, and whether its words were in the notification already before it went (replies::shown_already: then only a message of yours timed after it says it shown).

Constants§

STATES 🔒
The states the listener may say (replies::Done::state); anything else is “failed”.

Statics§

CHECKED 🔒
Checked and not taken yet: the key and whether its words were shown already (check).
HANDED 🔒
Handed lately, looked for in its app’s next notification (heard) for SHOWN_WITHIN_MS.
TAKEN 🔒
Taken and not said yet.
TRIMMED 🔒
When this device last took its old requests and outcomes out (ms): once a day.

Functions§

answered_here 🔒
What this computer answered lately, for its Porch (replies::Answered): its replies handed or shown within twenty minutes, the numbers it texted then.
answered_lately 🔒
Whether a conversation was answered from a computer within twenty minutes (replies::answered_lately): appnotes::decide lets its messages through at once then, but in a pause.
ask 🔒
A reply, or a Mark as read, written on this computer for a phone’s notification (the Porch’s line): refused here at once for what the phone would refuse anyway (no words, too long), else a request with a key of its own in this device’s file, which the sharing carries, sent now on the lane of the texts to send. Its key, or why not, in words.
before_exchange 🔒
Before each exchange (share.rs), with the part on: on a phone, its step (phone_step); once a day, on every device, the requests and outcomes past their week out (another device’s ten days on: a computer gone for good never takes its own out), and on a phone its private files’ old lines.
check 🔒
The live notification Java found for one due: still the same app, notification and conversation; whether their newer messages crossed it.
decide 🔒
Each request for this phone decided once (replies::verdict), at most replies::STEP_MAX a step, under the ledger’s lock both its processes take: every decision of the step written in the ledger together and flushed once, the claims among them before the listener can see one, then handed over in the private file it watches (replies::add_due); the others said. Each request is decided once; one decided and not said (its word could not be written) is said at the next step (settle). Whether an outcome was written.
fill 🔒
The Porch’s lines’ answers on a computer with the part on (replies::answer_of): what each phone says of its notifications, this computer’s own requests and every phone’s outcomes, the texts this computer wrote; a line whose Mark as read was handed is seen, here and on every device, and leaves the Porch (decision 13).
heard 🔒
A reply handed lately looked for in its app’s notification posted now (appnotes::decide, in the listener’s process): its words there as yours, it is said “shown”. Whether that was said (a step soon).
listener 🔒
The listener’s question (AppNotes.nativeReply): its verb and its JSON, a JSON answer.
now_ms 🔒
offered 🔒
What a relayed notification offers a reply from your computers, said in this phone’s live lines when it changed (replies::offer): written with its lines (phonemsgs::note). Whether a line was written.
own_live 🔒
This phone’s own live lines (replies::LIVE), while the part “Messages from your phone” is on here; none elsewhere.
phone 🔒
Whether this device is a phone whose listener sends replies; SIOUL_PHONE_MESSAGES makes a computer’s step run too, to look at it.
phone_step 🔒
The phone’s step for replies, after an exchange that may have brought requests (steps.rs, as texts’): decided, claimed and handed to the listener; what the listener did said in this phone’s outcomes. Whether an outcome was written (to share now).
relayed 🔒
A line relayed for your computers (phonemsgs::note): the replies’ ledger’s mark made now when there is none (replies::mark_ledger), so that a reply to it is never written before the mark.
remember_reads 🔒
The marks moved past what this step is done with (replies::moved_marks): each line decided now, by the ledger, or another phone’s.
removed 🔒
A relayed notification gone from the phone, said in its live lines; nothing for one never relayed. Whether a line was written.
result 🔒
What became of one, as Java says it, written in the private folder; one handed is looked for in its app’s next notification (heard).
seal 🔒
The replies’ seal at rest, from the sharing key; none where sharing is not set up here.
settle 🔒
What the listener did said in this phone’s outcomes, each state once; a claim it never took within two minutes said “late”, one it took with no word after “doubt” (replies::settle); each claim ended so written in the ledger; and a decision the ledger holds without its word (one that could not be written at its step), said now (replies::ends_of). Whether an outcome was written.
sharing 🔒
This device’s name, the sharing folder and its key, while the part “Messages from your phone” is on here; none otherwise.
sioul_replies_listener⚠
listener, for Java (android/main.cpp, AppNotes.nativeReply); a panic answers “null”, and nothing is sent. Given back to sioul_string_free.
step 🔒
phone_step‘s work: the requests under every root (the records’ copy, the sharing folder’s small files, the copy fetched from the server), from the devices the sharing counts now (asked only when one is for this phone).
take_back 🔒
A request taken back while it waits for the phone (Take back): a “cancel” of its key from this device, which the phone files as taken back unless it claimed it already (its outcome then says what became of it).
taken 🔒
One taken, once: “taken” written and flushed before Java sends it; its words given to Java then, in memory. Late, said so, never sent.
texted 🔒
A text a computer asked for, handed to Android (texts): an answer as a reply is, by a hash of the number (replies::answered_number), so that their next texts come through at once for twenty minutes too.
texted_lately 🔒
Whether one of these numbers (phones::key) was texted from a computer within twenty minutes.