3 * @brief ESP Environment Variables
5 /********************************* Copyright **********************************/
9 * Copyright (c) Mbedthis Software LLC, 2003-2005. All Rights Reserved.
11 * This software is distributed under commercial and open source licenses.
12 * You may use the GPL open source license described below or you may acquire
13 * a commercial license from Mbedthis Software. You agree to be fully bound
14 * by the terms of either license. Consult the LICENSE.TXT distributed with
15 * this software for full details.
17 * This software is open source; you can redistribute it and/or modify it
18 * under the terms of the GNU General Public License as published by the
19 * Free Software Foundation; either version 2 of the License, or (at your
20 * option) any later version. See the GNU General Public License for more
21 * details at: http://www.mbedthis.com/downloads/gplLicense.html
23 * This program is distributed WITHOUT ANY WARRANTY; without even the
24 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26 * This GPL license does NOT permit incorporating this software into
27 * proprietary programs. If you are unable to comply with the GPL, you must
28 * acquire a commercial license to use this software. Commercial licenses
29 * for this software and support services are available from Mbedthis
30 * Software at http://www.mbedthis.com
35 /******************************************************************************/
38 #define _h_ESP_ENV_h 1
41 * @brief Scripting environment variable array types
43 typedef enum EspEnvType {
44 ESP_UNDEFINED_OBJ = -1,
47 * Elements for server[]:
48 * DOCUMENT_ROOT GATEWAY_INTERFACE SERVER_ADDR SERVER_PORT SERVER_NAME
49 * SERVER_PROTOCOL SERVER_SOFTWARE SERVER_URL UPLOAD_DIR
50 * FUTURE: SERVER_ADMIN
51 * FUTURE: this could be shared across all hosts and be made read-only.
53 ESP_SERVER_OBJ = 0, /*! server[] data */
56 * Elements for session[]: are user defined
58 ESP_SESSION_OBJ = 1, /*! session[] data */
61 * Elements for request[]:
62 * AUTH_TYPE CONTENT_LENGTH CONTENT_TYPE QUERY_STRING PATH_INFO
63 * PATH_TRANSLATED REMOTE_ADDR REMOTE_HOST REMOTE_USER REQUEST_METHOD
64 * REQUEST_URI SCRIPT_FILENAME SCRIPT_NAME
65 * FUTURE: FILEPATH_INFO REDIRECT_URL SELF REMOTE_PORT AUTH_USER
68 ESP_REQUEST_OBJ = 2, /*! request[] data */
71 * Elements for headers[]:
72 * HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_CONNECTION HTTP_HOST
73 * HTTP_REFERER HTTP_USER_AGENT and any other custom headers
75 ESP_HEADERS_OBJ = 3, /*! header [] data */
78 * Elements for cookies[]: are defined by the HTTP request
80 ESP_COOKIES_OBJ = 4, /*! cookies[] data */
83 * Elements for files[]: are defined by the HTTP request
84 * CLIENT_FILENAME CONTENT_TYPE FILENAME SIZE
86 ESP_FILES_OBJ = 5, /*! files[] data */
89 * Elements for form[]: are defined by the HTTP request
91 ESP_FORM_OBJ = 6, /*! form[] data */
94 * Elements for application[]: are user defined
96 ESP_APPLICATION_OBJ = 7, /*! application[] data */
99 * Elements for global[]: are defined by ESP/EJS
101 ESP_GLOBAL_OBJ = 8, /*! global [] data */
104 * Elements for local[]: are defined by ESP/EJS
106 ESP_LOCAL_OBJ = 9, /*! local [] data */
109 #define ESP_OBJ_MAX 10 /* Total objects */
112 #define ESP_HASH_SIZE 19 /* Size of hash tables */
114 #define ESP_HASH_SIZE 37
117 /******************************************************************************/
118 #endif /* _h_ESP_ENV_h */
126 * vim600: sw=4 ts=4 fdm=marker