aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-xml.h
blob: a56b4baa2ef13ac627680a87ce6acc0b144348d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

#ifndef _FILTER_XML_H
#define _FILTER_XML_H

enum filter_xml_token {
    FILTER_XML_TEXT=0,
    FILTER_XML_RULE,
    FILTER_XML_CODE,
    FILTER_XML_DESC,
    FILTER_XML_RULESET,
    FILTER_XML_OPTION,
    FILTER_XML_OPTIONRULE,
    FILTER_XML_OPTIONSET,
    FILTER_XML_OPTIONVALUE,
    FILTER_XML_SOURCE,
    FILTER_XML_SEND,
    FILTER_XML_RECEIVE,
    FILTER_XML_ADDRESS,
    FILTER_XML_FOLDER,
    FILTER_XML_NAME,
    FILTER_XML_MATCH,
    FILTER_XML_ACTION,
    FILTER_XML_EXCEPT
};

struct filter_desc {
    int type;
    char *data;
    char *varname;      /* for named types */
    int vartype;
};

struct filter_rule {
    int type;
    char *name;
    char *code;
    GList *description;
};

struct filter_optionrule {
    struct filter_rule *rule;
    GList *args;        /* FilterArg objects */
};

struct filter_option {
    int type;       /* 'send' 'receive'? */
    GList *description; /* filter_desc */
    GList *options;     /* option_rule */
};

#endif /* ! _FILTER_XML_H */