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.6  2008/03/02 10:27:24  james
16  * *** empty log message ***
17  *
18  * Revision 1.5  2008/02/14 10:34:47  james
19  * *** empty log message ***
20  *
21  * Revision 1.4  2008/02/14 10:34:30  james
22  * *** empty log message ***
23  *
24  * Revision 1.3  2008/02/14 02:46:44  james
25  * *** empty log message ***
26  *
27  * Revision 1.2  2008/02/14 00:57:58  james
28  * *** empty log message ***
29  *
30  * Revision 1.1  2008/02/13 18:05:06  james
31  * *** empty log message ***
32  *
33  */
34
35 #ifndef __CLIENTS_H__
36 #define __CLIENTS_H__
37
38 typedef struct Client_struct {
39   struct Client_struct *next;
40   Socket *s;
41   int dead;
42 } Client;
43
44 typedef struct {
45   Client *head;
46   int n;
47 } Clients;
48
49
50 /* clients.c */
51 extern void client_free (Client * c);
52 extern Client *clients_new_client (Clients * cs, Socket * s, Context * ctx);
53 extern void clients_reap (Clients * cs);
54 extern Clients *clients_new (void);
55 extern void clients_pre_select (Clients * cs, fd_set * rfds, fd_set * wfds);
56 extern void clients_post_select (Clients * cs, Context * ctx, fd_set * rfds,
57                                  fd_set * wfds);
58 extern void clients_shutdown (Clients * cs);
59
60 extern int send_output (Clients * cs, void *buf, int len);
61 extern int send_status (Clients * cs, char *msg);
62 extern void send_history (History * h, Client * c);
63 extern void send_vt102 (VT102 * v, Client * c);
64
65 #endif