more abstraction in network.* and input.*, first display stuff in ivac.*
[my-code/ivac.git] / src / network.h
index 274811e..31ca335 100644 (file)
 #define C_ESTABL (1<<3)
 #define C_HANGUP (1<<4)
 
-#define CHAR_N_UNAME 32
-
 #define SEND_N_MAX 128
-#define SEND_N_NAME 'n'
-#define SEND_N_G_CAP 'g'
-#define SEND_N_AV_CAP 'c'
 
 #define N_SUCCESS 1
 #define N_ERROR -1
 /* net specific variables */
 typedef struct s_connection {
   int fd;
-  char name[CHAR_N_UNAME];
   char ip[IP_DIGITS];
   in_port_t port;
   unsigned char status;
-  unsigned char cap; /* general capabilities */
-  unsigned short avcap; /* audio/video capabilities */
+  unsigned short cap; /* capabilities */
 } t_connection;
 
 typedef struct s_net {
   int l_fd; /* listen file descriptor */
   in_port_t l_port;
-  unsigned char cap;
-  unsigned short avcap;
+  unsigned short cap;
   /* limited connections by now -- replaced by list management later */
   int c_count;
   t_connection connection[MAX_CONNECTIONS];
@@ -67,7 +59,5 @@ int network_manage_connection(t_net *net);
 int network_manage_incoming(t_net *net);
 int network_send(int fd,unsigned char *data,int datasize);
 int network_receive(int fd,unsigned char *data,int datasize);
-int send_info(int channel,t_net *net,char *name);
-int receive_info(int channel,t_net *net);
 
 #endif