2008-11-30 22:31:20 +00:00
|
|
|
/** \file server/clients.h
|
2008-11-30 14:22:01 +00:00
|
|
|
* Manage the list of clients that are connected.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* This file is part of LCDd, the lcdproc server.
|
2001-12-27 23:30:36 +00:00
|
|
|
*
|
2008-11-30 22:31:20 +00:00
|
|
|
* This file is released under the GNU General Public License.
|
|
|
|
|
* Refer to the COPYING file distributed with this package.
|
2001-12-27 23:30:36 +00:00
|
|
|
*
|
2011-01-05 23:34:37 +00:00
|
|
|
* Copyright (c) 1999, William Ferrell, Selene Scriven
|
2001-12-27 23:30:36 +00:00
|
|
|
*/
|
|
|
|
|
|
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...*/
|
2007-04-02 21:29:53 +00:00
|
|
|
int clients_init(void);
|
|
|
|
|
int clients_shutdown(void);
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2008-11-30 14:22:01 +00:00
|
|
|
/* Add/remove clients (return NULL for error) */
|
|
|
|
|
Client *clients_add_client(Client *c);
|
2008-11-30 15:30:28 +00:00
|
|
|
Client *clients_remove_client(Client *c, Direction whereto);
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2002-04-26 00:00:31 +00:00
|
|
|
/* List functions */
|
2007-04-02 21:29:53 +00:00
|
|
|
Client *clients_getfirst(void);
|
|
|
|
|
Client *clients_getnext(void);
|
|
|
|
|
int clients_client_count(void);
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2001-12-30 00:15:25 +00:00
|
|
|
/* Search for a client with a particular filedescriptor...*/
|
2007-04-02 21:29:53 +00:00
|
|
|
Client * clients_find_client_by_sock(int sock);
|
1999-12-09 23:15:14 +00:00
|
|
|
|
|
|
|
|
#endif
|