Debian Codegraph @

src/goaidentity/goaidentitymanager.h

raw symbols SCIP
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 *
3 * Copyright © 2012 – 2017 Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef __GOA_IDENTITY_MANAGER_H__
20 #define __GOA_IDENTITY_MANAGER_H__
21
22 #include <glib.h>
23 #include <glib-object.h>
24 #include <gio/gio.h>
25
26 #include "goaidentity.h"
27 #include "goaidentityinquiry.h"
28
29 G_BEGIN_DECLS
30
31 #define GOA_TYPE_IDENTITY_MANAGER (goa_identity_manager_get_type ())
32 G_DECLARE_INTERFACE (GoaIdentityManager, goa_identity_manager, GOA, IDENTITY_MANAGER, GObject);
33
34 struct _GoaIdentityManagerInterface
35 {
36 GTypeInterface base_interface;
37
38 /* Signals */
39 void (* identity_added) (GoaIdentityManager *identity_manager,
40 GoaIdentity *identity);
41
42 void (* identity_removed) (GoaIdentityManager *identity_manager,
43 GoaIdentity *identity);
44 void (* identity_renamed) (GoaIdentityManager *identity_manager,
45 GoaIdentity *identity);
46 void (* identity_refreshed) (GoaIdentityManager *identity_manager,
47 GoaIdentity *identity);
48 void (* identity_needs_renewal) (GoaIdentityManager *identity_manager,
49 GoaIdentity *identity);
50 void (* identity_expiring) (GoaIdentityManager *identity_manager,
51 GoaIdentity *identity);
52 void (* identity_expired) (GoaIdentityManager *identity_manager,
53 GoaIdentity *identity);
54
55 /* Virtual Functions */
56 void (* get_identity) (GoaIdentityManager *identity_manager,
57 const char *identifier,
58 GCancellable *cancellable,
59 GAsyncReadyCallback callback,
60 gpointer user_data);
61 GoaIdentity * (* get_identity_finish) (GoaIdentityManager *identity_manager,
62 GAsyncResult *result,
63 GError **error);
64 void (* list_identities) (GoaIdentityManager *identity_manager,
65 GCancellable *cancellable,
66 GAsyncReadyCallback callback,
67 gpointer user_data);
68 GList * (* list_identities_finish) (GoaIdentityManager *identity_manager,
69 GAsyncResult *result,
70 GError **error);
71
72 void (* sign_identity_in) (GoaIdentityManager *identity_manager,
73 const char *identifier,
74 gconstpointer initial_password,
75 const char *preauth_source,
76 GoaIdentitySignInFlags flags,
77 GoaIdentityInquiryFunc inquiry_func,
78 gpointer inquiry_data,
79 GCancellable *cancellable,
80 GAsyncReadyCallback callback,
81 gpointer user_data);
82 GoaIdentity * (* sign_identity_in_finish) (GoaIdentityManager *identity_manager,
83 GAsyncResult *result,
84 GError **error);
85
86 void (* sign_identity_out) (GoaIdentityManager *identity_manager,
87 GoaIdentity *identity,
88 GCancellable *cancellable,
89 GAsyncReadyCallback callback,
90 gpointer user_data);
91 void (* sign_identity_out_finish) (GoaIdentityManager *identity_manager,
92 GAsyncResult *result,
93 GError **error);
94
95 void (* renew_identity) (GoaIdentityManager *identity_manager,
96 GoaIdentity *identity,
97 GCancellable *cancellable,
98 GAsyncReadyCallback callback,
99 gpointer user_data);
100 void (* renew_identity_finish) (GoaIdentityManager *identity_manager,
101 GAsyncResult *result,
102 GError **error);
103
104 char * (* name_identity) (GoaIdentityManager *identity_manager,
105 GoaIdentity *identity);
106 };
107
108 void goa_identity_manager_get_identity (GoaIdentityManager *identity_manager,
109 const char *identifier,
110 GCancellable *cancellable,
111 GAsyncReadyCallback callback,
112 gpointer user_data);
113 GoaIdentity *goa_identity_manager_get_identity_finish (GoaIdentityManager *identity_manager,
114 GAsyncResult *result,
115 GError **error);
116 void goa_identity_manager_list_identities (GoaIdentityManager *identity_manager,
117 GCancellable *cancellable,
118 GAsyncReadyCallback callback,
119 gpointer user_data);
120 GList *goa_identity_manager_list_identities_finish (GoaIdentityManager *identity_manager,
121 GAsyncResult *result,
122 GError **error);
123
124 void goa_identity_manager_sign_identity_in (GoaIdentityManager *identity_manager,
125 const char *identifier,
126 gconstpointer initial_password,
127 const char *preauth_source,
128 GoaIdentitySignInFlags flags,
129 GoaIdentityInquiryFunc inquiry_func,
130 gpointer inquiry_data,
131 GCancellable *cancellable,
132 GAsyncReadyCallback callback,
133 gpointer user_data);
134 GoaIdentity *goa_identity_manager_sign_identity_in_finish (GoaIdentityManager *identity_manager,
135 GAsyncResult *result,
136 GError **error);
137
138 void goa_identity_manager_sign_identity_out (GoaIdentityManager *identity_manager,
139 GoaIdentity *identity,
140 GCancellable *cancellable,
141 GAsyncReadyCallback callback,
142 gpointer user_data);
143 void goa_identity_manager_sign_identity_out_finish (GoaIdentityManager *identity_manager,
144 GAsyncResult *result,
145 GError **error);
146
147 void goa_identity_manager_renew_identity (GoaIdentityManager *identity_manager,
148 GoaIdentity *identity,
149 GCancellable *cancellable,
150 GAsyncReadyCallback callback,
151 gpointer user_data);
152 void goa_identity_manager_renew_identity_finish (GoaIdentityManager *identity_manager,
153 GAsyncResult *result,
154 GError **error);
155
156 char *goa_identity_manager_name_identity (GoaIdentityManager *identity_manager,
157 GoaIdentity *identity);
158
159 G_END_DECLS
160
161 #endif /* __GOA_IDENTITY_MANAGER_H__ */