Add new ESource classes.
[platform/upstream/evolution-data-server.git] / libedataserver / e-source-mail-signature.h
1 /*
2  * e-source-mail-signature.h
3  *
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.
8  *
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.
13  *
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/>
16  *
17  */
18
19 #ifndef E_SOURCE_MAIL_SIGNATURE_H
20 #define E_SOURCE_MAIL_SIGNATURE_H
21
22 #include <libedataserver/e-source-extension.h>
23
24 /* Standard GObject macros */
25 #define E_TYPE_SOURCE_MAIL_SIGNATURE \
26         (e_source_mail_signature_get_type ())
27 #define E_SOURCE_MAIL_SIGNATURE(obj) \
28         (G_TYPE_CHECK_INSTANCE_CAST \
29         ((obj), E_TYPE_SOURCE_MAIL_SIGNATURE, ESourceMailSignature))
30 #define E_SOURCE_MAIL_SIGNATURE_CLASS(cls) \
31         (G_TYPE_CHECK_CLASS_CAST \
32         ((cls), E_TYPE_SOURCE_MAIL_SIGNATURE, ESourceMailSignatureClass))
33 #define E_IS_SOURCE_MAIL_SIGNATURE(obj) \
34         (G_TYPE_CHECK_INSTANCE_TYPE \
35         ((obj), E_TYPE_SOURCE_MAIL_SIGNATURE))
36 #define E_IS_SOURCE_MAIL_SIGNATURE_CLASS(cls) \
37         (G_TYPE_CHECK_CLASS_TYPE \
38         ((cls), E_TYPE_SOURCE_MAIL_SIGNATURE))
39 #define E_SOURCE_MAIL_SIGNATURE_GET_CLASS(obj) \
40         (G_TYPE_INSTANCE_GET_CLASS \
41         ((obj), E_TYPE_SOURCE_MAIL_SIGNATURE, ESourceMailSignatureClass))
42
43 /**
44  * E_SOURCE_EXTENSION_MAIL_SIGNATURE:
45  *
46  * Pass this extension name to e_source_get_extension() to access
47  * #ESourceMailSignature.  This is also used as a group name in key files.
48  *
49  * Since: 3.6
50  **/
51 #define E_SOURCE_EXTENSION_MAIL_SIGNATURE "Mail Signature"
52
53 G_BEGIN_DECLS
54
55 typedef struct _ESourceMailSignature ESourceMailSignature;
56 typedef struct _ESourceMailSignatureClass ESourceMailSignatureClass;
57 typedef struct _ESourceMailSignaturePrivate ESourceMailSignaturePrivate;
58
59 /**
60  * ESourceMailSignature:
61  *
62  * Contains only private data that should be read and manipulated using the
63  * function below.
64  *
65  * Since: 3.6
66  **/
67 struct _ESourceMailSignature {
68         ESourceExtension parent;
69         ESourceMailSignaturePrivate *priv;
70 };
71
72 struct _ESourceMailSignatureClass {
73         ESourceExtensionClass parent_class;
74 };
75
76 GType           e_source_mail_signature_get_type
77                                         (void) G_GNUC_CONST;
78 GFile *         e_source_mail_signature_get_file
79                                         (ESourceMailSignature *extension);
80 const gchar *   e_source_mail_signature_get_mime_type
81                                         (ESourceMailSignature *extension);
82 gchar *         e_source_mail_signature_dup_mime_type
83                                         (ESourceMailSignature *extension);
84 void            e_source_mail_signature_set_mime_type
85                                         (ESourceMailSignature *extension,
86                                          const gchar *mime_type);
87
88 gboolean        e_source_mail_signature_load_sync
89                                         (ESource *source,
90                                          gchar **contents,
91                                          gsize *length,
92                                          GCancellable *cancellable,
93                                          GError **error);
94 void            e_source_mail_signature_load
95                                         (ESource *source,
96                                          gint io_priority,
97                                          GCancellable *cancellable,
98                                          GAsyncReadyCallback callback,
99                                          gpointer user_data);
100 gboolean        e_source_mail_signature_load_finish
101                                         (ESource *source,
102                                          GAsyncResult *result,
103                                          gchar **contents,
104                                          gsize *length,
105                                          GError **error);
106 gboolean        e_source_mail_signature_replace_sync
107                                         (ESource *source,
108                                          const gchar *contents,
109                                          gsize length,
110                                          GCancellable *cancellable,
111                                          GError **error);
112 void            e_source_mail_signature_replace
113                                         (ESource *source,
114                                          const gchar *contents,
115                                          gsize length,
116                                          gint io_priority,
117                                          GCancellable *cancellable,
118                                          GAsyncReadyCallback callback,
119                                          gpointer user_data);
120 gboolean        e_source_mail_signature_replace_finish
121                                         (ESource *source,
122                                          GAsyncResult *result,
123                                          GError **error);
124 gboolean        e_source_mail_signature_symlink_sync
125                                         (ESource *source,
126                                          const gchar *symlink_target,
127                                          GCancellable *cancellable,
128                                          GError **error);
129 void            e_source_mail_signature_symlink
130                                         (ESource *source,
131                                          const gchar *symlink_target,
132                                          gint io_priority,
133                                          GCancellable *cancellable,
134                                          GAsyncReadyCallback callback,
135                                          gpointer user_data);
136 gboolean        e_source_mail_signature_symlink_finish
137                                         (ESource *source,
138                                          GAsyncResult *result,
139                                          GError **error);
140
141 G_END_DECLS
142
143 #endif /* E_SOURCE_MAIL_SIGNATURE_H */