/*
    slforum version 1.x - Simple chat room usable via telnet.
    Copyright (C) 1999 Jeremy D. Monin, Dan Chin, Matt Lochansky
	(forum@shadowlands.org).
    Based on jdkchat version 1.3, J.D.Koftinoff Software, Ltd. (GPL'd)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/


#ifndef __SLFORUM_H
#define	__SLFORUM_H



/* all preferences are in this file. */
#include "slfprefs.h"


/* #define DBG(a) printf a */
#define DBG(a) 

/* from passwd (jer) */
#include "passwd.h"

/* back to slforum stuff */


typedef enum { yes, no, unknown } slf_tristate;



#include "slforumutil.h"



#if defined(WIN32) || defined(_WIN32)
#define _SIGHANDLER_(x)  VOID CALLBACK x (LPVOID ign, DWORD ig2, DWORD ig3)
typedef  void (*_SIGHANDLER_T_) (LPVOID,DWORD,DWORD);
#endif


void sked_alarm (int seconds);


#ifdef SIGHANDLE_POSIX
#define _SIGHANDLER_(x)  void x (int ignorethisparam)
typedef __sighandler_t  _SIGHANDLER_T_;
#endif


#ifdef SIGHANDLE_SOLARIS_2_6
#ifdef __cplusplus
   /* see /usr/include/sys/signal.h, in the typedef for struct sigaction */
#define _SIGHANDLER_(x)  void x (int)
	typedef void (*_SIGHANDLER_T_) (int);
#else
#define _SIGHANDLER_(x)  void x (void)
	typedef void (*_SIGHANDLER_T_) (void);
#endif
#endif


#ifndef _SIGHANDLER_
# error "Please define either SIGHANDLE_SOLARIS_2_6 or SIGHANDLE_POSIX"
#endif

#ifndef LINUX_UTMP
#ifndef SOLARIS_UTMP
#ifndef OSX_UTMP
# error "Please define either LINUX_UTMP, SOLARIS_UTMP, or OSX_UTMP"
#endif
#endif
#endif


#ifndef socket_arg3_t
# error "Please define socket_arg3_t; this should be in the Makefile you choose."
#endif

#ifdef USE_AUTHLOCAL
extern "C" {
  /* see authlocal.c */
  uid_t getUID (unsigned int localhost_ip,
		int  userport, int daemonport);
}
#endif



class SLForumUser;
class SLForumRoom;

#include "slforumuser.h"
#include "slforumroom.h"

#endif	/* __SLFORUM_H */







