]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/apachemods/apachetools.h
somehow forgot to add the billing_type field
[Evergreen.git] / Open-ILS / src / apachemods / apachetools.h
1 #include "httpd.h"
2 #include "http_config.h"
3 #include "http_core.h"
4 #include "http_protocol.h"
5 #include "apr_compat.h"
6 #include "apr_strings.h"
7 #include "apr_reslist.h"
8
9
10 #include "string_array.h"
11 #include "utils.h"
12 #include "opensrf/utils.h"
13
14 #ifndef APACHE_TOOLS_H
15 #define APACHE_TOOLS_H
16
17
18 /* parses apache URL params (GET and POST).  
19         Returns a string_array of the form [ key, val, key, val, ...]
20         Returns NULL if there are no params */
21 string_array* apacheParseParms(request_rec* r);
22
23 /* provide the params string array, and this will generate a 
24         string of array of param keys 
25         the returned string_array most be freed by the caller
26         */
27 string_array* apacheGetParamKeys(string_array* params);
28
29 /* provide the params string array and a key name, and 
30         this will provide the value found for that key 
31         the returned string_array most be freed by the caller
32         */
33 string_array* apacheGetParamValues(string_array* params, char* key);
34
35 /* returns the first value found for the given param.  
36         char* must be freed by the caller */
37 char* apacheGetFirstParamValue(string_array* params, char* key);
38
39 /* Writes msg to stderr, flushes stderr, and returns 0 */
40 int apacheDebug( char* msg, ... );
41
42 /* Writes to stderr, flushe stderr, and returns HTTP_INTERNAL_SERVER_ERROR; 
43  */
44 int apacheError( char* msg, ... );
45
46
47 #endif