Table of Contents

Namespace EchoHub.Client.Services

Classes

ApiClient
AsyncRunner

Eliminates repeated Task.Run/try/catch/app.Invoke(ShowError) boilerplate. Runs async work on a background thread and routes exceptions to the UI.

AudioPlaybackService
BackupInfo
ChannelPasswordRequiredException

Thrown when joining a channel fails because a password is required or incorrect. The UI catches this to prompt the user and retry.

ClientEncryptionService

Client-side encryption service. Uses the same AES-256-GCM format as the server so messages are encrypted end-to-end between client and server.

ClipboardFiles

Reads file paths that live on the OS clipboard as a file list (e.g. after copying a file in Explorer/Finder/Nautilus), which terminals do not paste as text. Lets Ctrl+V attach a copied file directly instead of requiring the user to paste a raw path.

ClipboardImage

Reads raw image data from the OS clipboard (e.g. an image copied from a browser, or a Win+Shift+S screenshot), which terminals cannot paste as text. Always returns PNG bytes: clipboard PNG data is passed through, clipboard bitmaps (CF_DIB) are re-encoded.

EchoHubConnection
FolderPickResult
JoinOutcome

Result of joining a channel: decrypted history plus, for end-to-end encrypted channels, the key envelope needed to unlock the room content key.

NativeFolderPicker

Opens the OS-native folder chooser (Windows Explorer, macOS Finder, Linux GTK/KDE) by shelling out, so the TUI doesn't need a GUI toolkit reference. Returns Unavailable when no native dialog can run, so callers can fall back to a configured path.

NotificationSoundService
OutgoingAttachment

One file to upload as part of a message. For end-to-end encrypted channels the stream is already ciphertext, DeclaredKind is set (image/audio/file), and EncryptedPreview holds the room-encrypted ASCII art for images. For normal channels only Stream and FileName are set.

PathSetup

Ensures the application's directory is on the system PATH so users can run 'echohub' from any terminal session.

RoomKeyProtector

Encrypts cached room content keys at rest so the client config never holds them as plain base64. Windows uses DPAPI (current-user scope, format prefix "dp1:"). On other platforms the keys are AES-GCM encrypted with a per-user master key file stored next to the config with 0600 permissions (prefix "k1:") — without an OS keychain that is file-permission-level protection, not zero-knowledge: anyone who can read both the config and the key file can recover the room keys. Values with no recognized prefix are legacy plain-base64 keys from older clients; they load once and are re-encrypted. The room passphrase itself is never stored in any form.

RoomKeyStore

Holds room content keys for end-to-end encrypted channels: in-memory for the active session, persisted per-server in the client config (like saved sessions) so users don't retype the passphrase every launch. Keys never leave this machine and are encrypted at rest by RoomKeyProtector. Also tracks which channels are known to be end-to-end encrypted, so senders can refuse to emit plaintext into a room whose key isn't cached yet.

RoomLockedException

Thrown when sending into an end-to-end encrypted channel whose room key isn't cached: without the key the message would leave the client as plaintext, which must never happen.

UpdateBackupService

Manages pre-update backups and rollback restoration for the auto-updater. Backup location: ~/.echohub/update-backup/

UpdateChecker

Enums

PickerOutcome