00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __AWHANDLER_SQLITE__
00023 #define __AWHANDLER_SQLITE__
00024
00025 #include <stdio.h>
00026
00027 #include "awdb.h"
00028
00029 #include "sqlite3.h"
00030
00031 #include "regexmatch.h"
00032
00033 #include "monitor.h"
00034
00035 #include "wire.h"
00036
00037 #include "awsqlite.h"
00038
00192 typedef struct {
00193
00194 aw_handler_t
00195 handler_header;
00196
00197 aw_sqlite_state_t
00198 state;
00199
00200 aw_sqlite_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_sqlitehandler_t;
00225
00242 aw_sqlitehandler_t *aw_create_sqlitehandler(const aw_sqlite_cinfo_t *cinfo,
00243 const byte_t *sql,
00244 const byte_t *desc,
00245 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_sqlitehandler(aw_sqlitehandler_t *h);
00261
00262
00266 aw_handler_t *aw_wire_sqlitehandler(aw_wire_mkhandler_args_t *args);
00267
00268
00269 #endif
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280