root/trunk/wifidog/src/userclasses.h @ 45

Revision 45, 2.3 KB (checked in by alexcv, 9 years ago)

UserRights?

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/********************************************************************\
2 * This program is free software; you can redistribute it and/or    *
3 * modify it under the terms of the GNU General Public License as   *
4 * published by the Free Software Foundation; either version 2 of   *
5 * the License, or (at your option) any later version.              *
6 *                                                                  *
7 * This program is distributed in the hope that it will be useful,  *
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
10 * GNU General Public License for more details.                     *
11 *                                                                  *
12 * You should have received a copy of the GNU General Public License*
13 * along with this program; if not, contact:                        *
14 *                                                                  *
15 * Free Software Foundation           Voice:  +1-617-542-5942       *
16 * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
17 * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
18 *                                                                  *
19\********************************************************************/
20
21/* $Header$ */
22/** @file userclasses.h
23    @brief Function for handling user classes
24    @author Copyright (C) 2004 Alexandre Carmel-Veilleux <acv@acv.ca>
25*/
26
27#ifndef _USERCLASSES_H_
28#define _USERCLASSES_H_
29
30/* Format still up in the air... */
31typedef struct _user_classes {
32        int     profile;        /* 0-255, limited by exit() return values */
33        int     timeout;        /* In minutes */
34        int     active;         /* User active, boolean */
35        struct  _user_classes   *next,
36                                *prev;
37} UserClasses;
38
39typedef struct _user_rights {
40        int     profile;        /* keyed to a global profile */
41        time_t  start_time;     /* when connection started */
42        time_t  end_time;       /* start_time + timeout */
43} UserRights;
44
45UserRights *new_userrights(void);
46void free_userrights(UserRights *rights);
47
48UserClasses *new_userclasses(void);
49void free_userclasses(UserClasses *class);
50void insert_userclasses(UserClasses *class);
51UserClasses *find_userclasses(int profile);
52UserClasses *remove_userclasses(int profile);
53int init_userclasses(int remote_allowed); /* Arg is boolean */
54
55#endif /* _USERCLASSES_H_ */
Note: See TracBrowser for help on using the browser.