/*
    libgutenfetch - a small library to list and fetch books available
	through project gutenberg.

    Copyright (C) 2001, 2002, 2003, 2004 Russell Francis 

    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.
	59 Temple Place, Suite 330
	Boston, MA  02111-1307  USA

Last updated 
$Date: 2004/03/21 05:14:43 $
$Author: johntabularasa $.

*/
#ifndef LIBGUTENFETCH_UTILITY_H
#define LIBGUTENFETCH_UTILITY_H
#include "stddefs.h"
#include "gutenfetch.h"
#include "libgutenfetch_servers.h"
#ifdef HAVE_STDIO_H
#	include <stdio.h>
#endif /* HAVE_STDIO_H */
#ifdef HAVE_TIME_H
#	include <time.h>
#endif /* HAVE_TIME_H */

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#ifndef HAVE_STRSEP
	char * strsep(char **, const char *);
#endif /* HAVE_STRSEP */
#ifndef HAVE_MERGESORT
	int mergesort(void *, size_t, size_t, 
		int (*)(const void *, const void *));
#endif /* HAVE_MERGESORT */

	char * gutenfetch_util_strcat(char *, ...);
	char * gutenfetch_util_getline(FILE *);
	char * gutenfetch_util_get_author(char *);
	char * gutenfetch_util_get_title(char *);
	char * gutenfetch_util_build_URL(gutenfetch_server_t*, const char *);
	void   gutenfetch_util_build_path(const char *);
	char * gutenfetch_util_get_temp_dir(void);
	int    gutenfetch_util_get_temp_file(char **);
	void   gutenfetch_util_free_temp_dir(void);
	void   gutenfetch_util_rmdir(const char *);
	void   gutenfetch_util_rm_below_dir(const char *);
	void   gutenfetch_util_rm_old_below_dir(time_t, const char *);
	char * gutenfetch_util_get_mime_from_filename(const char *);
	int	   gutenfetch_util_extension_is(char *, char *);
	void   gutenfetch_util_get_base_ext(char **, char **, const char *);
	char * gutenfetch_util_get_home_directory(void);
	int	   gutenfetch_util_move(const char *, const char *);
	char * gutenfetch_util_read_file_to_buffer(int);
	gutenfetch_error_t
		 	gutenfetch_util_read_binary_file_to_buffer(
				int,
				char **,
				size_t *);
#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* LIBGUTENFETCH_ERROR_H */



syntax highlighted by Code2HTML, v. 0.9.1