/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	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.

**********************************************************************/


#ifndef ___XL_SERVER_H___
#define ___XL_SERVER_H___

#include	"xllisp.h"

typedef struct account {
	struct account *	next;
	L_CHAR *		group;
	L_CHAR *		login_type;
	L_CHAR * 		user;
	L_CHAR *		passwd;
} ACCOUNT;

typedef struct agent {
	struct agent *		next;
	L_CHAR * 		group;
	L_CHAR *		name;
	L_CHAR *		login_type;
	int			flags;
#define AF_PASSWD		0x00000001
#define AF_DIRCHECK		0x00000002
	XLISP_ENV *		env;
	XL_SEXP *		func;
} AGENT;

int insert_account(L_CHAR *,L_CHAR *,L_CHAR *,L_CHAR *);
int check_account(L_CHAR *,L_CHAR *,L_CHAR *,L_CHAR *);

int insert_agent(L_CHAR *,L_CHAR *,L_CHAR * ,int,
	XLISP_ENV * ,XL_SEXP *);
AGENT * search_agent(L_CHAR *,L_CHAR *);

#endif
