ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
groups.h File Reference

Option group definitions for composable mode presets. More...

Go to the source code of this file.

Macros

#define MODE_SERVER_GROUPS
 Mode group presets.
#define MODE_CLIENT_GROUPS
#define MODE_MIRROR_GROUPS
#define MODE_DISCOVERY_GROUPS
#define MODE_ACDS_GROUPS    (OPT_GROUP_BINARY | OPT_GROUP_NETWORK | OPT_GROUP_CRYPTO | OPT_GROUP_WEBRTC)

Enumerations

enum  option_group_t {
  OPT_GROUP_NONE = 0 , OPT_GROUP_BINARY , OPT_GROUP_TERMINAL = (1 << 1) , OPT_GROUP_NETWORK = (1 << 2) ,
  OPT_GROUP_WEBCAM = (1 << 3) , OPT_GROUP_DISPLAY , OPT_GROUP_AUDIO = (1 << 5) , OPT_GROUP_SNAPSHOT = (1 << 6) ,
  OPT_GROUP_CRYPTO = (1 << 7) , OPT_GROUP_COMPRESSION = (1 << 8) , OPT_GROUP_ACDS = (1 << 9) , OPT_GROUP_MEDIA = (1 << 10) ,
  OPT_GROUP_SERVER , OPT_GROUP_CLIENT , OPT_GROUP_WEBRTC = (1 << 13)
}
 Option group identifiers. More...

Detailed Description

Option group definitions for composable mode presets.

This header defines option groups that allow modes to share common options without duplication. Each group is a collection of related options that can be added to a builder to create mode-specific configurations.

Option Group Architecture

Options are organized into logical groups:

  • BINARY: Options parsed before mode selection (help, version, logging)
  • TERMINAL: Terminal dimension options (width, height)
  • NETWORK: Network connection options (address, port, reconnect)
  • WEBCAM: Video capture options (device, flip, test pattern)
  • DISPLAY: Rendering options (color mode, palette, render mode)
  • AUDIO: Audio streaming options (enable, devices, volume)
  • SNAPSHOT: Single-frame capture options
  • CRYPTO: Encryption and authentication options
  • COMPRESSION: Network compression options
  • ACDS: Discovery service integration options
  • MEDIA: Media file streaming options

Mode Group Composition

Each mode uses a specific combination of groups:

  • Server: BINARY + NETWORK + CRYPTO + COMPRESSION + ACDS
  • Client: BINARY + TERMINAL + NETWORK + WEBCAM + DISPLAY + AUDIO + SNAPSHOT + CRYPTO + COMPRESSION + ACDS + MEDIA
  • Mirror: BINARY + TERMINAL + WEBCAM + DISPLAY + SNAPSHOT + MEDIA
  • Discovery: BINARY + TERMINAL + NETWORK + WEBCAM + DISPLAY + AUDIO + SNAPSHOT + CRYPTO + ACDS + MEDIA
  • ACDS: BINARY + NETWORK + CRYPTO
Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
January 2026

Definition in file groups.h.

Macro Definition Documentation

◆ MODE_ACDS_GROUPS

#define MODE_ACDS_GROUPS    (OPT_GROUP_BINARY | OPT_GROUP_NETWORK | OPT_GROUP_CRYPTO | OPT_GROUP_WEBRTC)

ACDS mode options: discovery service with network and crypto

Definition at line 113 of file groups.h.

113#define MODE_ACDS_GROUPS \
114 (OPT_GROUP_BINARY | OPT_GROUP_NETWORK | OPT_GROUP_CRYPTO | OPT_GROUP_WEBRTC)

◆ MODE_CLIENT_GROUPS

#define MODE_CLIENT_GROUPS
Value:
@ OPT_GROUP_CRYPTO
Encryption and authentication options.
Definition groups.h:67
@ OPT_GROUP_DISPLAY
Display options (color mode, palette, render mode).
Definition groups.h:63
@ OPT_GROUP_CLIENT
Client-specific options (reconnect, server-key).
Definition groups.h:73
@ OPT_GROUP_ACDS
ACDS discovery service options.
Definition groups.h:69
@ OPT_GROUP_BINARY
Binary-level options (help, version, logging).
Definition groups.h:58
@ OPT_GROUP_AUDIO
Audio options (enable, devices, volume).
Definition groups.h:65
@ OPT_GROUP_COMPRESSION
Compression options.
Definition groups.h:68
@ OPT_GROUP_NETWORK
Network options (address, port, reconnect).
Definition groups.h:61
@ OPT_GROUP_SNAPSHOT
Snapshot mode options.
Definition groups.h:66
@ OPT_GROUP_TERMINAL
Terminal dimension options (width, height).
Definition groups.h:60
@ OPT_GROUP_WEBCAM
Webcam options (device, flip, test pattern).
Definition groups.h:62
@ OPT_GROUP_MEDIA
Media file streaming options.
Definition groups.h:70
@ OPT_GROUP_WEBRTC
WebRTC connectivity options (STUN/TURN).
Definition groups.h:75

Client mode options: display, webcam, audio, crypto, ACDS

Definition at line 94 of file groups.h.

94#define MODE_CLIENT_GROUPS \
95 (OPT_GROUP_BINARY | OPT_GROUP_TERMINAL | OPT_GROUP_NETWORK | \
96 OPT_GROUP_WEBCAM | OPT_GROUP_DISPLAY | OPT_GROUP_AUDIO | \
97 OPT_GROUP_SNAPSHOT | OPT_GROUP_CRYPTO | OPT_GROUP_COMPRESSION | \
98 OPT_GROUP_ACDS | OPT_GROUP_MEDIA | OPT_GROUP_CLIENT | OPT_GROUP_WEBRTC)

◆ MODE_DISCOVERY_GROUPS

#define MODE_DISCOVERY_GROUPS
Value:

Discovery mode options: participant that can become host

Definition at line 106 of file groups.h.

106#define MODE_DISCOVERY_GROUPS \
107 (OPT_GROUP_BINARY | OPT_GROUP_TERMINAL | OPT_GROUP_NETWORK | \
108 OPT_GROUP_WEBCAM | OPT_GROUP_DISPLAY | OPT_GROUP_AUDIO | \
109 OPT_GROUP_SNAPSHOT | OPT_GROUP_CRYPTO | OPT_GROUP_COMPRESSION | \
110 OPT_GROUP_ACDS | OPT_GROUP_MEDIA | OPT_GROUP_WEBRTC)

◆ MODE_MIRROR_GROUPS

#define MODE_MIRROR_GROUPS
Value:

Mirror mode options: local webcam preview without networking

Definition at line 101 of file groups.h.

101#define MODE_MIRROR_GROUPS \
102 (OPT_GROUP_BINARY | OPT_GROUP_TERMINAL | OPT_GROUP_WEBCAM | \
103 OPT_GROUP_DISPLAY | OPT_GROUP_SNAPSHOT | OPT_GROUP_MEDIA)