2001-12-27 23:30:36 +00:00
|
|
|
/*
|
|
|
|
|
* client.h
|
|
|
|
|
* This file is part of LCDd, the lcdproc server.
|
|
|
|
|
*
|
|
|
|
|
* This file is released under the GNU General Public License. Refer to the
|
|
|
|
|
* COPYING file distributed with this package.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 1999, William Ferrell, Scott Scriven
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
1999-12-09 23:15:14 +00:00
|
|
|
#ifndef CLIENTS_H
|
|
|
|
|
#define CLIENTS_H
|
|
|
|
|
|
2002-04-26 00:00:31 +00:00
|
|
|
#include "client.h"
|
2001-05-25 03:14:27 +00:00
|
|
|
#include "shared/LL.h"
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2002-04-26 00:00:31 +00:00
|
|
|
/* extern LinkedList *clientlist; Not needed outside ? */
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2001-12-30 00:15:25 +00:00
|
|
|
/* Initialize and kill client list...*/
|
2002-04-26 00:00:31 +00:00
|
|
|
int clients_init ();
|
|
|
|
|
int clients_shutdown ();
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2002-04-26 00:00:31 +00:00
|
|
|
/* Add/remove clients (return -1 for error) */
|
|
|
|
|
int clients_add_client (Client *c);
|
|
|
|
|
int clients_remove_client (Client *c);
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2002-04-26 00:00:31 +00:00
|
|
|
/* List functions */
|
|
|
|
|
Client * clients_getfirst ();
|
|
|
|
|
Client * clients_getnext ();
|
|
|
|
|
int clients_client_count ();
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2001-12-30 00:15:25 +00:00
|
|
|
/* Search for a client with a particular filedescriptor...*/
|
2002-04-26 00:00:31 +00:00
|
|
|
Client * clients_find_client_by_sock (int sock);
|
1999-12-09 23:15:14 +00:00
|
|
|
|
|
|
|
|
#endif
|