I#27 - [IMAPx] Ignore DavMail's CR/LF in BODYSTRUCTURE response
[evolution-data-server.git] / src / libedataserverui / e-credentials-prompter-impl.h
blob3726dd43bd4604ce95a24a59f6066dc846c67c8b
1 /*
2 * Copyright (C) 2015 Red Hat, Inc. (www.redhat.com)
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 Lesser General Public License
11 * for more details.
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 (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
19 #error "Only <libedataserverui/libedataserverui.h> should be included directly."
20 #endif
22 #ifndef E_CREDENTIALS_PROMPTER_IMPL_H
23 #define E_CREDENTIALS_PROMPTER_IMPL_H
25 #include <glib.h>
26 #include <glib-object.h>
28 #include <libedataserver/libedataserver.h>
30 /* Standard GObject macros */
31 #define E_TYPE_CREDENTIALS_PROMPTER_IMPL \
32 (e_credentials_prompter_impl_get_type ())
33 #define E_CREDENTIALS_PROMPTER_IMPL(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST \
35 ((obj), E_TYPE_CREDENTIALS_PROMPTER_IMPL, ECredentialsPrompterImpl))
36 #define E_CREDENTIALS_PROMPTER_IMPL_CLASS(cls) \
37 (G_TYPE_CHECK_CLASS_CAST \
38 ((cls), E_TYPE_CREDENTIALS_PROMPTER_IMPL, ECredentialsPrompterImplClass))
39 #define E_IS_CREDENTIALS_PROMPTER_IMPL(obj) \
40 (G_TYPE_CHECK_INSTANCE_TYPE \
41 ((obj), E_TYPE_CREDENTIALS_PROMPTER_IMPL))
42 #define E_IS_CREDENTIALS_PROMPTER_IMPL_CLASS(cls) \
43 (G_TYPE_CHECK_CLASS_TYPE \
44 ((cls), E_TYPE_CREDENTIALS_PROMPTER_IMPL))
45 #define E_CREDENTIALS_PROMPTER_IMPL_GET_CLASS(obj) \
46 (G_TYPE_INSTANCE_GET_CLASS \
47 ((obj), E_TYPE_CREDENTIALS_PROMPTER_IMPL, ECredentialsPrompterImplClass))
49 G_BEGIN_DECLS
51 typedef struct _ECredentialsPrompterImpl ECredentialsPrompterImpl;
52 typedef struct _ECredentialsPrompterImplClass ECredentialsPrompterImplClass;
53 typedef struct _ECredentialsPrompterImplPrivate ECredentialsPrompterImplPrivate;
55 struct _ECredentialsPrompter;
57 /**
58 * ECredentialsPrompterImpl:
60 * Credentials prompter implementation base structure. The descendants
61 * implement ECredentialsPrompterImpl::prompt(), which is used to
62 * prompt for credentials. The descendants are automatically registered
63 * into an #ECredentialsPrompter.
65 * Since: 3.16
66 **/
67 struct _ECredentialsPrompterImpl {
68 EExtension parent;
69 ECredentialsPrompterImplPrivate *priv;
72 struct _ECredentialsPrompterImplClass {
73 EExtensionClass parent_class;
75 const gchar * const *authentication_methods; /* NULL-terminated array of methods to register with */
77 /* Methods */
79 void (*process_prompt) (ECredentialsPrompterImpl *prompter_impl,
80 gpointer prompt_id,
81 ESource *auth_source,
82 ESource *cred_source,
83 const gchar *error_text,
84 const ENamedParameters *credentials);
85 void (*cancel_prompt) (ECredentialsPrompterImpl *prompter_impl,
86 gpointer prompt_id);
88 /* Signals */
90 void (*prompt_finished) (ECredentialsPrompterImpl *prompter_impl,
91 gpointer prompt_id,
92 const ENamedParameters *credentials);
95 GType e_credentials_prompter_impl_get_type (void);
96 struct _ECredentialsPrompter *
97 e_credentials_prompter_impl_get_credentials_prompter
98 (ECredentialsPrompterImpl *prompter_impl);
99 void e_credentials_prompter_impl_prompt (ECredentialsPrompterImpl *prompter_impl,
100 gpointer prompt_id,
101 ESource *auth_source,
102 ESource *cred_source,
103 const gchar *error_text,
104 const ENamedParameters *credentials);
105 void e_credentials_prompter_impl_prompt_finish
106 (ECredentialsPrompterImpl *prompter_impl,
107 gpointer prompt_id,
108 const ENamedParameters *credentials);
109 void e_credentials_prompter_impl_cancel_prompt
110 (ECredentialsPrompterImpl *prompter_impl,
111 gpointer prompt_id);
113 G_END_DECLS
115 #endif /* E_CREDENTIALS_PROMPTER_IMPL_H */