]>
jfr.im git - irc/quakenet/newserv.git/blob - newsearch/newsearch.h
1519dd4e65310cb88938d5af79a49b0ab0609bf5
2 #define SEARCHTYPE_CHANNEL 1
3 #define SEARCHTYPE_NICK 2
6 #define RETURNTYPE_BOOL 0x01
7 #define RETURNTYPE_INT 0x02
8 #define RETURNTYPE_STRING 0x03
9 #define RETURNTYPE_TYPE 0xFF
10 #define RETURNTYPE_CONST 0x100
14 typedef struct searchNode
*(*parseFunc
)(int, int, char **);
15 typedef void (*freeFunc
)(struct searchNode
*);
16 typedef void *(*exeFunc
)(struct searchNode
*, int, void *);
19 struct searchNode
*and_parse(int type
, int argc
, char **argv
);
20 struct searchNode
*not_parse(int type
, int argc
, char **argv
);
21 struct searchNode
*or_parse(int type
, int argc
, char **argv
);
22 struct searchNode
*eq_parse(int type
, int argc
, char **argv
);
23 struct searchNode
*lt_parse(int type
, int argc
, char **argv
);
24 struct searchNode
*gt_parse(int type
, int argc
, char **argv
);
25 struct searchNode
*match_parse(int type
, int argc
, char **argv
);
26 struct searchNode
*regex_parse(int type
, int argc
, char **argv
);
27 struct searchNode
*hostmask_parse(int type
, int argc
, char **argv
);
28 struct searchNode
*modes_parse(int type
, int argc
, char **argv
);
29 struct searchNode
*realname_parse(int type
, int argc
, char **argv
);
30 struct searchNode
*nick_parse(int type
, int argc
, char **argv
);
31 struct searchNode
*ident_parse(int type
, int argc
, char **argv
);
32 struct searchNode
*host_parse(int type
, int argc
, char **argv
);
33 struct searchNode
*channel_parse(int type
, int argc
, char **argv
);
34 struct searchNode
*timestamp_parse(int type
, int argc
, char **argv
);
37 struct searchNode
*search_parse(int type
, char *input
);
39 /* Registration functions */
40 void registersearchterm(char *term
, parseFunc parsefunc
);
41 void deregistersearchterm(char *term
, parseFunc parsefunc
);
43 void *trueval(int type
);
44 void *falseval(int type
);
47 typedef struct searchNode
{
54 extern const char *parseError
;