00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __AWHANDLER_SQLSVR__
00023 #define __AWHANDLER_SQLSVR__
00024
00025 #include <stdio.h>
00026
00027 #include "regexmatch.h"
00028
00029 #include "monitor.h"
00030
00031 #include "wire.h"
00032
00033 #include "awsqlsvr.h"
00034
00183
00184
00185
00186
00187
00188
00192 typedef struct {
00193
00194 aw_handler_t
00195 handler_header;
00196
00197 aw_sqlsvr_state_t
00198 state;
00199
00200 aw_sqlsvr_cinfo_t
00201 cinfo;
00202
00203 byte_t
00204 *sql;
00205
00206 byte_t
00207 *desc;
00208
00209 aw_db_cevents_t
00210 cevents;
00211
00212 u_int32_t
00213 nwatchers;
00214
00215 aw_db_rwatcher_t
00216 *watchers;
00217
00218 u_int32_t
00219 ncounters;
00220
00221 aw_db_counter_t
00222 *counters;
00223
00224 } aw_sqlsvrhandler_t;
00225
00242 aw_sqlsvrhandler_t *aw_create_sqlsvrhandler(const aw_sqlsvr_cinfo_t *cinfo,
00243 const byte_t *sql,
00244 const byte_t *desc,
00245 const aw_db_cevents_t *cevents,
00246 u_int32_t nregexs,
00247 const aw_db_regex_t *regexs,
00248 u_int32_t ncounters,
00249 const aw_db_counter_t *counters,
00250 int32_t (*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00251 int32_t (*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00252 const aw_alarm_sched_t *sched,
00253 aw_logger_t *elogger);
00254
00255
00260 void aw_free_sqlsvrhandler(aw_sqlsvrhandler_t *h);
00261
00262
00266 aw_handler_t *aw_wire_sqlsvrhandler(aw_wire_mkhandler_args_t *args);
00267
00268
00269 #endif
00270