//! The Mac SHELL — what an embedder of the server has to decide. //! //! Everything here was the deleted Electron app's `main/*.ts`: the env //! file, the address a phone reaches this Mac on, who the server admits, which //! database the window shows, the log the window draws, the order things stop //! in, and the controller that ties them together. //! //! It lives in `cotton-ffi` rather than in `cotton-client` because every one of //! these is about EMBEDDING A SERVER, and `cotton-client` is a client — Android //! will link that crate alone and must not pull a server in behind it. //! //! Nothing here draws. The words a menu bar shows are Swift's, over the values //! these modules answer. //! **Only `client`, `file` and `log_ring` are on the client build** (design P2). //! Everything else here is about EMBEDDING A SERVER — the env //! file, the address a phone reaches this Mac on, who the server admits, the //! relay, and the served file offered to the client half — and //! an iPhone is a client, never a server //! ([eventually-cotton-is-a-mac-or-android-app-acting-as-a-self-hoste]). The //! three that stay are the three that were never about the server: the client //! half (a replica, an outbox and a sync loop, which the phone has always had), //! the shape of a file a read runs over, and the ring buffer that holds what //! was said before anyone was listening. pub mod client; pub mod swap; pub mod scope; /// What the app says of itself for the device's reported state. pub mod diagnostics; pub(crate) mod refused_copies; pub(crate) mod database_files; pub mod file; mod held; pub mod feed_index; /// `sync.status`'s file facts (`cotton_core::rules::sync_status`). pub mod sync_status; // "Send a report": the redacted state, logs and registry files as a document. pub mod report; pub mod log_ring;