// prototype.h
// $Id: prototype.h,v 1.5 2007/11/06 12:27:17 sendan Exp $
// masashi shimakura

#ifdef POSTGRES_IN
int psqlconnect(void);
int psqlexec_datain(private_data_t *, char *);
int psqlexec_select(char *);
int psql_connectset(private_data_t *, char *);
#endif


#ifdef MYSQL_IN
int mysqlconnect(char *, char *, char *, char *);
int mysql_connectset(private_data_t *, char *);
int mysqlexec_datain(char *);
int mysqlexec_select(char *);
#endif


int malloc_set(void);
int malloc_free(void);
int malloc_set2(void);
int private_malloc_set(private_data_t *);
int private_malloc_free(private_data_t *);

int optin(int, char *[]);

int conf_set(char *);
int print_conf(void);
int set_data(void);
int path_check(char *);
int client_set(private_data_t *);
int client_setg(private_data_t *);
int file_sets(private_data_t *, char);
int file_sets2(private_data_t *, char, int, int);

int start_neg(private_data_t *);
int stag_neg(private_data_t *);

int lockfile_remove(char *, char *, char *);
int neg(char *, char *, unsigned char *);
char * chack_lockfile(char *, char *, char *, char *, int *);
int lock_remove(char *);

char * file_send(int, char *, char *, int *, int, char);
char * file_send2(int, char *, char *, int *, int, char);
int log_out(int, char *, char *, char *, char *, unsigned char *);
int fd_outopen(char *, FILE *);
int put_log(int, char *, char*, unsigned char *);
char * filename_create(char *, char *, char *, char *);

int mail_time_getr(char [], int, char *);

int mail_grsend(char *, char *, char *, char *, char *, char *, char *, char *);
int mail_grsend_t(mail_data_t *);

char * make_subject(char *, char *, char *);

int mail_malloc(mail_data_t *);
int mail_free(mail_data_t *);
int outchar(int *, char **, char);
int msocket_send(char *, int);
int msocket_connect(struct sockaddr_in *, int, char [], int *);
int send_rcpttodata(mail_data_t *, char *);
int send_rcptto(mail_data_t *, int);

int life_check(private_data_t *);

char * stat_check(char *, char *, int, int *);

int file_check(char *);

int com_check(char * chCOM);

int safe_exit(char *);
int signal_exit(void);
int signal_errout(void);



/* zither_subst.c */

char * check_strtol(char * data);
char * mail_form(char *, private_data_t *, unsigned char *, int *);
int errdata_tok(private_data_t *, unsigned char *); 
int global_data_list(private_data_t *);
int life_thread(private_data_t *);

int clockfile_check(void);
int mailsigfile_check(void);

int setup_check(void);

int connect_open(int);    /* fdno thread function */


int err_logi(private_data_t *);
int quit_logi(private_data_t *);
int put_logi(private_data_t *);
int up_logi(private_data_t *);
int aupl_logi(private_data_t *);
int get_logi(private_data_t *);
int vers_logi(private_data_t *);
int ver_logi(private_data_t *);
int life_logi(private_data_t *);
int setg_logi(private_data_t *);
int set_logi(private_data_t *);
int bat_logi(private_data_t *);
int slget_logi(private_data_t *);
int alget_logi(private_data_t *);
int neg_logi(private_data_t *);
// MID 
int midget_logi(private_data_t *);
int midremove_logi(private_data_t *);
int midset_logi(private_data_t *);
int th_miname_dump(void);
int miname_install(void);
int midump_remove(char *);
int miname_dump(char *);



