00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __AWHANDLER_MYSQL__
00023 #define __AWHANDLER_MYSQL__
00024
00025 #include <stdio.h>
00026
00027 #include "awdb.h"
00028
00029 #include "mysql.h"
00030
00031 #include "regexmatch.h"
00032
00033 #include "monitor.h"
00034
00035 #include "wire.h"
00036
00037 #include "awmysql.h"
00038
00190
00191
00192
00193
00194
00195
00196
00197
00198
00202 typedef struct {
00203
00204 aw_handler_t
00205 handler_header;
00206
00207 aw_mysql_state_t
00208 state;
00209
00210 aw_mysql_cinfo_t
00211 cinfo;
00212
00213 byte_t
00214 *sql;
00215
00216 byte_t
00217 *desc;
00218
00219 aw_db_cevents_t
00220 cevents;
00221
00222 u_int32_t
00223 nwatchers;
00224
00225 aw_db_rwatcher_t
00226 *watchers;
00227
00228 u_int32_t
00229 ncounters;
00230
00231 aw_db_counter_t
00232 *counters;
00233
00234 } aw_mysqlhandler_t;
00235
00252 aw_mysqlhandler_t *aw_create_mysqlhandler(const aw_mysql_cinfo_t *cinfo,
00253 const byte_t *sql,
00254 const byte_t *desc,
00255 const aw_db_cevents_t *cevents,
00256 u_int32_t nregexs,
00257 const aw_db_regex_t *regexs,
00258 u_int32_t ncounters,
00259 const aw_db_counter_t *counters,
00260 int32_t (*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00261 int32_t (*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00262 const aw_alarm_sched_t *sched,
00263 aw_logger_t *elogger);
00264
00265
00270 void aw_free_mysqlhandler(aw_mysqlhandler_t *h);
00271
00272
00276 aw_handler_t *aw_wire_mysqlhandler(aw_wire_mkhandler_args_t *args);
00277
00278
00279 #endif
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290