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.
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 General Public License
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/>.
18 #if !defined (__LIBEBACKEND_H_INSIDE__) && !defined (LIBEBACKEND_COMPILATION)
19 #error "Only <libebackend/libebackend.h> should be included directly."
22 #ifndef E_OAUTH2_SUPPORT_H
23 #define E_OAUTH2_SUPPORT_H
25 #include <libedataserver/libedataserver.h>
27 /* Standard GObject macros */
28 #define E_TYPE_OAUTH2_SUPPORT \
29 (e_oauth2_support_get_type ())
30 #define E_OAUTH2_SUPPORT(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST \
32 ((obj), E_TYPE_OAUTH2_SUPPORT, EOAuth2Support))
33 #define E_IS_OAUTH2_SUPPORT(obj) \
34 (G_TYPE_CHECK_INSTANCE_TYPE \
35 ((obj), E_TYPE_OAUTH2_SUPPORT))
36 #define E_OAUTH2_SUPPORT_GET_INTERFACE(obj) \
37 (G_TYPE_INSTANCE_GET_INTERFACE \
38 ((obj), E_TYPE_OAUTH2_SUPPORT, EOAuth2SupportInterface))
47 typedef struct _EOAuth2Support EOAuth2Support;
48 typedef struct _EOAuth2SupportInterface EOAuth2SupportInterface;
51 * EOAuth2SupportInterface:
55 struct _EOAuth2SupportInterface {
56 GTypeInterface parent_interface;
58 /* Synchronous I/O Methods */
59 gboolean (*get_access_token_sync)
60 (EOAuth2Support *support,
62 GCancellable *cancellable,
63 gchar **out_access_token,
67 /* Asynchronous I/O Methods (all have defaults) */
68 void (*get_access_token) (EOAuth2Support *support,
70 GCancellable *cancellable,
71 GAsyncReadyCallback callback,
73 gboolean (*get_access_token_finish)
74 (EOAuth2Support *support,
76 gchar **out_access_token,
81 GType e_oauth2_support_get_type (void) G_GNUC_CONST;
82 gboolean e_oauth2_support_get_access_token_sync
83 (EOAuth2Support *support,
85 GCancellable *cancellable,
86 gchar **out_access_token,
89 void e_oauth2_support_get_access_token
90 (EOAuth2Support *support,
92 GCancellable *cancellable,
93 GAsyncReadyCallback callback,
95 gboolean e_oauth2_support_get_access_token_finish
96 (EOAuth2Support *support,
98 gchar **out_access_token,
104 #endif /* E_OAUTH2_SUPPORT_H */