~benklop/+junk/lcdproc

« back to all changes in this revision

Viewing changes to server/client.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Yoder (Launchpad)
  • Date: 2009-10-11 18:21:07 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20091011182107-twnkyhv1f63lzq3o
Tags: 0.5.3-0ubuntu1
* New upstream version 0.5.3 (LP: #432669)
* Merge source patches from 0.5.2-3 
  - LCDd.conf: Change driver path
  - clients/lcdproc/machine_Linux.c: Change ifdef
* Add clients/examples/lcdident.pl to debian files 
* Updated debian/rules:
  - Cleaned up whitespace
  - Changed config.guess/config.sub lines 
* Added a delay to server/drivers/imonlcd.c for slower models
* Added dependency on autotools-dev to fix launchpad build issue 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * client.h
3
 
 * This file is part of LCDd, the lcdproc server.
 
1
/** \file server/client.h
 
2
 * Defines all the client data and actions.
 
3
 */
 
4
 
 
5
/* This file is part of LCDd, the lcdproc server.
4
6
 *
5
 
 * This file is released under the GNU General Public License. Refer to the
6
 
 * COPYING file distributed with this package.
 
7
 * This file is released under the GNU General Public License.
 
8
 * Refer to the COPYING file distributed with this package.
7
9
 *
8
10
 * Copyright (c) 1999, William Ferrell, Scott Scriven
9
11
 *               2002, Joris Robijn
10
 
 *
11
 
 * Defines all the client data and actions.
12
12
 */
13
13
 
14
14
#include "menu.h"
23
23
 
24
24
#define CLIENT_NAME_SIZE 256
25
25
 
 
26
/** Possible states of a client. */
 
27
typedef enum _clientstate {
 
28
        NEW,                    /**< Client did not yet send \c hello. */
 
29
        ACTIVE,                 /**< Client sent \c hello, but not yet \c bye. */
 
30
        GONE                    /**< Client sent \c bye. */
 
31
} ClientState;
 
32
 
 
33
 
 
34
/** The structure representing a client in the server. */
26
35
typedef struct Client {
27
36
        char *name;
28
 
        int ack;
 
37
        ClientState state;
29
38
        int sock;
30
39
        int backlight;
31
40
        int heartbeat;
32
41
 
33
 
        /* Messages that the client generated */
34
 
        LinkedList *messages;
35
 
 
36
 
        /* The list of screens */
37
 
        LinkedList *screenlist;
38
 
 
39
 
        /* Maybe it has created a menu */
40
 
        Menu *menu;
41
 
 
 
42
        LinkedList *messages;           /**< Messages that the client sent. */
 
43
        LinkedList *screenlist;         /**< List of client's screens. */
 
44
 
 
45
        Menu *menu;                     /**< Menu hierarchy, if any */
42
46
} Client;
43
47
 
 
48
 
44
49
#include "screen.h"
45
50
 
46
51
/* When a new client connects, set up a new client data struct */