4 * This program 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 2 of the License, or (at your option) version 3.
9 * This program 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.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with the program; if not, see <http://www.gnu.org/licenses/>
19 #ifndef E_SOURCE_OPENPGP_H
20 #define E_SOURCE_OPENPGP_H
22 #include <libedataserver/e-source-extension.h>
24 /* Standard GObject macros */
25 #define E_TYPE_SOURCE_OPENPGP \
26 (e_source_openpgp_get_type ())
27 #define E_SOURCE_OPENPGP(obj) \
28 (G_TYPE_CHECK_INSTANCE_CAST \
29 ((obj), E_TYPE_SOURCE_OPENPGP, ESourceOpenPGP))
30 #define E_SOURCE_OPENPGP_CLASS(cls) \
31 (G_TYPE_CHECK_CLASS_CAST \
32 ((cls), E_TYPE_SOURCE_OPENPGP, ESourceOpenPGPClass))
33 #define E_IS_SOURCE_OPENPGP(obj) \
34 (G_TYPE_CHECK_INSTANCE_TYPE \
35 ((obj), E_TYPE_SOURCE_OPENPGP))
36 #define E_IS_SOURCE_OPENPGP_CLASS(cls) \
37 (G_TYPE_CHECK_CLASS_TYPE \
38 ((cls), E_TYPE_SOURCE_OPENPGP))
39 #define E_SOURCE_OPENPGP_GET_CLASS(obj) \
40 (G_TYPE_INSTANCE_GET_CLASS \
41 ((obj), E_TYPE_SOURCE_OPENPGP, ESourceOpenPGPClass))
44 * E_SOURCE_EXTENSION_OPENPGP:
46 * Pass this extension name to e_source_get_extension() to access
47 * #ESourceOpenPGP. This is also used as a group name in key files.
51 #define E_SOURCE_EXTENSION_OPENPGP "Pretty Good Privacy (OpenPGP)"
55 typedef struct _ESourceOpenPGP ESourceOpenPGP;
56 typedef struct _ESourceOpenPGPClass ESourceOpenPGPClass;
57 typedef struct _ESourceOpenPGPPrivate ESourceOpenPGPPrivate;
62 * Contains only private data that should be read and manipulated using the
67 struct _ESourceOpenPGP {
68 ESourceExtension parent;
69 ESourceOpenPGPPrivate *priv;
72 struct _ESourceOpenPGPClass {
73 ESourceExtensionClass parent_class;
76 GType e_source_openpgp_get_type (void) G_GNUC_CONST;
77 gboolean e_source_openpgp_get_always_trust
78 (ESourceOpenPGP *extension);
79 void e_source_openpgp_set_always_trust
80 (ESourceOpenPGP *extension,
81 gboolean always_trust);
82 gboolean e_source_openpgp_get_encrypt_to_self
83 (ESourceOpenPGP *extension);
84 void e_source_openpgp_set_encrypt_to_self
85 (ESourceOpenPGP *extension,
86 gboolean encrypt_to_self);
87 const gchar * e_source_openpgp_get_key_id (ESourceOpenPGP *extension);
88 gchar * e_source_openpgp_dup_key_id (ESourceOpenPGP *extension);
89 void e_source_openpgp_set_key_id (ESourceOpenPGP *extension,
91 const gchar * e_source_openpgp_get_signing_algorithm
92 (ESourceOpenPGP *extension);
93 gchar * e_source_openpgp_dup_signing_algorithm
94 (ESourceOpenPGP *extension);
95 void e_source_openpgp_set_signing_algorithm
96 (ESourceOpenPGP *extension,
97 const gchar *signing_algorithm);
98 gboolean e_source_openpgp_get_sign_by_default
99 (ESourceOpenPGP *extension);
100 void e_source_openpgp_set_sign_by_default
101 (ESourceOpenPGP *extension,
102 gboolean sign_by_default);
106 #endif /* E_SOURCE_OPENPGP_H */