]> git.deb.at Git - pkg/abook.git/blob - filter.h
Upload 0.6.1-2 to unstable
[pkg/abook.git] / filter.h
1 #ifndef _FILTER_H
2 #define _FILTER_H
3
4 #include "database.h"
5
6 #define         FILTNAME_LEN    8
7 #define         FORMAT_STRING_LEN       512
8 #define         FORMAT_STRING_MAX_FIELDS        16
9
10
11 struct abook_output_filter {
12         char filtname[FILTNAME_LEN];
13         char *desc;
14         int (*func) (FILE *handle, struct db_enumerator e);
15 };
16
17 struct abook_output_item_filter {
18         char filtname[FILTNAME_LEN];
19         char *desc;
20         void (*func) (FILE *handle, int item);
21 };
22
23 struct abook_input_filter {
24         char filtname[FILTNAME_LEN];
25         char *desc;
26         int (*func) (FILE *handle);
27 };
28
29
30 int             import_database();
31 int             import_file(char filtname[FILTNAME_LEN], char *filename);
32
33 int             export_database();
34 int             export_file(char filtname[FILTNAME_LEN], char *filename);
35
36 struct abook_output_item_filter
37                 select_output_item_filter(char filtname[FILTNAME_LEN]);
38
39 void            e_write_item(FILE *out, int item, void (*func) (FILE *in, int item));
40 void            muttq_print_item(FILE *file, int item);
41
42 void            parse_custom_format(char *s, char *fmt_string, enum field_types *ft);
43 void            custom_print_item(FILE *out, int item);
44
45 int             fexport(char filtname[FILTNAME_LEN], FILE *handle,
46                 int enum_mode);
47
48 void            print_filters();
49
50 #endif