From 2211f324782cdc617b4b5ecd071178e372539fe4 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 26 Mar 2025 14:29:40 +0000 Subject: refactor: rename crates and move client logic to separate crate `filament` --- lampada/scratch | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 lampada/scratch (limited to 'lampada/scratch') diff --git a/lampada/scratch b/lampada/scratch new file mode 100644 index 0000000..e013ded --- /dev/null +++ b/lampada/scratch @@ -0,0 +1,90 @@ +macaw/céu +canopy/sol + +# logic: + +- db +- pending iqs +- ui update sender + + ## logic methods + + - handle_offline: called by lamp + - handle_online: called by lamp + - handle_stanza: called by read thread + + - handle_connect: called by lamp + - handle_disconnect: called by lamp + + - handle_error?: called by lamp handle threads and read thread for error logging + - handle_stream_error: called by supervisor when stream needs to be reset + + +# lamp: + +- login jid (bare or full) +- password provider +- lamp command receiver +- connected session state(connected, supervisorhandle to disconnect current connected session) +- connected state (if intended to be connected or not, for retrying reconnection every minute or something) +- on_crash for connection supervisor +- internal logic struct which has methods to handle logic commands + +# connected: + +- writehandle +- current full jid for connected session + +# supervisor: + +- control_recv +- read_thread_crash +- write_thread_crash +- read_control_handle +- write_control_handle +- on_crash +- connected +- password +- logic + +# read: + +must be passed around when crash +- supervisor_control +- tasks + +can be cloned from supervisor +- connected . +- logic . + +can be recreated by supervisor +- stream +- disconnecting +- disconnect_timedout +- on_crash +- control_recv + +# write: + +must be passed around when crash +- stanza_recv + +can be recreated by supervisor +- stream +- on_crash +- control_recv + + +message types: + +command: + +- getroster +- send message +- etc. + +lamp commands: + +- connect +- disconnect +- command(command) -- cgit