1 /* ivac.h -- main ivac header file */
19 #define CHAR_USERNAME 32
23 #define IVAC_LISTEN_PORT 1025
26 #define IVAC_S_USEC 500
28 #define IVAC_SEND_NAME 'n'
29 #define IVAC_SEND_G_CAP 'g'
30 #define IVAC_SEND_AV_CAP 'c'
32 #define NETWORK (1<<0)
38 #define IVAC_CONSOLE_STRING_LEN 64
40 #define IVAC_HEAD_LEN 3
41 #define IVAC_PROMPT_LEN 3
42 #define IVAC_CONSOLE_LEN 8
44 #define IVAC_ARG_LEN CHAR_USERNAME
45 #define IVAC_ARG_COUNT 4
48 typedef struct s_challenger {
49 char name[CHAR_USERNAME];
51 unsigned short av_cap;
54 typedef struct s_ivac {
55 char username[CHAR_USERNAME];
57 unsigned short av_cap;
62 t_challenger challenger[MAX_CONNECTIONS];
63 char console[IVAC_CONSOLE_LEN][IVAC_CONSOLE_STRING_LEN];
66 /* function prototypes */
67 int ivac_shutdown(t_ivac *ivac);
68 int ivac_send_info(int channel,t_ivac *ivac);
69 int ivac_receive_info(int channel,t_ivac *ivac);
70 int ivac_event_cb(t_event *event,void *ptr);
71 int ivac_regular_cb(t_event *event,void *ptr);
72 int ivac_parse_command(t_input *input,void *ptr);
73 int ivac_display_head(t_display *display);
74 int ivac_display_box(t_display *display);
75 int ivac_display_box_content(t_ivac *ivac);
76 int ivac_display_console(t_display *display);
77 int ivac_display_console_content(t_ivac *ivac);
78 int ivac_display_prompt(t_display *display);
79 int ivac_display_prompt_content(t_ivac *ivac);
80 int ivac_display(t_display *display);
81 int ivac_display_content(t_ivac *ivac);
82 int ivac_add_to_monitor(t_ivac *ivac,char *msg);