1 /* GNU Mailutils -- a suite of utilities for electronic mail
2    Copyright (C) 2009-2021 Free Software Foundation, Inc.
3 
4    This library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 3 of the License, or (at your option) any later version.
8 
9    This library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
13 
14    You should have received a copy of the GNU Lesser General
15    Public License along with this library.  If not, see
16    <http://www.gnu.org/licenses/>. */
17 
18 #ifndef _MUCPP_SIEVE_H
19 #define _MUCPP_SIEVE_H
20 
21 #include <string>
22 #include <errno.h>
23 #include <mailutils/sieve.h>
24 #include <mailutils/cpp/error.h>
25 #include <mailutils/cpp/mailbox.h>
26 #include <mailutils/cpp/message.h>
27 
28 namespace mailutils
29 {
30 
31 class SieveMachine
32 {
33  protected:
34   mu_sieve_machine_t mach;
35 
36  public:
37   SieveMachine ();
38   SieveMachine (const mu_sieve_machine_t);
39   ~SieveMachine ();
40 
41   SieveMachine& operator = (const SieveMachine&);
42 
43   void compile (const std::string& name);
44   void disass ();
45   void mailbox (const Mailbox& mbox);
46   void message (const Message& msg);
47   void set_logger (mu_sieve_action_log_t printer);
48 };
49 
50 }
51 
52 #endif // not _MUCPP_SIEVE_H
53 
54