3 * This file is part of LCDd, the lcdproc server.
5 * This file is released under the GNU General Public License. Refer to the
6 * COPYING file distributed with this package.
8 * Copyright (c) 1999, William Ferrell, Scott Scriven
11 * Defines all the client data and actions.
16 /* These headers are placed here on purpose ! (circular references) */
21 #include "shared/LL.h"
24 #define CLIENT_NAME_SIZE 256
26 typedef struct Client
{
33 /* Messages that the client generated */
36 /* The list of screens */
37 LinkedList
*screenlist
;
39 /* Maybe it has created a menu */
46 /* When a new client connects, set up a new client data struct */
47 Client
*client_create(int sock
);
49 /* Destroys the client data */
50 int client_destroy(Client
*c
);
52 /* Close the socket */
53 void client_close_sock(Client
*c
);
55 /* Add message to the client's queue...*/
56 int client_add_message(Client
*c
, char *message
);
58 /* Get message from queue */
59 char *client_get_message(Client
*c
);
61 /* Find a named screen for the client */
62 Screen
*client_find_screen(Client
*c
, char *id
);
64 int client_add_screen(Client
*c
, Screen
*s
);
66 int client_remove_screen(Client
*c
, Screen
*s
);
68 int client_screen_count(Client
*c
);