~ubuntu-branches/ubuntu/quantal/dovecot/quantal

« back to all changes in this revision

Viewing changes to sieve/src/lib-sieve/sieve-binary.h

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-29 09:21:32 UTC
  • mfrom: (4.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20100629092132-q4pr5lfuvmjqou19
Tags: 1:1.2.12-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  + Add mail-stack-delivery as per server-maverick-mail-integration spec:
   - Update debian/rules
   - Convert existing package to a dummy package and add new binary in debian/control
   - Update maintainer scripts.
   - Move previously installed backups and config files to new package name
     space in preinst
   - Add new debian/mail-stack-delivery.prerm to handle downgrades
   - Rename debian/dovecot-postfix.* to debian/mail-stack-delivery.*
  + Use Snakeoil SSL certificates by default.
    - debian/control: Depend on ssl-cert.
    - debian/patches/ssl-cert-snakeoil.dpatch: Change default SSL cert paths to snakeoil.
    - debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - Created debian/dovecot-common.ufw.profile.
    - debian/rules: install profile.
    - debian/control: suggest ufw.
  + debian/{control,rules}: enable PIE hardening.
  + debian/control: Update Vcs-* headers.
  + Add SMTP-AUTH support for Outlook (login auth mechanism) 
  + debian/dovecot-common.dirs: Added usr/share/doc/dovecot-common
  + debian/patches/fix-dovecot-config-parser.patch: Fix ordering of external config 
    files. (LP: #597818)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
/*
12
12
 * Binary object
13
13
 */
14
 
 
 
14
 
15
15
struct sieve_binary;
16
16
 
17
17
struct sieve_binary *sieve_binary_create_new(struct sieve_script *script);
34
34
 
35
35
/*
36
36
 * Activation after code generation
37
 
 */ 
38
 
 
 
37
 */
 
38
 
39
39
void sieve_binary_activate(struct sieve_binary *sbin);
40
40
 
41
 
/* 
 
41
/*
42
42
 * Saving the binary
43
43
 */
44
 
 
 
44
 
45
45
bool sieve_binary_save
46
46
        (struct sieve_binary *sbin, const char *path);
47
 
        
48
 
/* 
 
47
 
 
48
/*
49
49
 * Loading the binary
50
 
 */ 
51
 
        
 
50
 */
 
51
 
52
52
struct sieve_binary *sieve_binary_open
53
 
        (struct sieve_instance *svinst, const char *path, 
 
53
        (struct sieve_instance *svinst, const char *path,
54
54
                struct sieve_script *script);
55
55
bool sieve_binary_up_to_date(struct sieve_binary *sbin);
56
56
bool sieve_binary_load(struct sieve_binary *sbin);
57
 
        
58
 
/* 
59
 
 * Block management 
 
57
 
 
58
/*
 
59
 * Block management
60
60
 */
61
 
 
 
61
 
62
62
enum sieve_binary_system_block {
63
63
        SBIN_SYSBLOCK_EXTENSIONS,
64
64
        SBIN_SYSBLOCK_MAIN_PROGRAM,
70
70
unsigned int sieve_binary_block_create(struct sieve_binary *sbin);
71
71
void sieve_binary_block_clear
72
72
        (struct sieve_binary *sbin, unsigned int id);
73
 
        
74
 
/* 
75
 
 * Extension support 
 
73
 
 
74
/*
 
75
 * Extension support
76
76
 */
77
 
 
 
77
 
78
78
struct sieve_binary_extension {
79
79
        const struct sieve_extension_def *extension;
80
80
 
83
83
                        void *context);
84
84
        bool (*binary_open)
85
85
                (const struct sieve_extension *ext, struct sieve_binary *sbin,
86
 
                        void *context); 
 
86
                        void *context);
87
87
 
88
88
        void (*binary_free)
89
89
                (const struct sieve_extension *ext, struct sieve_binary *sbin,
90
 
                        void *context); 
91
 
        
 
90
                        void *context);
 
91
 
92
92
        bool (*binary_up_to_date)
93
93
                (const struct sieve_extension *ext, struct sieve_binary *sbin,
94
 
                        void *context); 
 
94
                        void *context);
95
95
};
96
 
 
 
96
 
97
97
void sieve_binary_extension_set_context
98
98
        (struct sieve_binary *sbin, const struct sieve_extension *ext, void *context);
99
99
const void *sieve_binary_extension_get_context
100
100
        (struct sieve_binary *sbin, const struct sieve_extension *ext);
101
 
        
 
101
 
102
102
void sieve_binary_extension_set
103
103
        (struct sieve_binary *sbin, const struct sieve_extension *ext,
104
104
                const struct sieve_binary_extension *bext, void *context);
116
116
        (struct sieve_binary *sbin, const struct sieve_extension *ext);
117
117
int sieve_binary_extensions_count(struct sieve_binary *sbin);
118
118
 
119
 
        
120
 
/* 
121
 
 * Code emission 
 
119
 
 
120
/*
 
121
 * Code emission
122
122
 */
123
 
 
 
123
 
124
124
/* Low-level emission functions */
125
125
 
126
126
sieve_size_t sieve_binary_emit_data
128
128
sieve_size_t sieve_binary_emit_byte
129
129
        (struct sieve_binary *binary, unsigned char byte);
130
130
void sieve_binary_update_data
131
 
        (struct sieve_binary *binary, sieve_size_t address, const void *data, 
 
131
        (struct sieve_binary *binary, sieve_size_t address, const void *data,
132
132
                sieve_size_t size);
133
133
sieve_size_t sieve_binary_get_code_size(struct sieve_binary *binary);
134
134
 
164
164
        (struct sieve_binary *sbin, const struct sieve_extension_objects *objs,
165
165
        unsigned int code);
166
166
 
167
 
/* 
168
 
 * Code retrieval 
 
167
/*
 
168
 * Code retrieval
169
169
 */
170
170
 
171
171
/* Literals */
176
176
bool sieve_binary_read_offset
177
177
        (struct sieve_binary *binary, sieve_size_t *address, int *offset_r);
178
178
bool sieve_binary_read_integer
179
 
  (struct sieve_binary *binary, sieve_size_t *address, sieve_number_t *int_r); 
 
179
  (struct sieve_binary *binary, sieve_size_t *address, sieve_number_t *int_r);
180
180
bool sieve_binary_read_string
181
181
  (struct sieve_binary *binary, sieve_size_t *address, string_t **str_r);
182
182