Real fix for Coverity 1372362.
[claws.git] / src / plugins / managesieve / sieve_prefs.h
1 /*
2  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 2004-2015 the Claws Mail team
4  * Copyright (C) 2014-2015 Charles Lehner
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  * 
19  */
20
21 #ifndef SIEVE_PREFS_H
22 #define SIEVE_PREFS_H
23
24 typedef struct SieveConfig SieveConfig;
25 typedef struct SieveAccountConfig SieveAccountConfig;
26
27 #include "prefs_account.h"
28 #include "managesieve.h"
29
30 struct SieveConfig
31 {
32         gint            manager_win_width;
33         gint            manager_win_height;
34 };
35
36 struct SieveAccountConfig
37 {
38         gboolean        enable;
39         gboolean        use_host;
40         gchar           *host;
41         gboolean        use_port;
42         gushort         port;
43         SieveAuth       auth;
44         SieveAuthType   auth_type;
45         SieveTLSType    tls_type;
46         gchar           *userid;
47 };
48
49 extern SieveConfig sieve_config;
50
51 void sieve_prefs_init(void);
52 void sieve_prefs_done(void);
53 struct SieveAccountConfig *sieve_prefs_account_get_config(
54                 PrefsAccount *account);
55 void sieve_prefs_account_set_config(
56                 PrefsAccount *account, SieveAccountConfig *config);
57 void sieve_prefs_account_free_config(SieveAccountConfig *config);
58
59 #endif /* SIEVE_PREFS_H */