chiark / gitweb /
*** empty log message ***
[sympathy.git] / apps / clients.h
1 /*
2  * clients.h:
3  *
4  * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
5  * All rights reserved.
6  *
7  */
8
9 /*
10  * $Id$
11  */
12
13 /*
14  * $Log$
15  * Revision 1.5  2008/02/14 10:34:47  james
16  * *** empty log message ***
17  *
18  * Revision 1.4  2008/02/14 10:34:30  james
19  * *** empty log message ***
20  *
21  * Revision 1.3  2008/02/14 02:46:44  james
22  * *** empty log message ***
23  *
24  * Revision 1.2  2008/02/14 00:57:58  james
25  * *** empty log message ***
26  *
27  * Revision 1.1  2008/02/13 18:05:06  james
28  * *** empty log message ***
29  *
30  */
31
32 #ifndef __CLIENTS_H__
33 #define __CLIENTS_H__
34
35 typedef struct Client_struct
36 {
37   struct Client_struct *next;
38   Socket *s;
39   int dead;
40 } Client;
41
42 typedef struct
43 {
44   Client *head;
45   int n;
46 } Clients;
47
48
49 /* clients.c */
50 extern void client_free (Client * c);
51 extern Client *clients_new_client (Clients * cs, Socket * s, Context * ctx);
52 extern void clients_reap (Clients * cs);
53 extern Clients *clients_new (void);
54 extern void clients_pre_select (Clients * cs, fd_set * rfds, fd_set * wfds);
55 extern void clients_post_select (Clients * cs, Context * ctx, fd_set * rfds,
56                                  fd_set * wfds);
57 extern void clients_shutdown (Clients * cs);
58
59 extern int send_output (Clients * cs, void *buf, int len);
60 extern int send_status (Clients * cs, char *msg);
61 extern void send_history (History * h, Client * c);
62 extern void send_vt102 (VT102 * v, Client * c);
63
64 #endif