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) 2012 Intel Corporation.
8 * Contact: Jussi Laako <jussi.laako@linux.intel.com>
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * version 2.1 as published by the Free Software Foundation.
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.
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
25 #ifndef _SIGNON_SECURITY_CONTEXT_H_
26 #define _SIGNON_SECURITY_CONTEXT_H_
33 * Security context descriptor.
35 * Practically a string tuple.
37 * @sys_ctx: system context, such as SMACK-label, MSSF token or just a
39 * @app_ctx: application context, such as a script or a web page.
41 typedef struct _SignonSecurityContext
45 } SignonSecurityContext;
48 * GList of #SignonSecurityContext items.
50 typedef GList SignonSecurityContextList;
52 SignonSecurityContext * signon_security_context_new ();
53 SignonSecurityContext * signon_security_context_new_from_values (
54 const gchar *system_context,
55 const gchar *application_context);
56 void signon_security_context_free (SignonSecurityContext *ctx);
57 SignonSecurityContext * signon_security_context_copy (
58 const SignonSecurityContext *src_ctx);
59 void signon_security_context_set_system_context (SignonSecurityContext *ctx,
60 const gchar *system_context);
61 const gchar * signon_security_context_get_system_context (
62 const SignonSecurityContext *ctx);
63 void signon_security_context_set_application_context (
64 SignonSecurityContext *ctx,
65 const gchar *application_context);
66 const gchar * signon_security_context_get_application_context (
67 const SignonSecurityContext *ctx);
68 GVariant * signon_security_context_build_variant (
69 const SignonSecurityContext *ctx);
70 SignonSecurityContext * signon_security_context_deconstruct_variant (
73 GVariant * signon_security_context_list_build_variant (
74 const SignonSecurityContextList *list);
75 SignonSecurityContextList * signon_security_context_list_deconstruct_variant (
78 SignonSecurityContextList * signon_security_context_list_copy (
79 const SignonSecurityContextList *src_list);
80 void signon_security_context_list_free (SignonSecurityContextList *seclist);
84 #endif /* _SIGNON_SECURITY_CONTEXT_H_ */