195 |
typedef int (*sieve_handler_t) (sieve_machine_t @var{mach}, |
typedef int (*sieve_handler_t) (sieve_machine_t @var{mach}, |
196 |
list_t @var{args}, list_t @var{tags}); |
list_t @var{args}, list_t @var{tags}); |
197 |
@end example |
@end example |
|
@end deftp |
|
198 |
|
|
199 |
The arguments to the handler have the following meaning: |
The arguments to the handler have the following meaning: |
200 |
|
|
206 |
@item tags |
@item tags |
207 |
A list of optional arguments (tags). |
A list of optional arguments (tags). |
208 |
@end table |
@end table |
209 |
|
@end deftp |
210 |
|
|
211 |
@deftp {Data Type} sieve_printf_t |
@deftp {Data Type} sieve_printf_t |
212 |
A pointer to a diagnostic output function. It is defined as follows: |
A pointer to a diagnostic output function. It is defined as follows: |
213 |
@example |
@example |
214 |
typedef int (*sieve_printf_t) (void *@var{data}, const char *@var{fmt}, va_list @var{ap}); |
typedef int (*sieve_printf_t) (void *@var{data}, const char *@var{fmt}, va_list @var{ap}); |
215 |
@end example |
@end example |
|
@end deftp |
|
216 |
|
|
217 |
@table @var |
@table @var |
218 |
@item data |
@item data |
223 |
@item ap |
@item ap |
224 |
Other arguments. |
Other arguments. |
225 |
@end table |
@end table |
226 |
|
@end deftp |
227 |
|
|
228 |
@deftp {Data Type} sieve_parse_error_t |
@deftp {Data Type} sieve_parse_error_t |
229 |
This data type is declared as follows: |
This data type is declared as follows: |
232 |
const char *@var{filename}, int @var{lineno}, |
const char *@var{filename}, int @var{lineno}, |
233 |
const char *@var{fmt}, va_list @var{ap}); |
const char *@var{fmt}, va_list @var{ap}); |
234 |
@end example |
@end example |
|
@end deftp |
|
235 |
|
|
236 |
It is used to declare error handlers for parsing errors. The |
It is used to declare error handlers for parsing errors. The |
237 |
application-specific data are passed in the @var{data} |
application-specific data are passed in the @var{data} |
238 |
argument. Arguments @var{filename} and @var{line} indicate the location |
argument. Arguments @var{filename} and @var{line} indicate the location |
239 |
of the error in the source text, while @var{fmt} and @var{ap} give |
of the error in the source text, while @var{fmt} and @var{ap} give |
240 |
verbose description of the error. |
verbose description of the error. |
241 |
|
@end deftp |
242 |
|
|
243 |
@deftp {Data Type} sieve_action_log_t |
@deftp {Data Type} sieve_action_log_t |
244 |
A pointer to the application-specific logging function: |
A pointer to the application-specific logging function: |
250 |
const char *@var{action}, |
const char *@var{action}, |
251 |
const char *@var{fmt}, va_list @var{ap}); |
const char *@var{fmt}, va_list @var{ap}); |
252 |
@end example |
@end example |
|
@end deftp |
|
253 |
|
|
254 |
@table @var |
@table @var |
255 |
@item data |
@item data |
272 |
@itemx var |
@itemx var |
273 |
These two arguments give the detailed description of the action. |
These two arguments give the detailed description of the action. |
274 |
@end table |
@end table |
275 |
|
@end deftp |
276 |
|
|
277 |
|
@deftp {Data Type} sieve_relcmp_t |
278 |
|
@deftpx {Data Type} sieve_relcmpn_t |
279 |
|
@example |
280 |
|
typedef int (*sieve_relcmp_t) (int, int); |
281 |
|
typedef int (*sieve_relcmpn_t) (size_t, size_t); |
282 |
|
@end example |
283 |
|
@end deftp |
284 |
|
|
285 |
@deftp {Data Type} sieve_comparator_t |
@deftp {Data Type} sieve_comparator_t |
286 |
@example |
@example |
571 |
@deftypefun int sieve_register_action (sieve_machine_t @var{mach}, const char *@var{name}, sieve_handler_t @var{handler}, sieve_data_type *@var{arg_types}, sieve_tag_group_t *@var{tags}, int @var{required}) |
@deftypefun int sieve_register_action (sieve_machine_t @var{mach}, const char *@var{name}, sieve_handler_t @var{handler}, sieve_data_type *@var{arg_types}, sieve_tag_group_t *@var{tags}, int @var{required}) |
572 |
@end deftypefun |
@end deftypefun |
573 |
|
|
574 |
@deftypefun int sieve_register_comparator (sieve_machine_t @var{mach}, const char *@var{name}, int @var{required}, sieve_comparator_t @var{is}, sieve_comparator_t @var{contains}, sieve_comparator_t @var{matches}, sieve_comparator_t @var{regex}) |
@deftypefun int sieve_register_comparator (sieve_machine_t @var{mach}, const char *@var{name}, int @var{required}, sieve_comparator_t @var{is}, sieve_comparator_t @var{contains}, sieve_comparator_t @var{matches}, sieve_comparator_t @var{regex}, sieve_comparator_t @var{eq}) |
575 |
@end deftypefun |
@end deftypefun |
576 |
|
|
577 |
@deftypefun int sieve_tag_lookup (list_t @var{taglist}, char *@var{name}, sieve_value_t **@var{arg}) |
@deftypefun int sieve_tag_lookup (list_t @var{taglist}, char *@var{name}, sieve_value_t **@var{arg}) |
1201 |
@item :regex |
@item :regex |
1202 |
The @code{:regex} version specifies a match using POSIX Extended Regular |
The @code{:regex} version specifies a match using POSIX Extended Regular |
1203 |
Expressions. |
Expressions. |
1204 |
|
|
1205 |
|
@item :value @var{relation} |
1206 |
|
The @code{:value} match type does a relational comparison between |
1207 |
|
strings. Valid values for @var{relation} are: |
1208 |
|
|
1209 |
|
@table @asis |
1210 |
|
@item "eq" |
1211 |
|
Equal |
1212 |
|
|
1213 |
|
@item "ne" |
1214 |
|
Not Equal |
1215 |
|
|
1216 |
|
@item "gt" |
1217 |
|
Greater Than |
1218 |
|
|
1219 |
|
@item "ge" |
1220 |
|
Greater than or Equal |
1221 |
|
|
1222 |
|
@item "lt" |
1223 |
|
Less Than |
1224 |
|
|
1225 |
|
@item "le" |
1226 |
|
Less than or Equal |
1227 |
|
@end table |
1228 |
|
|
1229 |
|
@item :count @var{relation} |
1230 |
|
This match type first determines the number of the specified entities |
1231 |
|
(headers, addresses, etc.) in the message and does a relational |
1232 |
|
comparison of the number of entities to the values specified in the |
1233 |
|
test expression. The test expression must be a list of one element. |
1234 |
@end table |
@end table |
1235 |
|
|
1236 |
@item comparator |
@item comparator |