]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/src/gateway/apachetools.h
adding xml format support to the gateway
[Evergreen.git] / OpenSRF / src / gateway / 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 #include "http_log.h"
9
10
11 #include "opensrf/string_array.h"
12 #include "opensrf/utils.h"
13 #include "opensrf/utils.h"
14
15 #ifndef APACHE_TOOLS_H
16 #define APACHE_TOOLS_H
17
18
19 /* parses apache URL params (GET and POST).  
20         Returns a string_array of the form [ key, val, key, val, ...]
21         Returns NULL if there are no params */
22 string_array* apacheParseParms(request_rec* r);
23
24 /* provide the params string array, and this will generate a 
25         string of array of param keys 
26         the returned string_array most be freed by the caller
27         */
28 string_array* apacheGetParamKeys(string_array* params);
29
30 /* provide the params string array and a key name, and 
31         this will provide the value found for that key 
32         the returned string_array most be freed by the caller
33         */
34 string_array* apacheGetParamValues(string_array* params, char* key);
35
36 /* returns the first value found for the given param.  
37         char* must be freed by the caller */
38 char* apacheGetFirstParamValue(string_array* params, char* key);
39
40 /* Writes msg to stderr, flushes stderr, and returns 0 */
41 int apacheDebug( char* msg, ... );
42
43 /* Writes to stderr, flushe stderr, and returns HTTP_INTERNAL_SERVER_ERROR; 
44  */
45 int apacheError( char* msg, ... );
46
47
48 #endif