/usr/include/dovecot/sieve/sieve-error-private.h is in dovecot-dev 1:2.2.9-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | /* Copyright (c) 2002-2013 Pigeonhole authors, see the included COPYING file
*/
#ifndef __SIEVE_ERROR_PRIVATE_H
#define __SIEVE_ERROR_PRIVATE_H
#include "sieve-error.h"
/*
* Types
*/
enum sieve_error_flags {
SIEVE_ERROR_FLAG_GLOBAL = (1 << 0),
SIEVE_ERROR_FLAG_GLOBAL_MAX_INFO = (1 << 1),
};
/*
* Initialization
*/
void sieve_errors_init(struct sieve_instance *svinst);
void sieve_errors_deinit(struct sieve_instance *svinst);
/*
* Error handler object
*/
struct sieve_error_handler {
pool_t pool;
int refcount;
struct sieve_instance *svinst;
struct sieve_error_handler *parent;
unsigned int max_errors;
unsigned int errors;
unsigned int warnings;
/* Should the errorhandler handle or discard info/debug log?
* (This does not influence the previous setting)
*/
bool log_info;
bool log_debug;
void (*verror)
(struct sieve_error_handler *ehandler, unsigned int flags,
const char *location, const char *fmt, va_list args);
void (*vwarning)
(struct sieve_error_handler *ehandler, unsigned int flags,
const char *location, const char *fmt, va_list args);
void (*vinfo)
(struct sieve_error_handler *ehandler, unsigned int flags,
const char *location, const char *fmt, va_list args);
void (*vdebug)
(struct sieve_error_handler *ehandler, unsigned int flags,
const char *location, const char *fmt, va_list args);
void (*free)
(struct sieve_error_handler *ehandler);
};
void sieve_error_handler_init
(struct sieve_error_handler *ehandler, struct sieve_instance *svinst,
pool_t pool, unsigned int max_errors);
void sieve_error_handler_init_from_parent
(struct sieve_error_handler *ehandler, pool_t pool,
struct sieve_error_handler *parent);
/*
* Direct handler calls
*/
void sieve_direct_verror
(struct sieve_instance *svinst, struct sieve_error_handler *ehandler,
unsigned int flags, const char *location, const char *fmt, va_list args);
void sieve_direct_vwarning
(struct sieve_instance *svinst, struct sieve_error_handler *ehandler,
unsigned int flags, const char *location, const char *fmt, va_list args);
void sieve_direct_vinfo
(struct sieve_instance *svinst, struct sieve_error_handler *ehandler,
unsigned int flags, const char *location, const char *fmt, va_list args);
void sieve_direct_vdebug
(struct sieve_instance *svinst, struct sieve_error_handler *ehandler,
unsigned int flags, const char *location, const char *fmt, va_list args);
static inline void sieve_direct_error
(struct sieve_instance *svinst, struct sieve_error_handler *ehandler,
unsigned int flags, const char *location, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
sieve_direct_verror(svinst, ehandler, flags, location, fmt, args);
va_end(args);
}
static inline void sieve_direct_warning
(struct sieve_instance *svinst, struct sieve_error_handler *ehandler,
unsigned int flags, const char *location, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
sieve_direct_vwarning(svinst, ehandler, flags, location, fmt, args);
va_end(args);
}
static inline void sieve_direct_info
(struct sieve_instance *svinst, struct sieve_error_handler *ehandler,
unsigned int flags, const char *location, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
sieve_direct_vinfo(svinst, ehandler, flags, location, fmt, args);
va_end(args);
}
static inline void sieve_direct_debug
(struct sieve_instance *svinst, struct sieve_error_handler *ehandler,
unsigned int flags, const char *location, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
sieve_direct_vdebug(svinst, ehandler, flags, location, fmt, args);
va_end(args);
}
#endif /* __SIEVE_ERROR_PRIVATE_H */
|