feat: Go转C

This commit is contained in:
2026-03-30 13:52:56 +08:00
parent fd0270084b
commit d5ef84200e
46 changed files with 14830 additions and 1 deletions

30
c/include/interactive.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef OMNI_INTERACTIVE_H
#define OMNI_INTERACTIVE_H
#include "omni_common.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum interactive_command_type {
INTERACTIVE_CMD_HELP = 0,
INTERACTIVE_CMD_QUIT = 1,
INTERACTIVE_CMD_TEXT = 2,
INTERACTIVE_CMD_FILE = 3
} interactive_command_type_t;
typedef struct interactive_command {
interactive_command_type_t type;
char to[OMNI_MAX_PEER_ID];
char value[1024];
} interactive_command_t;
int interactive_parse_command(const char *line, interactive_command_t *command, char *err, size_t err_len);
void interactive_print_help(FILE *out, const char *transport_name);
#ifdef __cplusplus
}
#endif
#endif