fixed input system (callback added), more ivac tests
[my-code/ivac.git] / src / ivac.h
index 9e171bd..9cbced9 100644 (file)
@@ -7,15 +7,32 @@
 #define _GNU_SOURCE
 #include <stdio.h>
 
+#include "network.h"
+#include "event.h"
+#include "input.h"
+
 /* defines */
 #define CHAR_USERNAME 32
+#define ERROR -1
+#define SUCCESS 1
+
+#define IVAC_LISTEN_PORT 1025
+
+#define IVAC_S_SEC 2
+#define IVAC_S_USEC 500
 
 /* variables */
 
-typedef s_ivac {
+typedef struct s_ivac {
   char username[CHAR_USERNAME];
   t_net net;
-  
+  t_event event;
+  t_input input;
 } t_ivac;
 
+/* function prototypes */
+int ivac_event_cb(t_event *event,void *ptr);
+int ivac_regular_cb(t_event *event,void *ptr);
+int ivac_display(t_input *input,void *ptr);
+
 #endif