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 libsignon-glib
6 * Copyright (C) 2009-2010 Nokia Corporation.
7 * Copyright (C) 2011 Canonical Ltd.
9 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
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.
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.
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
26 #ifndef _SIGNON_IDENTITY_INFO_H_
27 #define _SIGNON_IDENTITY_INFO_H_
29 #include <glib-object.h>
33 typedef struct _SignonIdentityInfo SignonIdentityInfo;
36 * types used in SignonIdentityInfo
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
45 typedef enum _SignonIdentityType SignonIdentityType;
47 GType signon_identity_info_get_type (void) G_GNUC_CONST;
49 SignonIdentityInfo *signon_identity_info_new ();
50 void signon_identity_info_free (SignonIdentityInfo *info);
52 SignonIdentityInfo *signon_identity_info_copy (const SignonIdentityInfo *other);
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);
63 void signon_identity_info_set_username (SignonIdentityInfo *info, const gchar *username);
64 void signon_identity_info_set_secret (SignonIdentityInfo *info,
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);
80 #endif /* _SIGNON_IDENTITY_INFO_H_ */