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 #if !defined (__LIBEBACKEND_H_INSIDE__) && !defined (LIBEBACKEND_COMPILATION)
20 #error "Only <libebackend/libebackend.h> should be included directly."
26 #include <libedataserver/libedataserver.h>
28 /* Standard GObject macros */
29 #define E_TYPE_BACKEND \
30 (e_backend_get_type ())
31 #define E_BACKEND(obj) \
32 (G_TYPE_CHECK_INSTANCE_CAST \
33 ((obj), E_TYPE_BACKEND, EBackend))
34 #define E_BACKEND_CLASS(cls) \
35 (G_TYPE_CHECK_CLASS_CAST \
36 ((cls), E_TYPE_BACKEND, EBackendClass))
37 #define E_IS_BACKEND(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE \
39 ((obj), E_TYPE_BACKEND))
40 #define E_IS_BACKEND_CLASS(cls) \
41 (G_TYPE_CHECK_CLASS_TYPE \
42 ((cls), E_TYPE_BACKEND))
43 #define E_BACKEND_GET_CLASS(obj) \
44 (G_TYPE_INSTANCE_GET_CLASS \
45 ((obj), E_TYPE_BACKEND, EBackendClass))
49 /* forward declaration */
50 struct _EUserPrompter;
52 typedef struct _EBackend EBackend;
53 typedef struct _EBackendClass EBackendClass;
54 typedef struct _EBackendPrivate EBackendPrivate;
59 * Contains only private data that should be read and manipulated using the
66 EBackendPrivate *priv;
69 struct _EBackendClass {
70 GObjectClass parent_class;
73 gboolean (*authenticate_sync) (EBackend *backend,
74 ESourceAuthenticator *auth,
75 GCancellable *cancellable,
77 void (*authenticate) (EBackend *backend,
78 ESourceAuthenticator *auth,
79 GCancellable *cancellable,
80 GAsyncReadyCallback callback,
82 gboolean (*authenticate_finish) (EBackend *backend,
86 gpointer reserved[13];
89 GType e_backend_get_type (void) G_GNUC_CONST;
90 gboolean e_backend_get_online (EBackend *backend);
91 void e_backend_set_online (EBackend *backend,
93 ESource * e_backend_get_source (EBackend *backend);
94 gboolean e_backend_authenticate_sync (EBackend *backend,
95 ESourceAuthenticator *auth,
96 GCancellable *cancellable,
98 void e_backend_authenticate (EBackend *backend,
99 ESourceAuthenticator *auth,
100 GCancellable *cancellable,
101 GAsyncReadyCallback callback,
103 gboolean e_backend_authenticate_finish (EBackend *backend,
104 GAsyncResult *result,
106 struct _EUserPrompter *
107 e_backend_get_user_prompter (EBackend *backend);
109 e_backend_trust_prompt_sync (EBackend *backend,
110 const ENamedParameters *parameters,
111 GCancellable *cancellable,
113 void e_backend_trust_prompt (EBackend *backend,
114 const ENamedParameters *parameters,
115 GCancellable *cancellable,
116 GAsyncReadyCallback callback,
119 e_backend_trust_prompt_finish (EBackend *backend,
120 GAsyncResult *result,
125 #endif /* E_BACKEND_H */