Commit 98011160 98011160928d6891abb5af1d67ebf2a6124e558b by Sergey Poznyakoff

New sieve machine accessor functions

* include/mailutils/sieve.h (mu_sieve_get_mailbox)
(mu_sieve_get_argc): New protos.
* libmu_sieve/runtime.c: New functions.
1 parent 151eb4b9
...@@ -279,9 +279,13 @@ void mu_sieve_set_data (mu_sieve_machine_t mach, void *); ...@@ -279,9 +279,13 @@ void mu_sieve_set_data (mu_sieve_machine_t mach, void *);
279 mu_message_t mu_sieve_get_message (mu_sieve_machine_t mach); 279 mu_message_t mu_sieve_get_message (mu_sieve_machine_t mach);
280 size_t mu_sieve_get_message_num (mu_sieve_machine_t mach); 280 size_t mu_sieve_get_message_num (mu_sieve_machine_t mach);
281 281
282 mu_mailbox_t mu_sieve_get_mailbox (mu_sieve_machine_t mach);
283
282 int mu_sieve_is_dry_run (mu_sieve_machine_t mach); 284 int mu_sieve_is_dry_run (mu_sieve_machine_t mach);
283 int mu_sieve_set_dry_run (mu_sieve_machine_t mach, int val); 285 int mu_sieve_set_dry_run (mu_sieve_machine_t mach, int val);
284 286
287 void mu_sieve_get_argc (mu_sieve_machine_t mach, size_t *args, size_t *tags);
288
285 mu_mailer_t mu_sieve_get_mailer (mu_sieve_machine_t mach); 289 mu_mailer_t mu_sieve_get_mailer (mu_sieve_machine_t mach);
286 int mu_sieve_get_locus (mu_sieve_machine_t mach, struct mu_locus *); 290 int mu_sieve_get_locus (mu_sieve_machine_t mach, struct mu_locus *);
287 char *mu_sieve_get_daemon_email (mu_sieve_machine_t mach); 291 char *mu_sieve_get_daemon_email (mu_sieve_machine_t mach);
......
...@@ -183,6 +183,12 @@ mu_sieve_get_locus (mu_sieve_machine_t mach, struct mu_locus *loc) ...@@ -183,6 +183,12 @@ mu_sieve_get_locus (mu_sieve_machine_t mach, struct mu_locus *loc)
183 return 1; 183 return 1;
184 } 184 }
185 185
186 mu_mailbox_t
187 mu_sieve_get_mailbox (mu_sieve_machine_t mach)
188 {
189 return mach->mailbox;
190 }
191
186 mu_message_t 192 mu_message_t
187 mu_sieve_get_message (mu_sieve_machine_t mach) 193 mu_sieve_get_message (mu_sieve_machine_t mach)
188 { 194 {
...@@ -203,6 +209,15 @@ mu_sieve_get_identifier (mu_sieve_machine_t mach) ...@@ -203,6 +209,15 @@ mu_sieve_get_identifier (mu_sieve_machine_t mach)
203 return mach->identifier; 209 return mach->identifier;
204 } 210 }
205 211
212 void
213 mu_sieve_get_argc (mu_sieve_machine_t mach, size_t *args, size_t *tags)
214 {
215 if (args)
216 *args = mach->argcount;
217 if (tags)
218 *tags = mach->tagcount;
219 }
220
206 int 221 int
207 mu_sieve_is_dry_run (mu_sieve_machine_t mach) 222 mu_sieve_is_dry_run (mu_sieve_machine_t mach)
208 { 223 {
......