1 /*
2  * lastlog.h: header for lastlog.c
3  *
4  * Written By Michael Sandrof
5  *
6  * Copyright (c) 1990 Michael Sandrof.
7  * Copyright (c) 1991, 1992 Troy Rollo.
8  * Copyright (c) 1992-2003 Matthew R. Green.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright
17  *    notice, this list of conditions and the following disclaimer in the
18  *    documentation and/or other materials provided with the distribution.
19  * 3. The name of the author may not be used to endorse or promote products
20  *    derived from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
23  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  *
34  * $Id: lastlog.h,v 1.3 2003-01-08 20:00:54 f Exp $
35  */
36 
37 #ifndef __lastlog_h_
38 #define __lastlog_h_
39 
40 /*
41  * this list must agree with the list in lastlog.c
42  */
43 #define LOG_NONE	0x000000
44 #define LOG_CURRENT	0x000000
45 #define LOG_CRAP	0x000001
46 #define LOG_PUBLIC	0x000002
47 #define LOG_MSG		0x000004
48 #define LOG_NOTICE	0x000008
49 #define LOG_WALL	0x000010
50 #define LOG_WALLOP	0x000020
51 #define LOG_NOTES	0x000040
52 #define LOG_OPNOTE	0x000080
53 #define	LOG_SNOTE	0x000100
54 #define	LOG_ACTION	0x000200
55 #define	LOG_DCC		0x000400
56 #define LOG_CTCP	0x000800
57 #define	LOG_USER1	0x001000
58 #define LOG_USER2	0x002000
59 #define LOG_USER3	0x004000
60 #define LOG_USER4	0x008000
61 #define LOG_BEEP	0x010000
62 #define LOG_HELP	0x020000
63 
64 #define LOG_ALL (LOG_CRAP | LOG_PUBLIC | LOG_MSG | LOG_NOTICE | LOG_WALL | \
65 		LOG_WALLOP | LOG_NOTES | LOG_OPNOTE | LOG_SNOTE | LOG_ACTION | \
66 		LOG_CTCP | LOG_DCC | LOG_BEEP)
67 
68 #define LOG_DEFAULT	LOG_NONE
69 
70 	void	set_lastlog_level _((char *));
71 	int	set_lastlog_msg_level _((int));
72 	void	set_lastlog_size _((int));
73 	void	set_notify_level _((char *));
74 	void	lastlog _((char *, char *, char *));
75 	void	add_to_lastlog _((Window *, char *));
76 	char	*bits_to_lastlog_level _((int));
77 	int	real_lastlog_level _((void));
78 	int	real_notify_level _((void));
79 	int	parse_lastlog_level _((char *));
80 	int	islogged _((Window *));
81 
82 #endif /* __lastlog_h_ */
83