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) 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_
29 #include <glib-object.h>
33 typedef struct _SignonSecurityContext SignonSecurityContext;
36 * SignonSecurityContext:
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 * Security context descriptor used for access control checks.
43 struct _SignonSecurityContext
50 * SignonSecurityContextList:
52 * GList of #SignonSecurityContext items.
54 typedef GList SignonSecurityContextList;
56 GType signon_security_context_get_type (void) G_GNUC_CONST;
58 SignonSecurityContext * signon_security_context_new ();
59 SignonSecurityContext * signon_security_context_new_from_values (
60 const gchar *system_context,
61 const gchar *application_context);
62 void signon_security_context_free (SignonSecurityContext *ctx);
63 SignonSecurityContext * signon_security_context_copy (
64 const SignonSecurityContext *src_ctx);
65 void signon_security_context_set_system_context (SignonSecurityContext *ctx,
66 const gchar *system_context);
67 const gchar * signon_security_context_get_system_context (
68 const SignonSecurityContext *ctx);
69 void signon_security_context_set_application_context (
70 SignonSecurityContext *ctx,
71 const gchar *application_context);
72 const gchar * signon_security_context_get_application_context (
73 const SignonSecurityContext *ctx);
74 GVariant * signon_security_context_build_variant (
75 const SignonSecurityContext *ctx);
76 SignonSecurityContext * signon_security_context_deconstruct_variant (
79 GVariant * signon_security_context_list_build_variant (
80 const SignonSecurityContextList *list);
81 SignonSecurityContextList * signon_security_context_list_deconstruct_variant (
84 SignonSecurityContextList * signon_security_context_list_copy (
85 const SignonSecurityContextList *src_list);
86 void signon_security_context_list_free (SignonSecurityContextList *seclist);
90 #endif /* _SIGNON_SECURITY_CONTEXT_H_ */