| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: (C) 2012 Red Hat, Inc. (www.redhat.com) |
| 3 |
* SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef E_EWS_BACKEND_H |
| 7 |
#define E_EWS_BACKEND_H |
| 8 |
|
| 9 |
#include <libebackend/libebackend.h> |
| 10 |
|
| 11 |
#include "common/e-ews-connection.h" |
| 12 |
|
| 13 |
/* Standard GObject macros */ |
| 14 |
#define E_TYPE_EWS_BACKEND \ |
| 15 |
(e_ews_backend_get_type ()) |
| 16 |
#define E_EWS_BACKEND(obj) \ |
| 17 |
(G_TYPE_CHECK_INSTANCE_CAST \ |
| 18 |
((obj), E_TYPE_EWS_BACKEND, EEwsBackend)) |
| 19 |
#define E_EWS_BACKEND_CLASS(cls) \ |
| 20 |
(G_TYPE_CHECK_CLASS_CAST \ |
| 21 |
((cls), E_TYPE_EWS_BACKEND, EEwsBackendClass)) |
| 22 |
#define E_IS_EWS_BACKEND(obj) \ |
| 23 |
(G_TYPE_CHECK_INSTANCE_TYPE \ |
| 24 |
((obj), E_TYPE_EWS_BACKEND)) |
| 25 |
#define E_IS_EWS_BACKEND_CLASS(cls) \ |
| 26 |
(G_TYPE_CHECK_CLASS_TYPE \ |
| 27 |
((cls), E_TYPE_EWS_BACKEND)) |
| 28 |
#define E_EWS_BACKEND_GET_CLASS(obj) \ |
| 29 |
(G_TYPE_INSTANCE_GET_CLASS \ |
| 30 |
((obj), E_TYPE_EWS_BACKEND, EEwsBackendClass)) |
| 31 |
|
| 32 |
G_BEGIN_DECLS |
| 33 |
|
| 34 |
typedef struct _EEwsBackend EEwsBackend; |
| 35 |
typedef struct _EEwsBackendClass EEwsBackendClass; |
| 36 |
typedef struct _EEwsBackendPrivate EEwsBackendPrivate; |
| 37 |
|
| 38 |
struct _EEwsBackend { |
| 39 |
ECollectionBackend parent; |
| 40 |
EEwsBackendPrivate *priv; |
| 41 |
}; |
| 42 |
|
| 43 |
struct _EEwsBackendClass { |
| 44 |
ECollectionBackendClass parent_class; |
| 45 |
}; |
| 46 |
|
| 47 |
GType e_ews_backend_get_type (void) G_GNUC_CONST; |
| 48 |
void e_ews_backend_type_register (GTypeModule *type_module); |
| 49 |
EEwsConnection * |
| 50 |
e_ews_backend_ref_connection_sync |
| 51 |
(EEwsBackend *backend, |
| 52 |
ESourceAuthenticationResult *result, |
| 53 |
gchar **out_certificate_pem, |
| 54 |
GTlsCertificateFlags *out_certificate_errors, |
| 55 |
GCancellable *cancellable, |
| 56 |
GError **error); |
| 57 |
void e_ews_backend_ref_connection (EEwsBackend *backend, |
| 58 |
GCancellable *cancellable, |
| 59 |
GAsyncReadyCallback callback, |
| 60 |
gpointer user_data); |
| 61 |
EEwsConnection * |
| 62 |
e_ews_backend_ref_connection_finish |
| 63 |
(EEwsBackend *backend, |
| 64 |
GAsyncResult *result, |
| 65 |
GError **error); |
| 66 |
gboolean e_ews_backend_sync_folders_sync (EEwsBackend *backend, |
| 67 |
GCancellable *cancellable, |
| 68 |
GError **error); |
| 69 |
void e_ews_backend_sync_folders (EEwsBackend *backend, |
| 70 |
GCancellable *cancellable, |
| 71 |
GAsyncReadyCallback callback, |
| 72 |
gpointer user_data); |
| 73 |
gboolean e_ews_backend_sync_folders_finish |
| 74 |
(EEwsBackend *backend, |
| 75 |
GAsyncResult *result, |
| 76 |
GError **error); |
| 77 |
|
| 78 |
G_END_DECLS |
| 79 |
|
| 80 |
#endif /* E_EWS_BACKEND_H */ |
| 81 |
|