From 53acb181ef04ae70a7dcfed849f7c02850781c20 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Sun, 29 Feb 2004 23:36:18 +0000 Subject: separated out most mysql specific code to mod_log_sql_mysql.c beginnings of separation of core SQL logging logic moved DB connection paramters to a table (for cutoms params for DB drivers) added new configuration directive to handle any DB parameter renamed all log_sql_* vars and type to logsql_* Added enums for opendb return codes. organized config directives and commented for easier reading of source --- (limited to 'mod_log_sql.h') diff --git a/mod_log_sql.h b/mod_log_sql.h index f54ab54..0c59cb7 100644 --- a/mod_log_sql.h +++ b/mod_log_sql.h @@ -1,4 +1,5 @@ -/* $Header: /home/cvs/mod_log_sql/mod_log_sql.h,v 1.3 2004/01/22 05:26:56 urkle Exp $ */ +/* $Id: mod_log_sql.h,v 1.4 2004/02/29 23:36:18 urkle Exp $ */ + #ifndef MOD_LOG_SQL_H #define MOD_LOG_SQL_H @@ -23,10 +24,41 @@ #define LOGSQL_DECLARE_DATA __declspec(dllimport) #endif -typedef const char *log_sql_item_func(request_rec *r, char *a); +typedef const char *logsql_item_func(request_rec *r, char *a); /* Registration Function for extract functions */ LOGSQL_DECLARE(void) log_sql_register_item(server_rec *s, apr_pool_t *p, - char key, log_sql_item_func *func, const char *sql_field_name, + char key, logsql_item_func *func, const char *sql_field_name, int want_orig_default, int string_contents); + +/* DB Connection structure holds connection status information + * and connection handle + */ +typedef struct { + int connected; /* Are we connected to the DB */ + void *handle; /* DB specific connection pointer */ +} logsql_dbconnection; + +/* open db handle return values*/ +typedef enum { + LOGSQL_OPENDB_FAIL = 0, + LOGSQL_OPENDB_SUCCESS, + LOGSQL_OPENDB_ALREADY, + LOGSQL_OPENDB_PRESERVE +} logsql_opendb; + +/* For passing to create_tables handler */ +typedef enum { + LOGSQL_TABLE_ACCESS = 0, + LOGSQL_TABLE_NOTES, + LOGSQL_TABLE_HEADERSOUT, + LOGSQL_TABLE_HEADERSIN, + LOGSQL_TABLE_COOKIES, +} logsql_tabletype; + +/* All Tables */ +#define LOGSQL_TABLE_ALL LOGSQL_TABLE_ACCESS | LOGSQL_TABLE_NOTES | \ + LOGSQL_TABLE_HEADERSIN | LOGSQL_TABLE_HEADERSOUT | LOGSQL_TABLE_COOKIES + + #endif /* MOD_LOG_SQL_H */ -- cgit v0.9.2