Refresh both AGENTS guides and clarify module purpose, usage, ownership, threading, return values and wire formats in headers. Remove the unused timeout_heap freed_count field and unimplemented getter.
28 lines
1.2 KiB
C
28 lines
1.2 KiB
C
/*
|
|
* chat_headless_control.h — TCP control socket for headless chat CLI
|
|
*
|
|
* JSON line protocol:
|
|
* Request: {"id":N,"cmd":"<command>",...params}
|
|
* Response: {"id":N,"ok":true,"data":{...}} | {"id":N,"ok":false,"error":"..."}
|
|
* Event: {"event":"<type>",...}
|
|
*
|
|
* Команды каналов, DM, звонков/рации и настроек — в tools/chatcli_commands.txt;
|
|
* диспетчер реализации — chat_headless_control.c. Аудио PCM использует отдельные call/radio_headless сокеты.
|
|
* init регистрирует listener и события chat_event, destroy закрывает клиентов и снимает подписку.
|
|
* Все вызовы и команды исполняются в uasync-потоке экземпляра.
|
|
*/
|
|
#ifndef CHAT_HEADLESS_CONTROL_H
|
|
#define CHAT_HEADLESS_CONTROL_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
struct UASYNC;
|
|
struct UTUN_INSTANCE;
|
|
|
|
int chat_headless_control_init(struct UASYNC* ua, struct UTUN_INSTANCE* inst,
|
|
const char* bind_ip, int port);
|
|
void chat_headless_control_destroy(struct UTUN_INSTANCE* inst);
|
|
|
|
#endif /* CHAT_HEADLESS_CONTROL_H */
|