Open SCAP Library

xccdf_policy_model_priv.h
1 /*
2 * Copyright 2014--2016 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Authors:
20 * Simon Lukasik <slukasik@redhat.com>
21 *
22 */
23
24 #pragma once
25 #ifndef _OSCAP_XCCDF_POLICY_MODEL_PRIV_H
26 #define _OSCAP_XCCDF_POLICY_MODEL_PRIV_H
27
28 #include "common/util.h"
29 #include "CPE/cpe_session_priv.h"
30 #include "public/xccdf_policy.h"
31
32 OSCAP_HIDDEN_START;
33
34 #define XCCDF_POLICY_OUTCB_START "urn:xccdf:system:callback:start"
35 #define XCCDF_POLICY_OUTCB_END "urn:xccdf:system:callback:output"
36
43 void xccdf_policy_model_unregister_engines(struct xccdf_policy_model *model, const char *sys);
44
53 bool xccdf_policy_model_platforms_are_applicable(struct xccdf_policy_model *model, struct oscap_string_iterator *platforms);
54
62 bool xccdf_policy_model_item_is_applicable(struct xccdf_policy_model *model, struct xccdf_item *item);
63
70 struct cpe_session *xccdf_policy_model_get_cpe_session(struct xccdf_policy_model *model);
71
72 struct xccdf_policy *xccdf_policy_model_get_existing_policy_by_id(struct xccdf_policy_model *policy_model, const char *profile_id);
73
74 struct xccdf_policy *xccdf_policy_model_create_policy_by_id(struct xccdf_policy_model *policy_model, const char *id);
75
76 OSCAP_HIDDEN_END;
77
78 #endif
xccdf_policy.h
Open-scap XCCDF Policy library interface.
cpe_session
Definition: cpe_session_priv.h:35
xccdf_policy_model::xccdf_policy_model_item_is_applicable
bool xccdf_policy_model_item_is_applicable(struct xccdf_policy_model *model, struct xccdf_item *item)
Query whether the given item is applicable within given policy.
Definition: xccdf_policy.c:930
xccdf_policy_model
XCCDF policy model structure contains xccdf_benchmark as reference to Benchmark element in XML file a...
Definition: xccdf_policy_priv.h:39
xccdf_policy_model::xccdf_policy_model_platforms_are_applicable
bool xccdf_policy_model_platforms_are_applicable(struct xccdf_policy_model *model, struct oscap_string_iterator *platforms)
Query whether the given list platforms qualifies as &#39;applicable&#39;.
Definition: xccdf_policy.c:885
xccdf_policy_model::xccdf_policy_model_unregister_engines
void xccdf_policy_model_unregister_engines(struct xccdf_policy_model *model, const char *sys)
Remove checking engines with given system from xccdf_policy_model.
Definition: xccdf_policy.c:1573
oscap_string_iterator
String iterator.
xccdf_policy_model::xccdf_policy_model_get_cpe_session
struct cpe_session * xccdf_policy_model_get_cpe_session(struct xccdf_policy_model *model)
Get CPE session assigned with the XCCDF Policy Model.
Definition: xccdf_policy.c:1539
xccdf_policy
XCCDF policy structure is abstract (class) structure of Profile element from benchmark.
Definition: xccdf_policy_priv.h:58
xccdf_item
A base class for XCCDF items.
Definition: item.h:221