diff options
Diffstat (limited to 'mod_log_sql.h')
-rw-r--r-- | mod_log_sql.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/mod_log_sql.h b/mod_log_sql.h index 0c59cb7..1eed9b4 100644 --- a/mod_log_sql.h +++ b/mod_log_sql.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mod_log_sql.h,v 1.4 2004/02/29 23:36:18 urkle Exp $ */ | 1 | /* $Id: mod_log_sql.h,v 1.5 2004/03/02 05:34:50 urkle Exp $ */ |
2 | 2 | ||
3 | #ifndef MOD_LOG_SQL_H | 3 | #ifndef MOD_LOG_SQL_H |
4 | #define MOD_LOG_SQL_H | 4 | #define MOD_LOG_SQL_H |
@@ -31,12 +31,11 @@ LOGSQL_DECLARE(void) log_sql_register_item(server_rec *s, apr_pool_t *p, | |||
31 | char key, logsql_item_func *func, const char *sql_field_name, | 31 | char key, logsql_item_func *func, const char *sql_field_name, |
32 | int want_orig_default, int string_contents); | 32 | int want_orig_default, int string_contents); |
33 | 33 | ||
34 | /* DB Connection structure holds connection status information | 34 | /* DB Connection structure holds connection handle */ |
35 | * and connection handle | ||
36 | */ | ||
37 | typedef struct { | 35 | typedef struct { |
38 | int connected; /* Are we connected to the DB */ | 36 | int connected; /* Are we connected to the DB */ |
39 | void *handle; /* DB specific connection pointer */ | 37 | void *handle; /* DB specific connection pointer */ |
38 | apr_table_t *parms; /* DB connection parameters */ | ||
40 | } logsql_dbconnection; | 39 | } logsql_dbconnection; |
41 | 40 | ||
42 | /* open db handle return values*/ | 41 | /* open db handle return values*/ |
@@ -45,9 +44,22 @@ typedef enum { | |||
45 | LOGSQL_OPENDB_SUCCESS, | 44 | LOGSQL_OPENDB_SUCCESS, |
46 | LOGSQL_OPENDB_ALREADY, | 45 | LOGSQL_OPENDB_ALREADY, |
47 | LOGSQL_OPENDB_PRESERVE | 46 | LOGSQL_OPENDB_PRESERVE |
48 | } logsql_opendb; | 47 | } logsql_opendb_ret; |
48 | |||
49 | typedef enum { | ||
50 | LOGSQL_QUERY_SUCCESS = 0, | ||
51 | LOGSQL_QUERY_FAIL, | ||
52 | LOGSQL_QUERY_NOLINK, | ||
53 | LOGSQL_QUERY_NOTABLE, | ||
54 | LOGSQL_QUERY_PRESERVED, | ||
55 | } logsql_query_ret; | ||
49 | 56 | ||
50 | /* For passing to create_tables handler */ | 57 | typedef enum { |
58 | LOGSQL_TABLE_SUCCESS = 0, | ||
59 | LOGSQL_TABLE_FAIL, | ||
60 | } logsql_table_ret; | ||
61 | |||
62 | /* Table type to create/log to */ | ||
51 | typedef enum { | 63 | typedef enum { |
52 | LOGSQL_TABLE_ACCESS = 0, | 64 | LOGSQL_TABLE_ACCESS = 0, |
53 | LOGSQL_TABLE_NOTES, | 65 | LOGSQL_TABLE_NOTES, |
@@ -60,5 +72,15 @@ typedef enum { | |||
60 | #define LOGSQL_TABLE_ALL LOGSQL_TABLE_ACCESS | LOGSQL_TABLE_NOTES | \ | 72 | #define LOGSQL_TABLE_ALL LOGSQL_TABLE_ACCESS | LOGSQL_TABLE_NOTES | \ |
61 | LOGSQL_TABLE_HEADERSIN | LOGSQL_TABLE_HEADERSOUT | LOGSQL_TABLE_COOKIES | 73 | LOGSQL_TABLE_HEADERSIN | LOGSQL_TABLE_HEADERSOUT | LOGSQL_TABLE_COOKIES |
62 | 74 | ||
75 | /* MySQL module calls */ | ||
76 | logsql_opendb_ret log_sql_mysql_connect(server_rec *s, logsql_dbconnection *db); | ||
77 | void log_sql_mysql_close(logsql_dbconnection *db); | ||
78 | const char *log_sql_mysql_escape(const char *from_str, apr_pool_t *p, | ||
79 | logsql_dbconnection *db); | ||
80 | logsql_query_ret log_sql_mysql_query(request_rec *r,logsql_dbconnection *db, | ||
81 | const char *query); | ||
82 | logsql_table_ret log_sql_mysql_create(request_rec *r, logsql_dbconnection *db, | ||
83 | logsql_tabletype table_type, const char *table_name); | ||
84 | |||
63 | 85 | ||
64 | #endif /* MOD_LOG_SQL_H */ | 86 | #endif /* MOD_LOG_SQL_H */ |