summaryrefslogtreecommitdiffstats
path: root/pigeonhole/src/lib-sieve/plugins/ihave/ext-ihave-common.h
blob: 371d03d590a999228a014574795de0f688ecd0a3 (plain)
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
52
#ifndef EXT_IHAVE_COMMON_H
#define EXT_IHAVE_COMMON_H

#include "sieve-common.h"

/*
 * Extensions
 */

extern const struct sieve_extension_def ihave_extension;

/*
 * Tests
 */

extern const struct sieve_command_def ihave_test;

/*
 * Commands
 */

extern const struct sieve_command_def error_command;

/*
 * Operations
 */

enum ext_ihave_opcode {
	EXT_IHAVE_OPERATION_IHAVE,
	EXT_IHAVE_OPERATION_ERROR
};

extern const struct sieve_operation_def tst_ihave_operation;
extern const struct sieve_operation_def cmd_error_operation;

/*
 * AST context
 */

struct ext_ihave_ast_context {
  ARRAY(const char *) missing_extensions;
};

struct ext_ihave_ast_context *ext_ihave_get_ast_context
	(const struct sieve_extension *this_ext, struct sieve_ast *ast);

void ext_ihave_ast_add_missing_extension
	(const struct sieve_extension *this_ext, struct sieve_ast *ast,
		const char *ext_name);


#endif