1
/* Copyright (c) 2002-2009 Dovecot Sieve authors, see the included COPYING file
4
#ifndef __SIEVE_SCRIPT_H
5
#define __SIEVE_SCRIPT_H
7
#include "sieve-common.h"
11
struct sieve_script *sieve_script_create
12
(const char *path, const char *name,
13
struct sieve_error_handler *ehandler, bool *exists_r);
15
void sieve_script_ref(struct sieve_script *script);
16
void sieve_script_unref(struct sieve_script **script);
18
/* Stream manageement */
20
struct istream *sieve_script_open(struct sieve_script *script, bool *deleted_r);
21
void sieve_script_close(struct sieve_script *script);
23
uoff_t sieve_script_get_size(struct sieve_script *script);
26
(struct sieve_script *script1, struct sieve_script *script2);
27
unsigned int sieve_script_hash(struct sieve_script *script);
28
bool sieve_script_older(struct sieve_script *script, time_t time);
30
static inline bool sieve_script_equals
31
(struct sieve_script *script1, struct sieve_script *script2)
33
return ( sieve_script_cmp(script1, script2) == 0 );
36
const char *sieve_script_name(struct sieve_script *script);
37
const char *sieve_script_filename(struct sieve_script *script);
38
const char *sieve_script_path(struct sieve_script *script);
39
const char *sieve_script_binpath(struct sieve_script *script);
41
#endif /* __SIEVE_SCRIPT_H */