ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
include/ascii-chat/network/acip/settings.h
Go to the documentation of this file.
1#pragma once
2
3/* Storage capacities in elements; text buffers include the terminating NUL. */
4#define NETWORK_ACIP_SETTINGS_PALETTE_BUFFER_SIZE 256
5#define NETWORK_ACIP_SETTINGS_LUMINANCE_BUFFER_SIZE 256
6
10
11#define ACIP_SETTINGS_SCHEMA 1
12#define ACIP_SETTINGS_HEADER_SIZE 20
13#define ACIP_SETTINGS_MAX_SIZE 4116
14
28
36
38 const terminal_capabilities_packet_t *packet);
40terminal_color_mode_t acip_render_settings_normalize_color_mode(terminal_color_mode_t mode);
43asciichat_error_t acip_settings_decode(const void *payload, size_t length, acip_settings_header_t *header,
44 const char **json, size_t *json_length);
45asciichat_error_t acip_settings_encode(const acip_settings_header_t *header, const char *json, uint8_t *buffer,
46 size_t capacity, size_t *length);
48asciichat_error_t acip_settings_request(acip_render_settings_t *state, const void *payload, size_t length,
49 uint8_t *reply, size_t capacity, size_t *reply_length);
51 uint32_t expected_revision);
unsigned short uint16_t
Definition common.h:61
unsigned int uint32_t
Definition common.h:62
unsigned char uint8_t
Definition common.h:60
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
struct options_state options_t
Immutable, RCU-published snapshot of the application's runtime configuration.
struct acip_transport acip_transport_t
Forward declaration of ACIP transport.
Definition host.h:506
asciichat_error_t acip_settings_send(acip_transport_t *transport, const options_t *values, uint32_t request, uint32_t expected_revision)
asciichat_error_t acip_render_settings_capabilities(acip_render_settings_t *state, const terminal_capabilities_packet_t *packet)
asciichat_error_t acip_settings_encode(const acip_settings_header_t *header, const char *json, uint8_t *buffer, size_t capacity, size_t *length)
asciichat_error_t acip_render_settings_prepare(acip_render_settings_t *candidate, const options_t *values)
#define NETWORK_ACIP_SETTINGS_PALETTE_BUFFER_SIZE
terminal_color_mode_t acip_render_settings_normalize_color_mode(terminal_color_mode_t mode)
#define NETWORK_ACIP_SETTINGS_LUMINANCE_BUFFER_SIZE
asciichat_error_t acip_settings_request(acip_render_settings_t *state, const void *payload, size_t length, uint8_t *reply, size_t capacity, size_t *reply_length)
asciichat_error_t acip_settings_decode(const void *payload, size_t length, acip_settings_header_t *header, const char **json, size_t *json_length)
void acip_render_settings_options(const acip_render_settings_t *state, options_t *values)
Transport abstraction layer for ACIP protocol.
acip render settings keeps the values that move through the subsystem: caps, width,...
acip settings header keeps the values that move through the subsystem: schema, request,...
Terminal capabilities packet structure (Packet Type 5).
Definition packet.h:1074