//-----------------------------------------------------------------------------
// Copyright © 2003 - Philip Howard - All rights reserved
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//-----------------------------------------------------------------------------
// package	libh/http
// homepage	http://libh.slashusr.org/
//-----------------------------------------------------------------------------
// author	Philip Howard
// email	libh at ipal dot org
// homepage	http://phil.ipal.org/
//-----------------------------------------------------------------------------
// This file is best viewed using a fixed spaced font such as Courier
// and in a display at least 120 columns wide.
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
// file		http_lib.h
//
// purpose	Define resources used by the http library.
//-----------------------------------------------------------------------------
#ifndef __HTTP_LIB_H__
#define __HTTP_LIB_H__

//-----------------------------------------------------------------------------
// headers
//-----------------------------------------------------------------------------

#include "libh_common.h"

#include <errno.h>
#include <string.h>

#include <libh/cgi.h>
#include <libh/map.h>
#include <libh/http.h>
#include <libh/string.h>

//-----------------------------------------------------------------------------
// Define settings.
//-----------------------------------------------------------------------------
#define HTTP_URL_MAX_SIZE	8191
#define HTTP_MAX_HEADER_LENGTH	8191

//-----------------------------------------------------------------------------
// Define common global data.
//-----------------------------------------------------------------------------
#ifdef EXPORT_COMMON_GLOBAL_DATA
#define COMMON_DEF
#define COMMON_INI(x) = x
#else
#define COMMON_DEF	extern
#define COMMON_INI(x)
#endif

COMMON_DEF MAP			http_header_map		COMMON_INI( NULL );
COMMON_DEF const char *		http_response		COMMON_INI( NULL );
COMMON_DEF const char *		http_auth_realm		COMMON_INI( NULL );
COMMON_DEF int			http_full_mode		COMMON_INI( 0 );
COMMON_DEF int			http_done		COMMON_INI( 0 );

//-----------------------------------------------------------------------------
// end header
//-----------------------------------------------------------------------------
#endif /* __HTTP_LIB_H__ */

