X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=src%2Fivac.h;h=c8ac91960c241989489da8e2f7e024259713859b;hb=b5b0be927dd4400a2edb46efe7aba20331dff547;hp=9fb52632edfc95d069a353208456aa44cfaa761f;hpb=da2c28e700faec39bab322b103fe0298c52fbda7;p=my-code%2Fivac.git diff --git a/src/ivac.h b/src/ivac.h index 9fb5263..c8ac919 100644 --- a/src/ivac.h +++ b/src/ivac.h @@ -7,13 +7,11 @@ #define _GNU_SOURCE #include -/* for ui */ -#include - #include "network.h" #include "event.h" #include "input.h" #include "display.h" +#include "audio.h" /* defines */ #define CHAR_USERNAME 32 @@ -28,6 +26,7 @@ #define IVAC_SEND_NAME 'n' #define IVAC_SEND_G_CAP 'g' #define IVAC_SEND_AV_CAP 'c' +#define IVAC_SEND_QUIT 'q' #define NETWORK (1<<0) @@ -41,6 +40,9 @@ #define IVAC_PROMPT_LEN 3 #define IVAC_CONSOLE_LEN 8 +#define IVAC_ARG_LEN CHAR_USERNAME +#define IVAC_ARG_COUNT 4 + /* variables */ typedef struct s_challenger { char name[CHAR_USERNAME]; @@ -58,11 +60,14 @@ typedef struct s_ivac { t_display display; t_challenger challenger[MAX_CONNECTIONS]; char console[IVAC_CONSOLE_LEN][IVAC_CONSOLE_STRING_LEN]; + t_audio audio; } t_ivac; /* function prototypes */ +int usage(void); int ivac_shutdown(t_ivac *ivac); int ivac_send_info(int channel,t_ivac *ivac); +int ivac_send_quit(int channel,t_ivac *ivac); int ivac_receive_info(int channel,t_ivac *ivac); int ivac_event_cb(t_event *event,void *ptr); int ivac_regular_cb(t_event *event,void *ptr);