1 // Copyright 2009 The Archiveopteryx Developers <info@aox.org>
2 
3 #ifndef MANAGESIEVE_H
4 #define MANAGESIEVE_H
5 
6 #include "saslconnection.h"
7 
8 class User;
9 class EString;
10 
11 
12 class ManageSieve
13     : public SaslConnection
14 {
15 public:
16     ManageSieve( int );
17 
18     enum State { Unauthorised, Authorised };
19     void setState( State );
20     State state() const;
21 
22     void parse();
23     void react( Event );
24 
25     void runCommands();
26 
27     void ok( const EString & );
28     void no( const EString & );
29     void send( const EString & );
30 
31     void setReserved( bool );
32     void setReader( class ManageSieveCommand * );
33 
34     void capabilities();
35 
36     virtual void sendChallenge( const EString & );
37 
38 private:
39     class ManageSieveData *d;
40 
41     void addCommand();
42 };
43 
44 
45 #endif
46