1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
4 * This file is part of gsignond
6 * Copyright (C) 2012 Intel Corporation.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 #ifndef __GSIGNOND_DAEMON_H_
26 #define __GSIGNOND_DAEMON_H_
29 #include <glib-object.h>
31 #include "gsignond-types.h"
32 #include <gsignond/gsignond-access-control-manager.h>
33 #include "common/gsignond-identity-info.h"
34 #include "gsignond-signonui-proxy.h"
35 #include "plugins/gsignond-plugin-proxy-factory.h"
39 #define GSIGNOND_TYPE_DAEMON (gsignond_daemon_get_type())
40 #define GSIGNOND_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GSIGNOND_TYPE_DAEMON, GSignondDaemon))
41 #define GSIGNOND_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GSIGNOND_TYPE_DAEMON, GSignondDaemonClass))
42 #define GSIGNOND_IS_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GSIGNOND_TYPE_DAEMON))
43 #define GSIGNOND_IS_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GSIGNOND_TYPE_DAEMON))
44 #define GSIGNOND_DAEMON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GSIGNOND_TYPE_DAEMON, GSignondDaemonClass))
46 typedef struct _GSignondDaemonPrivate GSignondDaemonPrivate;
48 struct _GSignondDaemon
53 GSignondDaemonPrivate *priv;
56 struct _GSignondDaemonClass
58 GObjectClass parent_class;
61 GType gsignond_daemon_get_type (void) G_GNUC_CONST;
63 GSignondDaemon * gsignond_daemon_new ();
66 gsignond_daemon_register_new_identity (GSignondDaemon *daemon,
67 const GSignondSecurityContext *ctx,
71 gsignond_daemon_get_identity (GSignondDaemon *daemon,
73 const GSignondSecurityContext *ctx,
77 gsignond_daemon_query_methods (GSignondDaemon *daemon, GError **error);
80 gsignond_daemon_query_mechanisms (GSignondDaemon *daemon,
84 GSignondIdentityInfoList *
85 gsignond_daemon_query_identities (GSignondDaemon *daemon,
87 const GSignondSecurityContext *ctx,
91 gsignond_daemon_clear (GSignondDaemon *daemon,
92 const GSignondSecurityContext *ctx,
96 gsignond_daemon_store_identity (GSignondDaemon *daemon, GSignondIdentity *identity);
99 gsignond_daemon_remove_identity (GSignondDaemon *daemon, guint32 id);
102 gsignond_daemon_add_identity_reference (GSignondDaemon *daemon, guint32 identity_id, const GSignondSecurityContext *owner, const gchar *ref);
105 gsignond_daemon_remove_identity_reference (GSignondDaemon *daemon, guint32 identity_id, const GSignondSecurityContext *owner, const gchar *ref);
108 gsignond_daemon_store_identity_data (GSignondDaemon *daemon, guint32 identity_id, const gchar *method, GSignondDictionary *data);
111 gsignond_daemon_clear_identity_data (GSignondDaemon *daemon, guint32 identity_id);
114 gsignond_daemon_load_identity_data (GSignondDaemon *daemon, guint32 identity_id, const gchar *method);
117 gsignond_daemon_get_timeout (GSignondDaemon *self) G_GNUC_CONST;
120 gsignond_daemon_get_identity_timeout (GSignondDaemon *self) G_GNUC_CONST;
123 gsignond_daemon_get_auth_session_timeout (GSignondDaemon *self) G_GNUC_CONST;
125 GSignondAccessControlManager *
126 gsignond_daemon_get_access_control_manager (GSignondDaemon *self) G_GNUC_CONST;
128 GSignondPluginProxyFactory *
129 gsignond_daemon_get_plugin_proxy_factory (GSignondDaemon *self) G_GNUC_CONST;
132 gsignond_daemon_get_config (GSignondDaemon *self) G_GNUC_CONST;
135 gsignond_daemon_show_dialog (GSignondDaemon *self,
137 GSignondSignonuiData *ui_data,
138 GSignondSignonuiProxyQueryDialogCb handler,
139 GSignondSignonuiProxyRefreshCb refresh_handler,
143 gsignond_daemon_refresh_dialog (GSignondDaemon *self,
145 GSignondSignonuiData *ui_data,
146 GSignondSignonuiProxyRefreshDialogCb handler,
150 gsignond_daemon_cancel_dialog (GSignondDaemon *self,
152 GSignondSignonuiProxyCancelRequestCb handler,
155 GSignondAccessControlManager *
156 gsignond_get_access_control_manager ();
158 GSignondPluginProxyFactory *
159 gsignond_get_plugin_proxy_factory ();
162 gsignond_get_config ();
166 #endif /* __GSIGNOND_DAEMON_H_ */