1 /*
2  * e-source-mail-identity.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_IDENTITY_H
23 #define E_SOURCE_MAIL_IDENTITY_H
24 
25 #include <libedataserver/e-source-extension.h>
26 
27 /* Standard GObject macros */
28 #define E_TYPE_SOURCE_MAIL_IDENTITY \
29 	(e_source_mail_identity_get_type ())
30 #define E_SOURCE_MAIL_IDENTITY(obj) \
31 	(G_TYPE_CHECK_INSTANCE_CAST \
32 	((obj), E_TYPE_SOURCE_MAIL_IDENTITY, ESourceMailIdentity))
33 #define E_SOURCE_MAIL_IDENTITY_CLASS(cls) \
34 	(G_TYPE_CHECK_CLASS_CAST \
35 	((cls), E_TYPE_SOURCE_MAIL_IDENTITY, ESourceMailIdentityClass))
36 #define E_IS_SOURCE_MAIL_IDENTITY(obj) \
37 	(G_TYPE_CHECK_INSTANCE_TYPE \
38 	((obj), E_TYPE_SOURCE_MAIL_IDENTITY))
39 #define E_IS_SOURCE_MAIL_IDENTITY_CLASS(cls) \
40 	(G_TYPE_CHECK_CLASS_TYPE \
41 	((cls), E_TYPE_SOURCE_MAIL_IDENTITY))
42 #define E_SOURCE_MAIL_IDENTITY_GET_CLASS(obj) \
43 	(G_TYPE_INSTANCE_GET_CLASS \
44 	((obj), E_TYPE_SOURCE_MAIL_IDENTITY, ESourceMailIdentityClass))
45 
46 /**
47  * E_SOURCE_EXTENSION_MAIL_IDENTITY:
48  *
49  * Pass this extension name to e_source_get_extension() to access
50  * #ESourceMailIdentity.  This is also used as a group name in key files.
51  *
52  * Since: 3.6
53  **/
54 #define E_SOURCE_EXTENSION_MAIL_IDENTITY "Mail Identity"
55 
56 G_BEGIN_DECLS
57 
58 typedef struct _ESourceMailIdentity ESourceMailIdentity;
59 typedef struct _ESourceMailIdentityClass ESourceMailIdentityClass;
60 typedef struct _ESourceMailIdentityPrivate ESourceMailIdentityPrivate;
61 
62 /**
63  * ESourceMailIdentity:
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 _ESourceMailIdentity {
71 	/*< private >*/
72 	ESourceExtension parent;
73 	ESourceMailIdentityPrivate *priv;
74 };
75 
76 struct _ESourceMailIdentityClass {
77 	ESourceExtensionClass parent_class;
78 };
79 
80 GType		e_source_mail_identity_get_type
81 					(void) G_GNUC_CONST;
82 const gchar *	e_source_mail_identity_get_address
83 					(ESourceMailIdentity *extension);
84 gchar *		e_source_mail_identity_dup_address
85 					(ESourceMailIdentity *extension);
86 void		e_source_mail_identity_set_address
87 					(ESourceMailIdentity *extension,
88 					 const gchar *address);
89 const gchar *	e_source_mail_identity_get_name
90 					(ESourceMailIdentity *extension);
91 gchar *		e_source_mail_identity_dup_name
92 					(ESourceMailIdentity *extension);
93 void		e_source_mail_identity_set_name
94 					(ESourceMailIdentity *extension,
95 					 const gchar *name);
96 const gchar *	e_source_mail_identity_get_organization
97 					(ESourceMailIdentity *extension);
98 gchar *		e_source_mail_identity_dup_organization
99 					(ESourceMailIdentity *extension);
100 void		e_source_mail_identity_set_organization
101 					(ESourceMailIdentity *extension,
102 					 const gchar *organization);
103 const gchar *	e_source_mail_identity_get_reply_to
104 					(ESourceMailIdentity *extension);
105 gchar *		e_source_mail_identity_dup_reply_to
106 					(ESourceMailIdentity *extension);
107 void		e_source_mail_identity_set_reply_to
108 					(ESourceMailIdentity *extension,
109 					 const gchar *reply_to);
110 const gchar *	e_source_mail_identity_get_signature_uid
111 					(ESourceMailIdentity *extension);
112 gchar *		e_source_mail_identity_dup_signature_uid
113 					(ESourceMailIdentity *extension);
114 void		e_source_mail_identity_set_signature_uid
115 					(ESourceMailIdentity *extension,
116 					 const gchar *signature_uid);
117 const gchar *	e_source_mail_identity_get_aliases
118 					(ESourceMailIdentity *extension);
119 gchar *		e_source_mail_identity_dup_aliases
120 					(ESourceMailIdentity *extension);
121 void		e_source_mail_identity_set_aliases
122 					(ESourceMailIdentity *extension,
123 					 const gchar *aliases);
124 GHashTable *	e_source_mail_identity_get_aliases_as_hash_table
125 					(ESourceMailIdentity *extension);
126 
127 G_END_DECLS
128 
129 #endif /* E_SOURCE_MAIL_IDENTITY_H */
130