Release 0.0.3
[profile/ivi/gsignond.git] / include / gsignond / gsignond-identity-info.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-2013 Intel Corporation.
7  *
8  * Contact: Imran Zaman <imran.zaman@linux.intel.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23  * 02110-1301 USA
24  */
25
26 #ifndef __GSIGNOND_IDENTITY_INFO_H__
27 #define __GSIGNOND_IDENTITY_INFO_H__
28
29 #include <glib.h>
30 #include <glib-object.h>
31 #include <gsignond/gsignond-security-context.h>
32 #include <gsignond/gsignond-dictionary.h>
33
34 G_BEGIN_DECLS
35
36 #define GSIGNOND_TYPE_IDENTITY_INFO (GSIGNOND_TYPE_DICTIONARY)
37
38 #define GSIGNOND_IDENTITY_INFO(obj)  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
39                                            GSIGNOND_TYPE_IDENTITY_INFO, \
40                                            GSignondIdentityInfo))
41 #define GSIGNOND_IS_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
42                                            GSIGNOND_TYPE_IDENTITY_INFO))
43
44 typedef GSignondDictionary GSignondIdentityInfo;
45 typedef GList GSignondIdentityInfoList;
46
47 GSignondIdentityInfo *
48 gsignond_identity_info_new (void);
49
50 GSignondIdentityInfo *
51 gsignond_identity_info_copy (GSignondIdentityInfo *info);
52
53 void
54 gsignond_identity_info_ref (GSignondIdentityInfo *info);
55
56 void
57 gsignond_identity_info_unref (GSignondIdentityInfo *info);
58
59 guint32
60 gsignond_identity_info_get_id (GSignondIdentityInfo *info);
61
62 gboolean
63 gsignond_identity_info_set_id (
64         GSignondIdentityInfo *info,
65         guint32 id);
66
67 gboolean
68 gsignond_identity_info_get_is_identity_new (GSignondIdentityInfo *info);
69
70 gboolean
71 gsignond_identity_info_set_identity_new (GSignondIdentityInfo *info);
72
73 const gchar *
74 gsignond_identity_info_get_username (GSignondIdentityInfo *info);
75
76 gboolean
77 gsignond_identity_info_set_username (
78         GSignondIdentityInfo *info,
79         const gchar *username);
80
81 void
82 gsignond_identity_info_remove_username (GSignondIdentityInfo *info);
83
84 gboolean
85 gsignond_identity_info_get_is_username_secret (GSignondIdentityInfo *info);
86
87 gboolean
88 gsignond_identity_info_set_username_secret (
89         GSignondIdentityInfo *info,
90         gboolean username_secret);
91
92 const gchar *
93 gsignond_identity_info_get_secret (GSignondIdentityInfo *info);
94
95 gboolean
96 gsignond_identity_info_set_secret (
97         GSignondIdentityInfo *info,
98         const gchar *secret);
99
100 void
101 gsignond_identity_info_remove_secret (GSignondIdentityInfo *info);
102
103 gboolean
104 gsignond_identity_info_get_store_secret (GSignondIdentityInfo *info);
105
106 gboolean
107 gsignond_identity_info_set_store_secret (
108         GSignondIdentityInfo *info,
109         gboolean store_secret);
110
111 const gchar *
112 gsignond_identity_info_get_caption (GSignondIdentityInfo *info);
113
114 gboolean
115 gsignond_identity_info_set_caption (
116         GSignondIdentityInfo *info,
117         const gchar *caption);
118
119 GSequence *
120 gsignond_identity_info_get_realms (GSignondIdentityInfo *info);
121
122 gboolean
123 gsignond_identity_info_set_realms (
124         GSignondIdentityInfo *info,
125         GSequence *realms);
126
127 GHashTable *
128 gsignond_identity_info_get_methods (GSignondIdentityInfo *info);
129
130 gboolean
131 gsignond_identity_info_set_methods (
132         GSignondIdentityInfo *info,
133         GHashTable *methods);
134
135 GSequence *
136 gsignond_identity_info_get_mechanisms (
137         GSignondIdentityInfo *info,
138         const gchar *method);
139
140 gboolean
141 gsignond_identity_info_remove_method (
142         GSignondIdentityInfo *info,
143         const gchar *method);
144
145 GSignondSecurityContextList *
146 gsignond_identity_info_get_access_control_list (GSignondIdentityInfo *info);
147
148 gboolean
149 gsignond_identity_info_set_access_control_list (
150         GSignondIdentityInfo *info,
151         const GSignondSecurityContextList *acl);
152
153 GSignondSecurityContext *
154 gsignond_identity_info_get_owner (GSignondIdentityInfo *info);
155
156 gboolean
157 gsignond_identity_info_set_owner (
158         GSignondIdentityInfo *info,
159         const GSignondSecurityContext *owner);
160
161 gboolean
162 gsignond_identity_info_get_validated (GSignondIdentityInfo *info);
163
164 gboolean
165 gsignond_identity_info_set_validated (
166         GSignondIdentityInfo *info,
167         gboolean validated);
168
169 guint32
170 gsignond_identity_info_get_identity_type (GSignondIdentityInfo *info);
171
172 gboolean
173 gsignond_identity_info_set_identity_type (
174         GSignondIdentityInfo *info,
175         guint32 type);
176
177 gboolean
178 gsignond_identity_info_compare (
179         GSignondIdentityInfo *info,
180         GSignondIdentityInfo *other);
181
182 void
183 gsignond_identity_info_list_free (GSignondIdentityInfoList *list);
184
185 G_END_DECLS
186
187 #endif /* __GSIGNOND_IDENTITY_INFO_H__ */