http://ftp.nluug.nl/pub/os/Linux/distr/pardusrepo/sources/xscreensaver-5.02.tar.gz
[xscreensaver] / driver / auth.h
1 /* auth.h --- Providing authentication mechanisms.
2  *
3  * (c) 2007, Quest Software, Inc. All rights reserved.
4  *
5  * This file is part of XScreenSaver,
6  * Copyright (c) 1993-2004 Jamie Zawinski <jwz@jwz.org>
7  *
8  * Permission to use, copy, modify, distribute, and sell this software and its
9  * documentation for any purpose is hereby granted without fee, provided that
10  * the above copyright notice appear in all copies and that both that
11  * copyright notice and this permission notice appear in supporting
12  * documentation.  No representations are made about the suitability of this
13  * software for any purpose.  It is provided "as is" without express or 
14  * implied warranty.
15  */
16 #ifndef XSS_AUTH_H
17 #define XSS_AUTH_H
18
19 #include "types.h"
20
21 #undef Bool
22 #undef True
23 #undef False
24 #define Bool int
25 #define True 1
26 #define False 0
27
28 struct auth_message {
29   enum {
30     AUTH_MSGTYPE_INFO,
31     AUTH_MSGTYPE_ERROR,
32     AUTH_MSGTYPE_PROMPT_NOECHO,
33     AUTH_MSGTYPE_PROMPT_ECHO
34   } type;
35   const char *msg;
36 };
37
38 struct auth_response {
39   char *response;
40 };
41
42 int
43 gui_auth_conv(int num_msg,
44           const struct auth_message auth_msgs[],
45           struct auth_response **resp,
46           saver_info *si);
47
48 void
49 xss_authenticate(saver_info *si, Bool verbose_p);
50
51 void
52 auth_finished_cb (saver_info *si);
53
54 #endif