+#ifndef APACHE_TOOLS_H
+#define APACHE_TOOLS_H
+
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_protocol.h"
-#include "apr_compat.h"
+//#include "apr_compat.h"
#include "apr_strings.h"
#include "apr_reslist.h"
#include "http_log.h"
#include "opensrf/utils.h"
#include "opensrf/log.h"
-#ifndef APACHE_TOOLS_H
-#define APACHE_TOOLS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
#define APACHE_TOOLS_MAX_POST_SIZE 10485760 /* 10 MB */
/* parses apache URL params (GET and POST).
- Returns a string_array of the form [ key, val, key, val, ...]
+ Returns a osrfStringArray of the form [ key, val, key, val, ...]
Returns NULL if there are no params */
-string_array* apacheParseParms(request_rec* r);
+osrfStringArray* apacheParseParms(request_rec* r);
/* provide the params string array, and this will generate a
string of array of param keys
- the returned string_array most be freed by the caller
+ the returned osrfStringArray most be freed by the caller
*/
-string_array* apacheGetParamKeys(string_array* params);
+osrfStringArray* apacheGetParamKeys(osrfStringArray* params);
/* provide the params string array and a key name, and
this will provide the value found for that key
- the returned string_array most be freed by the caller
+ the returned osrfStringArray most be freed by the caller
*/
-string_array* apacheGetParamValues(string_array* params, char* key);
+osrfStringArray* apacheGetParamValues(osrfStringArray* params, char* key);
/* returns the first value found for the given param.
char* must be freed by the caller */
-char* apacheGetFirstParamValue(string_array* params, char* key);
+char* apacheGetFirstParamValue(osrfStringArray* params, char* key);
/* Writes msg to stderr, flushes stderr, and returns 0 */
int apacheDebug( char* msg, ... );
/*
* Creates an apache table* of cookie name / value pairs
*/
+/*
apr_table_t* apacheParseCookies(request_rec *r);
+*/
+#ifdef __cplusplus
+}
+#endif
#endif