1. Use <stdbool.h> if it is available but keep a compatibility shim in
shared/defines.h in case it is not.
2. Unbreak the circular header dependencies (mostly):
2a. client.c and client.h may NOT depend on 'struct Menu'. Use a void pointer
and casts instead.
2b. Separate the data type definitions in client.h and screen.h from
function prototypes which may require other data structures. This makes
header dependencies much more easy to maintain. Usually the data types
should have been moved to their own files but I (mmdolze) chose to
separate them using different header guards.
2c. Remove many now unused header includes.
Apply (old BSD-) style on menuscreens.c.
35 lines
856 B
C
35 lines
856 B
C
/** \file server/clients.h
|
|
* Manage the list of clients that are connected.
|
|
*/
|
|
|
|
/* 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, Selene Scriven
|
|
*/
|
|
|
|
#ifndef CLIENTS_H
|
|
#define CLIENTS_H
|
|
|
|
#include "client.h"
|
|
|
|
/* Initialize and kill client list...*/
|
|
int clients_init(void);
|
|
int clients_shutdown(void);
|
|
|
|
/* Add/remove clients (return NULL for error) */
|
|
Client *clients_add_client(Client *c);
|
|
Client *clients_remove_client(Client *c, Direction whereto);
|
|
|
|
/* List functions */
|
|
Client *clients_getfirst(void);
|
|
Client *clients_getnext(void);
|
|
int clients_client_count(void);
|
|
|
|
/* Search for a client with a particular filedescriptor...*/
|
|
Client * clients_find_client_by_sock(int sock);
|
|
|
|
#endif
|