Remove signon_identity_info_{get,set}_identity_ref_count
[platform/upstream/libgsignon-glib.git] / libsignon-glib / signon-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 libsignon-glib
5  *
6  * Copyright (C) 2009-2010 Nokia Corporation.
7  * Copyright (C) 2011 Canonical Ltd.
8  *
9  * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public License
13  * version 2.1 as published by the Free Software Foundation.
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 _SIGNON_IDENTITY_INFO_H_
27 #define _SIGNON_IDENTITY_INFO_H_
28
29 #include <glib-object.h>
30
31 G_BEGIN_DECLS
32
33 typedef struct _SignonIdentityInfo SignonIdentityInfo;
34
35 /*
36  * types used in SignonIdentityInfo
37  * */
38 enum _SignonIdentityType {
39     SIGNON_TYPE_OTHER = 0,
40     SIGNON_TYPE_APP = 1 << 0,
41     SIGNON_TYPE_WEB = 1 << 1,
42     SIGNON_TYPE_NETWORK = 1 << 2
43 };
44
45 typedef enum _SignonIdentityType SignonIdentityType;
46
47 GType signon_identity_info_get_type (void) G_GNUC_CONST;
48
49 SignonIdentityInfo *signon_identity_info_new ();
50 void signon_identity_info_free (SignonIdentityInfo *info);
51
52 SignonIdentityInfo *signon_identity_info_copy (const SignonIdentityInfo *other);
53
54 gint signon_identity_info_get_id (const SignonIdentityInfo *info);
55 const gchar *signon_identity_info_get_username (const SignonIdentityInfo *info);
56 gboolean signon_identity_info_get_storing_secret (const SignonIdentityInfo *info);
57 const gchar *signon_identity_info_get_caption (const SignonIdentityInfo *info);
58 const GHashTable *signon_identity_info_get_methods (const SignonIdentityInfo *info);
59 const gchar* const *signon_identity_info_get_realms (const SignonIdentityInfo *info);
60 const gchar* const *signon_identity_info_get_access_control_list (const SignonIdentityInfo *info);
61 SignonIdentityType signon_identity_info_get_identity_type (const SignonIdentityInfo *info);
62
63 void signon_identity_info_set_username (SignonIdentityInfo *info, const gchar *username);
64 void signon_identity_info_set_secret (SignonIdentityInfo *info,
65                                       const gchar *secret,
66                                       gboolean store_secret);
67 void signon_identity_info_set_caption (SignonIdentityInfo *info, const gchar *caption);
68 void signon_identity_info_set_method (SignonIdentityInfo *info, const gchar *method,
69                                       const gchar* const *mechanisms);
70 void signon_identity_info_remove_method (SignonIdentityInfo *info, const gchar *method);
71 void signon_identity_info_set_realms (SignonIdentityInfo *info,
72                                       const gchar* const *realms);
73 void signon_identity_info_set_access_control_list (SignonIdentityInfo *info,
74                                                    const gchar* const *access_control_list);
75 void signon_identity_info_set_identity_type (SignonIdentityInfo *info,
76                                              SignonIdentityType type);
77
78 G_END_DECLS
79
80 #endif /* _SIGNON_IDENTITY_INFO_H_ */