ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
actions.c File Reference

Action function stubs for WASM (not needed for mirror mode) More...

Go to the source code of this file.

Functions

void action_completions (const char *shell_name, const char *output_path)
 Generate shell completions and output to stdout or file.
 
void action_list_webcams (void)
 List available webcam devices and exit.
 
void action_list_microphones (void)
 List available microphone devices and exit.
 
void action_list_speakers (void)
 List available speaker devices and exit.
 
void action_create_config (const char *path)
 Create default configuration file and exit.
 
void action_create_manpage (const char *path)
 Generate man page template from options builder.
 
void actions_execute_deferred (void)
 Execute the deferred action (if any)
 
void action_show_capabilities (void)
 Show terminal capabilities and exit.
 
void action_show_capabilities_immediate (void)
 Execute show capabilities immediately (for binary-level execution)
 
void action_check_update (void)
 Check for updates and display results.
 
void action_check_update_immediate (void)
 Execute update check immediately (for binary-level execution)
 
asciichat_error_t platform_enable_keepawake (void)
 Enable system sleep prevention (keepawake mode)
 
void platform_disable_keepawake (void)
 Disable system sleep prevention (allow OS to sleep)
 
keyboard_line_edit_result_t keyboard_read_line_interactive (keyboard_line_edit_opts_t *opts)
 Process one keystroke for interactive line editing.
 
keyboard_key_t keyboard_read_nonblocking (void)
 Read next keyboard input without blocking.
 
void keyboard_destroy (void)
 Cleanup keyboard input system and restore terminal.
 

Detailed Description

Action function stubs for WASM (not needed for mirror mode)

Definition in file platform/wasm/stubs/actions.c.

Function Documentation

◆ action_check_update()

void action_check_update ( void  )

Check for updates and display results.

Performs update check against GitHub releases API and displays results. Exits with code 0 on success, 1 on error.

Definition at line 52 of file platform/wasm/stubs/actions.c.

52 {
53 // No-op - update checking not supported in WASM
54}

◆ action_check_update_immediate()

void action_check_update_immediate ( void  )

Execute update check immediately (for binary-level execution)

Performs immediate update check and exits. Used when –check-update is specified before mode detection. Exits with code 0 on success, 1 on error.

Execute update check immediately (for binary-level execution)

Definition at line 56 of file platform/wasm/stubs/actions.c.

56 {
57 // No-op - update checking not supported in WASM
58}

◆ action_completions()

void action_completions ( const char *  shell_name,
const char *  output_path 
)

Generate shell completions and output to stdout or file.

Generates shell completion script for the specified shell (bash, fish, zsh, powershell). Output is dynamically generated from the options registry, ensuring completions are always in sync with current options. Outputs to stdout by default, or to specified file path if provided. Prompts for overwrite confirmation if file already exists. Exits with code 0 on success, 1 on error.

Parameters
shell_nameShell name: "bash", "fish", "zsh", or "powershell"
output_pathOptional file path to write completions to. NULL or empty string = stdout.

Definition at line 12 of file platform/wasm/stubs/actions.c.

12 {
13 (void)shell_name;
14 (void)output_path;
15 // No-op - shell completions not supported in WASM
16}

◆ action_create_config()

void action_create_config ( const char *  output_path)

Create default configuration file and exit.

Creates a default configuration file. Outputs to stdout by default, or to specified file path if provided. Prompts for overwrite confirmation if file already exists. Exits with code 0 on success, 1 on error.

Parameters
output_pathOptional file path to write config to. NULL or empty string = stdout.

Definition at line 30 of file platform/wasm/stubs/actions.c.

30 {
31 (void)path;
32 // No-op - config file creation not supported in WASM
33}

◆ action_create_manpage()

void action_create_manpage ( const char *  output_path)

Generate man page template from options builder.

Generates a merged man page template preserving manual content. Outputs to stdout by default, or to specified file path if provided. Prompts for overwrite confirmation if file already exists. Exits with code 0 on success, 1 on error.

Parameters
output_pathOptional file path to write man page to. NULL or empty string = stdout.

Definition at line 35 of file platform/wasm/stubs/actions.c.

35 {
36 (void)path;
37 // No-op - man page creation not supported in WASM
38}

◆ action_list_microphones()

void action_list_microphones ( void  )

List available microphone devices and exit.

Enumerates all audio input devices and prints them to stdout. Exits with code 0 on success, 1 on error.

Definition at line 22 of file platform/wasm/stubs/actions.c.

22 {
23 // No-op - microphone listing not supported in WASM mirror mode
24}

◆ action_list_speakers()

void action_list_speakers ( void  )

List available speaker devices and exit.

Enumerates all audio output devices and prints them to stdout. Exits with code 0 on success, 1 on error.

Definition at line 26 of file platform/wasm/stubs/actions.c.

26 {
27 // No-op - speaker listing not supported in WASM mirror mode
28}

◆ action_list_webcams()

void action_list_webcams ( void  )

List available webcam devices and exit.

Enumerates all webcam devices and prints them to stdout. Exits with code 0 on success, 1 on error.

Definition at line 18 of file platform/wasm/stubs/actions.c.

18 {
19 // No-op - webcam listing not supported in WASM mirror mode
20}

◆ action_show_capabilities()

void action_show_capabilities ( void  )

Show terminal capabilities and exit.

Detects and displays terminal color support, UTF-8 support, dimensions, and terminal program name. Exits with code 0.

Note: This action is deferred until after all options are parsed and dimensions are calculated, so that –width and –height flags are properly reflected in the output.

Definition at line 44 of file platform/wasm/stubs/actions.c.

44 {
45 // No-op - capabilities not shown in WASM
46}

◆ action_show_capabilities_immediate()

void action_show_capabilities_immediate ( void  )

Execute show capabilities immediately (for binary-level execution)

Shows terminal capabilities before full options parsing. Uses detected terminal size (doesn't respect –width/–height). Exits with code 0.

Execute show capabilities immediately (for binary-level execution)

Definition at line 48 of file platform/wasm/stubs/actions.c.

48 {
49 // No-op - capabilities not shown in WASM
50}

◆ actions_execute_deferred()

void actions_execute_deferred ( void  )

Execute the deferred action (if any)

This function should be called during STAGE 8 of options_init() after all options are fully parsed and dimensions are calculated.

Definition at line 40 of file platform/wasm/stubs/actions.c.

40 {
41 // No-op - no deferred actions in WASM mirror mode
42}