Skip to main content

Module channel_settings

Module channel_settings 

Expand description

An app’s settings when the shell keeps them: its view of the session’s records, reached over the app’s collaboration channel.

A sandboxed app has no settings document of its own to read; the launcher gives it the shell’s collaboration service instead. At launch install makes a ChannelSettings this process’s settings_store::SettingsSource, so every reader — Settings<T>, cx.settings::<T>(), the toolkit’s shared sections — reads the app’s view (its own app_personal / app_device_local entries and the shared sections, see settings_store::app_scope) and writes its entries into the shell’s records. The broker worker fills the view when the primary route joins and keeps it current as the records change, here or on another of the person’s devices; each change wakes the app.

A write shows at once and is sent to the shell in the order it was made. While writes are on their way, views from the shell are held back, so a view taken before a write cannot undo it on screen; once the last write is answered, the newest view the shell gave — its answer, or a later change it reported meanwhile — is the one that shows.

Structs§

ChannelSettings
The settings source a launched app reads through its channel.
Unanswered
One sent write until the shell answers it. A write whose worker stops before the answer counts as refused, so views are not held back for it.

Functions§

install
Make the shell’s records, reached through the collaboration channel, the settings of app app_id in this process. Only the first call installs.
installed
The installed channel settings, for the broker worker to serve.

Type Aliases§

Outgoing
One write for the shell: the section, the values, and the action that made the change, which the shell keeps with it in the session’s history.