1 /*
2  * e-source-mail-account.h
3  *
4  * This library is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library. If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
19 #error "Only <libedataserver/libedataserver.h> should be included directly."
20 #endif
21 
22 #ifndef E_SOURCE_MAIL_ACCOUNT_H
23 #define E_SOURCE_MAIL_ACCOUNT_H
24 
25 #include <libedataserver/e-source-backend.h>
26 #include <libedataserver/e-source-enums.h>
27 
28 /* Standard GObject macros */
29 #define E_TYPE_SOURCE_MAIL_ACCOUNT \
30 	(e_source_mail_account_get_type ())
31 #define E_SOURCE_MAIL_ACCOUNT(obj) \
32 	(G_TYPE_CHECK_INSTANCE_CAST \
33 	((obj), E_TYPE_SOURCE_MAIL_ACCOUNT, ESourceMailAccount))
34 #define E_SOURCE_MAIL_ACCOUNT_CLASS(cls) \
35 	(G_TYPE_CHECK_CLASS_CAST \
36 	((cls), E_TYPE_SOURCE_MAIL_ACCOUNT, ESourceMailAccountClass))
37 #define E_IS_SOURCE_MAIL_ACCOUNT(obj) \
38 	(G_TYPE_CHECK_INSTANCE_TYPE \
39 	((obj), E_TYPE_SOURCE_MAIL_ACCOUNT))
40 #define E_IS_SOURCE_MAIL_ACCOUNT_CLASS(cls) \
41 	(G_TYPE_CHECK_CLASS_TYPE \
42 	((cls), E_TYPE_SOURCE_MAIL_ACCOUNT))
43 #define E_SOURCE_MAIL_ACCOUNT_GET_CLASS(obj) \
44 	(G_TYPE_INSTANCE_GET_CLASS \
45 	((obj), E_TYPE_SOURCE_MAIL_ACCOUNT, ESourceMailAccountClass))
46 
47 /**
48  * E_SOURCE_EXTENSION_MAIL_ACCOUNT:
49  *
50  * Pass this extension name to e_source_get_extension() to access
51  * #ESourceMailAccount.  This is also used as a group name in key files.
52  *
53  * Since: 3.6
54  **/
55 #define E_SOURCE_EXTENSION_MAIL_ACCOUNT "Mail Account"
56 
57 G_BEGIN_DECLS
58 
59 typedef struct _ESourceMailAccount ESourceMailAccount;
60 typedef struct _ESourceMailAccountClass ESourceMailAccountClass;
61 typedef struct _ESourceMailAccountPrivate ESourceMailAccountPrivate;
62 
63 /**
64  * ESourceMailAccount:
65  *
66  * Contains only private data that should be read and manipulated using the
67  * functions below.
68  *
69  * Since: 3.6
70  **/
71 struct _ESourceMailAccount {
72 	/*< private >*/
73 	ESourceBackend parent;
74 	ESourceMailAccountPrivate *priv;
75 };
76 
77 struct _ESourceMailAccountClass {
78 	ESourceBackendClass parent_class;
79 };
80 
81 GType		e_source_mail_account_get_type
82 					(void) G_GNUC_CONST;
83 const gchar *	e_source_mail_account_get_identity_uid
84 					(ESourceMailAccount *extension);
85 gchar *		e_source_mail_account_dup_identity_uid
86 					(ESourceMailAccount *extension);
87 void		e_source_mail_account_set_identity_uid
88 					(ESourceMailAccount *extension,
89 					 const gchar *identity_uid);
90 const gchar *	e_source_mail_account_get_archive_folder
91 					(ESourceMailAccount *extension);
92 gchar *		e_source_mail_account_dup_archive_folder
93 					(ESourceMailAccount *extension);
94 void		e_source_mail_account_set_archive_folder
95 					(ESourceMailAccount *extension,
96 					 const gchar *archive_folder);
97 gboolean	e_source_mail_account_get_needs_initial_setup
98 					(ESourceMailAccount *extension);
99 void		e_source_mail_account_set_needs_initial_setup
100 					(ESourceMailAccount *extension,
101 					 gboolean needs_initial_setup);
102 EThreeState	e_source_mail_account_get_mark_seen
103 					(ESourceMailAccount *extension);
104 void		e_source_mail_account_set_mark_seen
105 					(ESourceMailAccount *extension,
106 					 EThreeState mark_seen);
107 gint		e_source_mail_account_get_mark_seen_timeout
108 					(ESourceMailAccount *extension);
109 void		e_source_mail_account_set_mark_seen_timeout
110 					(ESourceMailAccount *extension,
111 					 gint timeout);
112 
113 G_END_DECLS
114 
115 #endif /* E_SOURCE_MAIL_ACCOUNT_H */
116