ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
client_like.h
Go to the documentation of this file.
1
50#pragma once
51
52#include "session/capture.h"
53#include "session/display.h"
55#include "session/render.h"
57#include <stdbool.h>
58
60/* discovery_session is defined in src/discovery/session.h as an opaque type
61 Discovery mode should include that header and cast to/from void * */
62
68
69/* ============================================================================
70 * Callback Types
71 * ============================================================================ */
72
99 void *user_data);
100
101/* ============================================================================
102 * Configuration Structure
103 * ============================================================================ */
104
113 /* ================================================================ */
114 /* Required */
115 /* ================================================================ */
116
119
122
123 /* ================================================================ */
124 /* Networking (NULL for mirror mode) */
125 /* ================================================================ */
126
129
138
139 /* ================================================================ */
140 /* Exit Condition */
141 /* ================================================================ */
142
153 bool (*custom_should_exit)(void *user_data);
154
157
158 /* ================================================================ */
159 /* Reconnection Logic (for client/discovery retry loops) */
160 /* ================================================================ */
161
175
190 bool (*should_reconnect_callback)(asciichat_error_t last_error, int attempt_number, void *user_data);
191
194
203 unsigned int reconnect_delay_ms;
204
205 /* ================================================================ */
206 /* Keyboard Handler */
207 /* ================================================================ */
208
217
218 /* ================================================================ */
219 /* Terminal Behavior */
220 /* ================================================================ */
221
231
232/* ============================================================================
233 * Entry Point
234 * ============================================================================ */
246
259
⚠️‼️ Comprehensive thread-local error context system for ascii-chat
asciichat_error_t session_client_like_run(const session_client_like_config_t *config)
struct session_client_like_config session_client_like_config_t
session_client_like_kind
Definition client_like.h:63
@ SESSION_CLIENT_LIKE_KIND_CLIENT
Definition client_like.h:65
@ SESSION_CLIENT_LIKE_KIND_DISCOVERY
Definition client_like.h:66
@ SESSION_CLIENT_LIKE_KIND_MIRROR
Definition client_like.h:64
enum session_client_like_kind session_client_like_kind_t
asciichat_error_t(* session_client_like_run_fn)(session_capture_ctx_t *capture, session_display_ctx_t *display, void *user_data)
Definition client_like.h:98
bool(*)(void *) session_client_like_get_render_should_exit(void)
📹 Unified media capture abstraction for session-based video sources
Centralized render loop abstraction for all display modes.
asciichat_error_t
Error and exit codes - unified status values (0-255)
Definition error_codes.h:49
void(* session_keyboard_handler_fn)(session_capture_ctx_t *capture, int key, void *user_data)
Keyboard input handler callback type.
terminal_fd_reader_t * session_client_like_get_stdin_reader(void)
Definition client_like.c:93
🎮 Keyboard input handler for interactive session controls
🖥️ Unified terminal display abstraction for session-based rendering
ClangTool/LibTooling compatibility shim for stdbool.h.
#define bool
Definition stdbool.h:61
Internal session capture context structure.
session_client_like_kind_t kind
bool(* should_reconnect_callback)(asciichat_error_t last_error, int attempt_number, void *user_data)
session_keyboard_handler_fn keyboard_handler
unsigned int reconnect_delay_ms
session_client_like_run_fn run_fn
bool(* custom_should_exit)(void *user_data)
Internal session display context structure.