time.c: tv_convex_combination() fixes.
[paraslash.git] / user_list.h
1 /*
2 * Copyright (C) 2006-2009 Andre Noll <maan@systemlinux.org>
3 *
4 * Licensed under the GPL v2. For licencing details see COPYING.
5 */
6
7 /** \file user_list.h exported functions from user_list.c */
8
9 /**
10 * permission flags that can be set individually for any server command
11 *
12 * - AFS_READ: read-only command of the audio file selector
13 * - AFS_WRITE: command changes state of the audio file selector
14 * - VSS_READ: command reads information about the current audio stream
15 * - VSS_WRITE: command changes the current audio stream
16 */
17 enum {AFS_READ = 1, AFS_WRITE = 2, VSS_READ = 4, VSS_WRITE = 8};
18
19 /**
20 * data needed to authenticate the user
21 */
22 struct user {
23 /** the position of this user in the list of users */
24 struct list_head node;
25 /** the username */
26 char *name;
27 /** the public RSA key */
28 RSA *rsa;
29 /** the privileges that this user has */
30 unsigned int perms;
31 };
32
33 void init_user_list(char *user_list_file);
34 struct user *lookup_user(const char *name);