common: make gsignond-identity-info.h private, as it's not used by anything in the...
[platform/upstream/gsignond.git] / src / daemon / gsignond-daemon.h
1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /*
4  * This file is part of gsignond
5  *
6  * Copyright (C) 2012 Intel Corporation.
7  *
8  *
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.
13  *
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.
18  *
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
22  * 02110-1301 USA
23  */
24
25 #ifndef __GSIGNOND_DAEMON_H_
26 #define __GSIGNOND_DAEMON_H_
27
28 #include <glib.h>
29 #include <glib-object.h>
30
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"
36
37 G_BEGIN_DECLS
38
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))
45
46 typedef struct _GSignondDaemonPrivate GSignondDaemonPrivate;
47
48 struct _GSignondDaemon
49 {
50     GObject parent;
51
52     /* priv */
53     GSignondDaemonPrivate *priv;
54 };
55
56 struct _GSignondDaemonClass
57 {
58     GObjectClass parent_class;
59 };
60
61 GType gsignond_daemon_get_type (void) G_GNUC_CONST;
62
63 GSignondDaemon * gsignond_daemon_new ();
64
65 GSignondIdentity *
66 gsignond_daemon_register_new_identity (GSignondDaemon *daemon,
67                                        const GSignondSecurityContext *ctx,
68                                        GError **error) ;
69
70 GSignondIdentity *
71 gsignond_daemon_get_identity (GSignondDaemon *daemon,
72                               const guint32 id,
73                               const GSignondSecurityContext *ctx,
74                               GError **error);
75
76 const gchar ** 
77 gsignond_daemon_query_methods (GSignondDaemon *daemon, GError **error);
78
79 const gchar ** 
80 gsignond_daemon_query_mechanisms (GSignondDaemon *daemon,
81                                   const gchar *method,
82                                   GError **error);
83
84 GSignondIdentityInfoList *
85 gsignond_daemon_query_identities (GSignondDaemon *daemon,
86                                   GVariant *filter,
87                                   const GSignondSecurityContext *ctx,
88                                   GError **error);
89
90 gboolean 
91 gsignond_daemon_clear (GSignondDaemon *daemon,
92                        const GSignondSecurityContext *ctx,
93                        GError **error);
94
95 guint32
96 gsignond_daemon_store_identity (GSignondDaemon *daemon, GSignondIdentity *identity);
97
98 gboolean
99 gsignond_daemon_remove_identity (GSignondDaemon *daemon, guint32 id);
100
101 guint32
102 gsignond_daemon_add_identity_reference (GSignondDaemon *daemon, guint32 identity_id, const GSignondSecurityContext *owner, const gchar *ref);
103
104 gboolean
105 gsignond_daemon_remove_identity_reference (GSignondDaemon *daemon, guint32 identity_id, const GSignondSecurityContext *owner, const gchar *ref);
106
107 gboolean
108 gsignond_daemon_store_identity_data (GSignondDaemon *daemon, guint32 identity_id, const gchar *method, GSignondDictionary *data);
109
110 gboolean
111 gsignond_daemon_clear_identity_data (GSignondDaemon *daemon, guint32 identity_id);
112
113 GSignondDictionary *
114 gsignond_daemon_load_identity_data (GSignondDaemon *daemon, guint32 identity_id, const gchar *method);
115
116 guint
117 gsignond_daemon_get_timeout (GSignondDaemon *self) G_GNUC_CONST;
118
119 guint
120 gsignond_daemon_get_identity_timeout (GSignondDaemon *self) G_GNUC_CONST;
121
122 guint
123 gsignond_daemon_get_auth_session_timeout (GSignondDaemon *self) G_GNUC_CONST;
124
125 GSignondAccessControlManager *
126 gsignond_daemon_get_access_control_manager (GSignondDaemon *self) G_GNUC_CONST;
127
128 GSignondPluginProxyFactory *
129 gsignond_daemon_get_plugin_proxy_factory (GSignondDaemon *self) G_GNUC_CONST;
130
131 GSignondConfig *
132 gsignond_daemon_get_config (GSignondDaemon *self) G_GNUC_CONST;
133
134 gboolean
135 gsignond_daemon_show_dialog (GSignondDaemon *self,
136                              GObject *caller,
137                              GSignondSignonuiData *ui_data,
138                              GSignondSignonuiProxyQueryDialogCb handler,
139                              GSignondSignonuiProxyRefreshCb refresh_handler,
140                              gpointer userdata);
141
142 gboolean
143 gsignond_daemon_refresh_dialog (GSignondDaemon *self,
144                                 GObject *caller,
145                                 GSignondSignonuiData *ui_data,
146                                 GSignondSignonuiProxyRefreshDialogCb handler,
147                                 gpointer userdata);
148
149 gboolean
150 gsignond_daemon_cancel_dialog (GSignondDaemon *self,
151                                GObject *caller,
152                                GSignondSignonuiProxyCancelRequestCb handler,
153                                gpointer userdata);
154
155 GSignondAccessControlManager *
156 gsignond_get_access_control_manager ();
157
158 GSignondPluginProxyFactory *
159 gsignond_get_plugin_proxy_factory ();
160
161 GSignondConfig *
162 gsignond_get_config ();
163
164 G_END_DECLS
165
166 #endif /* __GSIGNOND_DAEMON_H_ */