chiark / gitweb /
serialmgr: Look for things in /usr, not /usr/local
[sympathy.git] / apps / clients.h
1 /* 
2  * clients.h:
3  *
4  * Copyright (c) 2008 James McKenzie <sympathy@madingley.org>,
5  * All rights reserved.
6  *
7  */
8
9 /* 
10  * $Id: clients.h,v 1.12 2008/05/09 12:35:57 james Exp $
11  */
12
13 /* 
14  * $Log: clients.h,v $
15  * Revision 1.12  2008/05/09 12:35:57  james
16  * *** empty log message ***
17  *
18  * Revision 1.11  2008/03/11 17:56:04  james
19  * *** empty log message ***
20  *
21  * Revision 1.10  2008/03/11 17:47:24  james
22  * *** empty log message ***
23  *
24  * Revision 1.9  2008/03/10 11:49:32  james
25  * *** empty log message ***
26  *
27  * Revision 1.8  2008/03/07 13:16:02  james
28  * *** empty log message ***
29  *
30  * Revision 1.7  2008/03/03 06:04:42  james
31  * *** empty log message ***
32  *
33  * Revision 1.6  2008/03/02 10:27:24  james
34  * *** empty log message ***
35  *
36  * Revision 1.5  2008/02/14 10:34:47  james
37  * *** empty log message ***
38  *
39  * Revision 1.4  2008/02/14 10:34:30  james
40  * *** empty log message ***
41  *
42  * Revision 1.3  2008/02/14 02:46:44  james
43  * *** empty log message ***
44  *
45  * Revision 1.2  2008/02/14 00:57:58  james
46  * *** empty log message ***
47  *
48  * Revision 1.1  2008/02/13 18:05:06  james
49  * *** empty log message ***
50  *
51  */
52
53 #ifndef __CLIENTS_H__
54 #define __CLIENTS_H__
55
56 typedef struct Client_struct
57 {
58   struct Client_struct *next;
59   int initialized;
60   Socket *s;
61   int dead;
62 } Client;
63
64 typedef struct
65 {
66   Client *head;
67   int n;
68 } Clients;
69
70
71 /* clients.c */
72 extern void client_free (Client * c);
73 extern Client *clients_new_client (Clients * cs, Socket * s, Context * ctx);
74 extern void clients_reap (Clients * cs, Context * ctx);
75 extern Clients *clients_new (void);
76 extern void clients_pre_select (Clients * cs, fd_set * rfds, fd_set * wfds);
77 extern void clients_post_select (Clients * cs, Context * ctx, fd_set * rfds,
78                                  fd_set * wfds);
79 extern void clients_shutdown (Clients * cs, Context * ctx);
80
81 extern int send_output (Clients * cs, void *buf, int len);
82 extern int send_status (Clients * cs, char *msg);
83 extern void send_history (History * h, Client * c);
84 extern void send_vt102 (VT102 * v, Client * c);
85
86 #endif