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 libgsignon-glib
6 * Copyright (C) 2009-2010 Nokia Corporation.
7 * Copyright (C) 2011 Canonical Ltd.
8 * Copyright (C) 2012-2014 Intel Corporation.
10 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
11 * Contact: Jussi Laako <jussi.laako@linux.intel.com>
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public License
15 * version 2.1 as published by the Free Software Foundation.
17 * This library is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
28 #ifndef _SIGNON_IDENTITY_INFO_H_
29 #define _SIGNON_IDENTITY_INFO_H_
31 #include <glib-object.h>
33 #include "signon-security-context.h"
40 * Opaque struct. Use the accessor functions below.
42 typedef struct _SignonIdentityInfo SignonIdentityInfo;
46 * @SIGNON_IDENTITY_TYPE_OTHER: an identity that is not an app, web or network
47 * @SIGNON_IDENTITY_TYPE_APP: an application identity
48 * @SIGNON_IDENTITY_TYPE_WEB: a web identity
49 * @SIGNON_IDENTITY_TYPE_NETWORK: a network server identity
51 * Identity types used in #SignonIdentityInfo.
54 SIGNON_IDENTITY_TYPE_OTHER = 0,
55 SIGNON_IDENTITY_TYPE_APP = 1 << 0,
56 SIGNON_IDENTITY_TYPE_WEB = 1 << 1,
57 SIGNON_IDENTITY_TYPE_NETWORK = 1 << 2
60 GType signon_identity_info_get_type (void) G_GNUC_CONST;
62 SignonIdentityInfo *signon_identity_info_new ();
63 void signon_identity_info_free (SignonIdentityInfo *info);
65 SignonIdentityInfo *signon_identity_info_copy (const SignonIdentityInfo *other);
67 gint signon_identity_info_get_id (const SignonIdentityInfo *info);
68 const gchar *signon_identity_info_get_username (const SignonIdentityInfo *info);
69 gboolean signon_identity_info_get_storing_secret (
70 const SignonIdentityInfo *info);
71 const gchar *signon_identity_info_get_caption (const SignonIdentityInfo *info);
72 GHashTable *signon_identity_info_get_methods (const SignonIdentityInfo *info);
73 const gchar* const *signon_identity_info_get_realms (
74 const SignonIdentityInfo *info);
75 const SignonSecurityContext *signon_identity_info_get_owner (
76 const SignonIdentityInfo *info);
77 SignonSecurityContextList *signon_identity_info_get_access_control_list (
78 const SignonIdentityInfo *info);
79 SignonIdentityType signon_identity_info_get_identity_type (
80 const SignonIdentityInfo *info);
82 void signon_identity_info_set_username (SignonIdentityInfo *info,
83 const gchar *username);
84 void signon_identity_info_set_secret (SignonIdentityInfo *info,
86 gboolean store_secret);
87 void signon_identity_info_set_caption (SignonIdentityInfo *info,
88 const gchar *caption);
89 void signon_identity_info_set_methods (SignonIdentityInfo *info,
91 void signon_identity_info_own_methods (SignonIdentityInfo *info,
93 void signon_identity_info_set_method (SignonIdentityInfo *info,
95 const gchar* const *mechanisms);
96 void signon_identity_info_remove_method (SignonIdentityInfo *info,
98 void signon_identity_info_set_realms (SignonIdentityInfo *info,
99 const gchar* const *realms);
100 void signon_identity_info_set_owner (SignonIdentityInfo *info,
101 const SignonSecurityContext *owner);
102 void signon_identity_info_set_owner_from_values (SignonIdentityInfo *info,
103 const gchar *system_context,
104 const gchar *application_context);
105 void signon_identity_info_set_access_control_list (SignonIdentityInfo *info,
106 SignonSecurityContextList *access_control_list);
107 void signon_identity_info_access_control_list_append (SignonIdentityInfo *info,
108 SignonSecurityContext *security_context);
109 void signon_identity_info_set_identity_type (SignonIdentityInfo *info,
110 SignonIdentityType type);
114 #endif /* _SIGNON_IDENTITY_INFO_H_ */