1#ifndef	http11_h
2#define	http11_h
3
4/*
5** Copyright 1998 - 2003 Double Precision, Inc.
6** See COPYING for distribution information.
7*/
8
9#if HAVE_CONFIG_H
10#include	"config.h"
11#endif
12
13#ifdef  __cplusplus
14extern "C" {
15#endif
16
17#if HAVE_LIBFCGI
18#include <stdlib.h>
19#include "fcgi_stdio.h"
20#endif
21
22
23/* HTTP 1.1 library */
24
25/* Implement Accept-Language: and Content-Language: headers as follows.
26**
27** libdir contains one subdirectory for each support content language.
28**
29** softlinks are used to provide default variations of each content.
30** (example: en -> en-us )
31**
32** subdirectory/LANGUAGE is a file with one line, containing the name of
33** the directory.  So, we can open en/LANGUAGE, read en-us, and send that
34** back as the Content-Language:
35**
36** subdirectory/LOCALE is a file with one line - the corresponding locale.
37** en-us/LOCALE will contain en_US, for example.
38**
39*/
40
41char *http11_best_content_language(const char *libdir, const char *acc_lang);
42	/* acc_lang is our Accept-Language: header.  Figure out the best
43	** content language we can use.
44	**
45	** Note - return pointer must be free()d.
46	*/
47
48const char *http11_content_language(const char *libdir, const char *cont_lang);
49	/* Return the real content language by reading LANGUAGE */
50
51const char *http11_content_locale(const char *libdir, const char *cont_lang);
52	/* Return the LOCALE */
53
54const char *http11_content_ispelldict(const char *libdir, const char *cont_lang);
55	/* Return the ISPELL dictionary */
56
57const char *http11_content_charset(const char *libdir, const char *acc_lang);
58	/* Return the CHARSET */
59
60FILE *http11_open_langfile(const char *libdir, const char *acc_lang,
61		const char *file);
62	/* Open arbitrary file */
63
64#define	HTTP11_DEFAULTLANG	"@DEFAULTLANG@"
65#ifdef  __cplusplus
66}
67#endif
68#endif
69