/* Usage:

Call this function once a minute (or there abouts) and on startup

	if (!domuser_reload("full_path_to_text_file",reason)) {
		dmsg("Not loaded %s\n",reason);
	}

And call this function to check a user
	if (domuser_find(userdom,realuserdom,dropuser,BFSZ-1)) {
		Then 'userdom' is a valid user, and their real
		name in the user db is 'realuserdom' and their real drop path should
		be based 'dropuser'
	}

Format of input file
	usera@domain	usera@domain
	userb@domain	userb@domain
	*@domain	user@domain
	...


*/
#ifndef DOMUSER_HEADER
#define DOMUSER_HEADER
#include "lib.h"

int domuser_iterate(void (*fn)(void *data, char *wild, char *user), void *data);

int domuser_reload(char *fname, char *reason);
int domuser_hash(char *wild);
int domuser_add(char *wild, char *user);
int domuser_free(void);
int domuser_find(char *userdom, char *realuserdom, char *dropuser, int rsize);
int domuser_count(char *wild, int match_account, int stopat);
int domuser_del(char *xuser);
int domuser_dropuser(char *dropuser, int rsize, char *ruser);
Wordlist *domuser_aliases(char *realuserdom);

extern char du_file[BFSZ];
extern time_t du_mtime;

#endif
