File: clients.h

package info (click to toggle)
lcdproc 0.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,352 kB
  • sloc: ansic: 53,582; sh: 4,288; perl: 681; makefile: 476
file content (37 lines) | stat: -rw-r--r-- 940 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/** \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"
#include "shared/LL.h"

/* extern LinkedList *clientlist;   Not needed outside ? */

/* 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