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
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."
22 #ifndef E_CREDENTIALS_PROMPTER_IMPL_H
23 #define E_CREDENTIALS_PROMPTER_IMPL_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))
51 typedef struct _ECredentialsPrompterImpl ECredentialsPrompterImpl
;
52 typedef struct _ECredentialsPrompterImplClass ECredentialsPrompterImplClass
;
53 typedef struct _ECredentialsPrompterImplPrivate ECredentialsPrompterImplPrivate
;
55 struct _ECredentialsPrompter
;
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.
67 struct _ECredentialsPrompterImpl
{
69 ECredentialsPrompterImplPrivate
*priv
;
72 struct _ECredentialsPrompterImplClass
{
73 EExtensionClass parent_class
;
75 const gchar
* const *authentication_methods
; /* NULL-terminated array of methods to register with */
79 void (*process_prompt
) (ECredentialsPrompterImpl
*prompter_impl
,
83 const gchar
*error_text
,
84 const ENamedParameters
*credentials
);
85 void (*cancel_prompt
) (ECredentialsPrompterImpl
*prompter_impl
,
90 void (*prompt_finished
) (ECredentialsPrompterImpl
*prompter_impl
,
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
,
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
,
108 const ENamedParameters
*credentials
);
109 void e_credentials_prompter_impl_cancel_prompt
110 (ECredentialsPrompterImpl
*prompter_impl
,
115 #endif /* E_CREDENTIALS_PROMPTER_IMPL_H */