1 #ifndef EXT_IHAVE_COMMON_H 2 #define EXT_IHAVE_COMMON_H 3 4 #include "sieve-common.h" 5 6 /* 7 * Extensions 8 */ 9 10 extern const struct sieve_extension_def ihave_extension; 11 12 /* 13 * Tests 14 */ 15 16 extern const struct sieve_command_def ihave_test; 17 18 /* 19 * Commands 20 */ 21 22 extern const struct sieve_command_def error_command; 23 24 /* 25 * Operations 26 */ 27 28 enum ext_ihave_opcode { 29 EXT_IHAVE_OPERATION_IHAVE, 30 EXT_IHAVE_OPERATION_ERROR 31 }; 32 33 extern const struct sieve_operation_def tst_ihave_operation; 34 extern const struct sieve_operation_def cmd_error_operation; 35 36 /* 37 * AST context 38 */ 39 40 struct ext_ihave_ast_context { 41 ARRAY(const char *) missing_extensions; 42 }; 43 44 struct ext_ihave_ast_context *ext_ihave_get_ast_context 45 (const struct sieve_extension *this_ext, struct sieve_ast *ast); 46 47 void ext_ihave_ast_add_missing_extension 48 (const struct sieve_extension *this_ext, struct sieve_ast *ast, 49 const char *ext_name); 50 51 52 #endif 53