diff options
Diffstat (limited to 'src/mimehooks.h')
-rw-r--r-- | src/mimehooks.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mimehooks.h b/src/mimehooks.h new file mode 100644 index 00000000..c78a3c86 --- /dev/null +++ b/src/mimehooks.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <the_Foundation/audience.h> | ||
4 | #include <the_Foundation/ptrarray.h> | ||
5 | #include <the_Foundation/regexp.h> | ||
6 | #include <the_Foundation/string.h> | ||
7 | |||
8 | iDeclareType(FilterHook) | ||
9 | iDeclareTypeConstruction(FilterHook) | ||
10 | |||
11 | struct Impl_FilterHook { | ||
12 | iString label; | ||
13 | iString mimePattern; | ||
14 | iRegExp *mimeRegex; | ||
15 | iString command; | ||
16 | }; | ||
17 | |||
18 | void setMimePattern_FilterHook (iFilterHook *, const iString *pattern); | ||
19 | void setCommand_FilterHook (iFilterHook *, const iString *command); | ||
20 | |||
21 | /*----------------------------------------------------------------------------------------------*/ | ||
22 | |||
23 | iDeclareType(MimeHooks) | ||
24 | iDeclareTypeConstruction(MimeHooks) | ||
25 | |||
26 | iBool willTryFilter_MimeHooks (const iMimeHooks *, const iString *mime); | ||
27 | iBlock * tryFilter_MimeHooks (const iMimeHooks *, const iString *mime, | ||
28 | const iBlock *body); | ||
29 | |||
30 | void load_MimeHooks (iMimeHooks *, const char *saveDir); | ||
31 | void save_MimeHooks (const iMimeHooks *); | ||