ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
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
7#include <options/runtime.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#define ACIP_SETTINGS_SCHEMA 1
16#define ACIP_SETTINGS_HEADER_SIZE 20
17#define ACIP_SETTINGS_MAX_SIZE 4116
18
34
44
47terminal_color_mode_t acip_render_settings_normalize_color_mode(terminal_color_mode_t mode);
50asciichat_error_t acip_settings_decode(const void *payload, size_t length, acip_settings_header_t *header, const char **json, size_t *json_length);
51asciichat_error_t acip_settings_encode(const acip_settings_header_t *header, const char *json, uint8_t *buffer, size_t capacity, size_t *length);
53asciichat_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);
54asciichat_error_t acip_settings_send(acip_transport_t *transport, const options_t *values, uint32_t request, uint32_t expected_revision);
55
56#ifdef __cplusplus
57}
58#endif
unsigned short uint16_t
unsigned int uint32_t
unsigned char uint8_t
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:48
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:508
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:1097