Open SCAP Library

cpelang_priv.h
Go to the documentation of this file.
1
8 /*
9 * Copyright 2009 Red Hat Inc., Durham, North Carolina.
10 * All Rights Reserved.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but 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.
21 *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Authors:
27 * Maros Barabas <mbarabas@redhat.com>
28 */
29
30 #ifndef CPELANG_PRIV_H_
31 #define CPELANG_PRIV_H_
32
33 #include <libxml/xmlreader.h>
34 #include <libxml/xmlwriter.h>
35
36 #include "cpe_lang.h"
37 #include "../common/util.h"
38 #include "../common/list.h"
39 #include "../common/elements.h"
40 #include "../common/public/oscap.h"
41
45 OSCAP_HIDDEN_START;
46 /* @endcond */
47
52 struct cpe_testexpr {
53 cpe_lang_oper_t oper;
54 union {
55 struct oscap_list *expr;
56 struct cpe_name *cpe;
57 struct {
58 char* system;
59 char* href;
60 char* id;
61 } check;
62 } meta;
63 };
64
69 struct cpe_lang_model;
70
75 struct cpe_platform;
76
81 struct cpe_lang_model *cpe_lang_model_parse(xmlTextReaderPtr reader);
82
88 struct cpe_platform *cpe_platform_parse(xmlTextReaderPtr reader);
89
95 struct cpe_testexpr *cpe_testexpr_parse(xmlTextReaderPtr reader);
96
102 void cpe_lang_model_export_xml(const struct cpe_lang_model *spec, const char *file);
103
109 void cpe_lang_export(const struct cpe_lang_model *spec, xmlTextWriterPtr writer);
110
116 void cpe_platform_export(const struct cpe_platform *platform, xmlTextWriterPtr writer);
117
123 void cpe_testexpr_export(const struct cpe_testexpr *expr, xmlTextWriterPtr writer);
124
125 char *cpe_lang_model_detect_version_priv(xmlTextReader *reader);
126
130 OSCAP_HIDDEN_END;
131 /* @endcond */
132
133 #endif
cpe_lang_model
CPE platform specification.
Definition: cpelang_priv.c:63
cpe_lang_oper_t
cpe_lang_oper_t
CPE language operators.
Definition: cpe_lang.h:49
cpe_testexpr::meta
union cpe_testexpr::@1 meta
operation metadata
cpe_testexpr::oper
cpe_lang_oper_t oper
operator
Definition: cpelang_priv.h:53
cpe_testexpr::cpe
struct cpe_name * cpe
CPE for match operation.
Definition: cpelang_priv.h:56
cpe_platform_export
void cpe_platform_export(const struct cpe_platform *platform, xmlTextWriterPtr writer)
Function for export CPE platform element.
Definition: cpelang_priv.c:507
cpe_testexpr::expr
struct oscap_list * expr
array of subexpressions for operators
Definition: cpelang_priv.h:55
oscap_list
Definition: list.h:54
cpe_lang_model_parse
struct cpe_lang_model * cpe_lang_model_parse(xmlTextReaderPtr reader)
Parse function for CPE Lang model.
Definition: cpelang_priv.c:235
cpe_platform_parse
struct cpe_platform * cpe_platform_parse(xmlTextReaderPtr reader)
Parse CPE platform structure.
Definition: cpelang_priv.c:265
cpe_lang.h
Interface to Common Platform Enumeration (CPE) Language.
cpe_name
Structure holding Common Platform Enumeration URI data.
Definition: cpename.c:69
cpe_testexpr
CPE language boolean expression.
Definition: cpelang_priv.h:52
cpe_platform
Single platform representation in CPE language.
Definition: cpelang_priv.c:73
cpe_testexpr_export
void cpe_testexpr_export(const struct cpe_testexpr *expr, xmlTextWriterPtr writer)
Function for export CPE test expression element.
Definition: cpelang_priv.c:523
cpe_lang_model_export_xml
void cpe_lang_model_export_xml(const struct cpe_lang_model *spec, const char *file)
Function for export CPE language model to XML.
Definition: cpelang_priv.c:465
cpe_lang_export
void cpe_lang_export(const struct cpe_lang_model *spec, xmlTextWriterPtr writer)
Function for export CPE language top element.
Definition: cpelang_priv.c:492
cpe_testexpr_parse
struct cpe_testexpr * cpe_testexpr_parse(xmlTextReaderPtr reader)
Parse CPE test expression structure.
Definition: cpelang_priv.c:312