1 /*
2  * e-source-smime.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_SMIME_H
23 #define E_SOURCE_SMIME_H
24 
25 #include <libedataserver/e-source-extension.h>
26 
27 /* Standard GObject macros */
28 #define E_TYPE_SOURCE_SMIME \
29 	(e_source_smime_get_type ())
30 #define E_SOURCE_SMIME(obj) \
31 	(G_TYPE_CHECK_INSTANCE_CAST \
32 	((obj), E_TYPE_SOURCE_SMIME, ESourceSMIME))
33 #define E_SOURCE_SMIME_CLASS(cls) \
34 	(G_TYPE_CHECK_CLASS_CAST \
35 	((cls), E_TYPE_SOURCE_SMIME, ESourceSMIMEClass))
36 #define E_IS_SOURCE_SMIME(obj) \
37 	(G_TYPE_CHECK_INSTANCE_TYPE \
38 	((obj), E_TYPE_SOURCE_SMIME))
39 #define E_IS_SOURCE_SMIME_CLASS(cls) \
40 	(G_TYPE_CHECK_CLASS_TYPE \
41 	((cls), E_TYPE_SOURCE_SMIME))
42 #define E_SOURCE_SMIME_GET_CLASS(obj) \
43 	(G_TYPE_INSTANCE_GET_CLASS \
44 	((obj), E_TYPE_SOURCE_SMIME, ESourceSMIMEClass))
45 
46 /**
47  * E_SOURCE_EXTENSION_SMIME:
48  *
49  * Pass this extension name to e_source_get_extension() to access
50  * #ESourceSMIME.  This is also used as a group name in key files.
51  *
52  * Since: 3.6
53  **/
54 #define E_SOURCE_EXTENSION_SMIME "Secure MIME (S/MIME)"
55 
56 G_BEGIN_DECLS
57 
58 typedef struct _ESourceSMIME ESourceSMIME;
59 typedef struct _ESourceSMIMEClass ESourceSMIMEClass;
60 typedef struct _ESourceSMIMEPrivate ESourceSMIMEPrivate;
61 
62 /**
63  * ESourceSMIME:
64  *
65  * Contains only private data that should be read and manipulated using the
66  * functions below.
67  *
68  * Since: 3.6
69  **/
70 struct _ESourceSMIME {
71 	/*< private >*/
72 	ESourceExtension parent;
73 	ESourceSMIMEPrivate *priv;
74 };
75 
76 struct _ESourceSMIMEClass {
77 	ESourceExtensionClass parent_class;
78 };
79 
80 GType		e_source_smime_get_type		(void) G_GNUC_CONST;
81 const gchar *	e_source_smime_get_encryption_certificate
82 						(ESourceSMIME *extension);
83 gchar *		e_source_smime_dup_encryption_certificate
84 						(ESourceSMIME *extension);
85 void		e_source_smime_set_encryption_certificate
86 						(ESourceSMIME *extension,
87 						 const gchar *encryption_certificate);
88 gboolean	e_source_smime_get_encrypt_by_default
89 						(ESourceSMIME *extension);
90 void		e_source_smime_set_encrypt_by_default
91 						(ESourceSMIME *extension,
92 						 gboolean encrypt_by_default);
93 gboolean	e_source_smime_get_encrypt_to_self
94 						(ESourceSMIME *extension);
95 void		e_source_smime_set_encrypt_to_self
96 						(ESourceSMIME *extension,
97 						 gboolean encrypt_to_self);
98 const gchar *	e_source_smime_get_signing_algorithm
99 						(ESourceSMIME *extension);
100 gchar *		e_source_smime_dup_signing_algorithm
101 						(ESourceSMIME *extension);
102 void		e_source_smime_set_signing_algorithm
103 						(ESourceSMIME *extension,
104 						 const gchar *signing_algorithm);
105 const gchar *	e_source_smime_get_signing_certificate
106 						(ESourceSMIME *extension);
107 gchar *		e_source_smime_dup_signing_certificate
108 						(ESourceSMIME *extension);
109 void		e_source_smime_set_signing_certificate
110 						(ESourceSMIME *extension,
111 						 const gchar *signing_certificate);
112 gboolean	e_source_smime_get_sign_by_default
113 						(ESourceSMIME *extension);
114 void		e_source_smime_set_sign_by_default
115 						(ESourceSMIME *extension,
116 						 gboolean sign_by_default);
117 
118 G_END_DECLS
119 
120 #endif /* E_SOURCE_SMIME_H */
121 
122