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