Loading...
Searching...
No Matches
cpelang_priv.h
Go to the documentation of this file.
/*
* Copyright 2009 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* Maros Barabas <mbarabas@redhat.com>
*/
#ifndef CPELANG_PRIV_H_
#define CPELANG_PRIV_H_
#include <libxml/xmlreader.h>
#include <libxml/xmlwriter.h>
#include "cpe_lang.h"
#include "../common/util.h"
#include "../common/list.h"
#include "../common/elements.h"
#include "../common/public/oscap.h"
/* @endcond */
struct cpe_testexpr {
cpe_lang_oper_t oper;
union {
struct oscap_list *expr;
struct cpe_name *cpe;
struct {
char* system;
char* href;
char* id;
} check;
} meta;
};
struct cpe_lang_model;
struct cpe_platform;
struct cpe_lang_model *cpe_lang_model_parse(xmlTextReaderPtr reader);
struct cpe_platform *cpe_platform_parse(xmlTextReaderPtr reader);
struct cpe_testexpr *cpe_testexpr_parse(xmlTextReaderPtr reader);
void cpe_lang_model_export_xml(const struct cpe_lang_model *spec, const char *file);
void cpe_lang_export(const struct cpe_lang_model *spec, xmlTextWriterPtr writer);
void cpe_platform_export(const struct cpe_platform *platform, xmlTextWriterPtr writer);
void cpe_testexpr_export(const struct cpe_testexpr *expr, xmlTextWriterPtr writer);
char *cpe_lang_model_detect_version_priv(xmlTextReader *reader);
bool cpe_lang_model_set_origin_file(struct cpe_lang_model* lang_model, const char* origin_file);
const char* cpe_lang_model_get_origin_file(const struct cpe_lang_model* lang_model);
/* @endcond */
#endif
elements.h
cpe_lang.h
Interface to Common Platform Enumeration (CPE) Language.
cpe_testexpr_parse
struct cpe_testexpr * cpe_testexpr_parse(xmlTextReaderPtr reader)
Parse CPE test expression structure.
Definition cpelang_priv.c:312
cpe_platform_export
void cpe_platform_export(const struct cpe_platform *platform, xmlTextWriterPtr writer)
Function for export CPE platform element.
Definition cpelang_priv.c:503
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:519
cpe_platform_parse
struct cpe_platform * cpe_platform_parse(xmlTextReaderPtr reader)
Parse CPE platform structure.
Definition cpelang_priv.c:265
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:488
cpe_lang_model_get_origin_file
const char * cpe_lang_model_get_origin_file(const struct cpe_lang_model *lang_model)
Gets the file the CPE dict model was loaded from This is necessary to figure out the full OVAL file p...
Definition cpelang_priv.c:760
cpe_lang_model_set_origin_file
bool cpe_lang_model_set_origin_file(struct cpe_lang_model *lang_model, const char *origin_file)
Sets the origin file hint.
Definition cpelang_priv.c:752
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_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:461
cpe_lang_oper_t
cpe_lang_oper_t
CPE language operators.
Definition cpe_lang.h:50
oscap.h
General OpenScap functions and types.
cpe_lang_model
CPE platform specification.
Definition cpelang_priv.c:63
cpe_name
Structure holding Common Platform Enumeration URI data.
Definition cpename.c:70
cpe_platform
Single platform representation in CPE language.
Definition cpelang_priv.c:73
cpe_testexpr
CPE language boolean expression.
Definition cpelang_priv.h:51
cpe_testexpr::oper
cpe_lang_oper_t oper
operator
Definition cpelang_priv.h:52
cpe_testexpr::meta
union cpe_testexpr::@170136210124066275237173374051151247027062323172 meta
operation metadata
cpe_testexpr::expr
struct oscap_list * expr
array of subexpressions for operators
Definition cpelang_priv.h:54
cpe_testexpr::cpe
struct cpe_name * cpe
CPE for match operation.
Definition cpelang_priv.h:55
oscap_list
Definition list.h:53