00001 /* $Id: apache.h,v 1.24 2006/04/19 07:44:08 piotras Exp $ 00002 * 00003 * midgard/apache.h: apache helper routines and data structures 00004 * 00005 * Copyright (C) 1999 Jukka Zitting <jukka.zitting@iki.fi> 00006 * Copyright (C) 2000 The Midgard Project ry 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Library General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Library General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this library; see the file COPYING. If not, write to 00020 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 * Boston, MA 02111-1307, USA. 00022 */ 00023 #ifndef MGD_APACHE_H 00024 #define MGD_APACHE_H 00025 #include <httpd.h> 00026 #include <http_log.h> 00027 #include <midgard/midgard.h> 00028 #include <midgard/types.h> 00029 #include <midgard/midgard_schema.h> 00030 00031 #define MOD_MIDGARD_RESOURCE_PAGE 0 00032 #define MOD_MIDGARD_RESOURCE_PAGE_REDIRECT 1 00033 #define MOD_MIDGARD_RESOURCE_BLOB 2 00034 #define MOD_MIDGARD_RESOURCE_FILETEMPLATE 3 00035 00036 #define MIDGARD_HANDLER "application/x-httpd-php-midgard" 00037 00038 struct _midgard_database_connection; 00039 00040 typedef struct { 00041 char *username; 00042 char *password; 00043 char *hostname; 00044 int refcount; 00045 struct _midgard_database_connection *current; 00046 00047 midgard *mgd; 00048 } midgard_database_handle; 00049 00050 typedef struct _midgard_database_connection { 00051 char *name; 00052 midgard_database_handle *handle; 00053 } midgard_database_connection; 00054 00055 typedef struct _server_config 00056 { 00057 char *default_realm; 00058 00059 struct { 00060 midgard_database_connection* page; 00061 midgard_database_connection* auth; 00062 midgard_database_connection* main; 00063 } database; 00064 00065 struct { 00066 int on, set; 00067 } forcedroot; 00068 00069 char *pagecache; 00070 char *ntlm_auth; 00071 table *ntlm_map_domains; 00072 midgard_auth_type authtype; 00073 } midgard_server_config; 00074 00075 #define MGD_AUTH_SNOOP_NONE 0 00076 #define MGD_AUTH_SNOOP_OK 1 00077 #define MGD_AUTH_SNOOP_FAILED 2 00078 00079 typedef struct _request_config { 00080 request_rec *req; 00081 pool *pool; 00082 midgard *mgd; 00083 00084 int host, style; 00085 int author; 00086 int phpdbg; 00087 00088 struct { 00089 int required; 00090 int passed; 00091 int cookie; 00092 } auth; 00093 00094 int prelen; 00095 int self_len; 00096 00097 struct { 00098 int status; /*[eeh] obsolete in mod2 */ 00099 int id; /*[eeh] rename to page for mod2 */ 00100 int type; /*[eeh] obsolete in mod2 */ 00101 int active_page; /*[eeh] obsolete in mod2 */ 00102 const char *content_type; 00103 } resource; 00104 00105 const char *path; /*[eeh] obsolete in mod2 */ 00106 00107 array_header *argv; 00108 00109 GHashTable *elements; 00110 midgard_style *mgd_style; 00111 midgard_server_config *scfg; 00112 00113 int preparser_active; 00114 00115 struct { 00116 midgard_database_connection* current; 00117 midgard_database_connection* page; 00118 midgard_database_connection* main; 00119 } database; 00120 } midgard_request_config; 00121 00122 typedef struct _directory_config { 00123 00124 struct { 00125 int on; 00126 int set; 00127 } engine; 00128 00129 struct { 00130 int on; 00131 int set; 00132 } extauth; 00133 00134 char *rootfile; 00135 char *templatefile; 00136 char *blobdir; 00137 char *parser; 00138 char *extension; 00139 #if HAVE_MIDGARD_VC 00140 char *cvs_script; 00141 #endif /* HAVE_MIDGARD_VC */ 00142 #if HAVE_MIDGARD_QUOTA 00143 struct { 00144 int on; 00145 int set; 00146 } quota; 00147 #endif /* HAVE_MIDGARD_VC */ 00148 struct { 00149 int on; 00150 int set; 00151 } attachmenthost; 00152 char* ah_prefix; 00153 guint loglevel; 00154 const gchar *logfile; 00155 MidgardSchema *schema; 00156 const char *schemafile; 00157 } midgard_directory_config; 00158 00159 #endif
1.4.6