<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Open SCAP Library: /home/pvrabec/project/openscap/openscap-0.7.4/src/common/public/oscap.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Open SCAP Library</div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <div class="title">/home/pvrabec/project/openscap/openscap-0.7.4/src/common/public/oscap.h</div> </div> </div> <div class="contents"> <a href="oscap_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * Copyright 2009 Red Hat Inc., Durham, North Carolina.</span> <a name="l00003"></a>00003 <span class="comment"> * All Rights Reserved.</span> <a name="l00004"></a>00004 <span class="comment"> *</span> <a name="l00005"></a>00005 <span class="comment"> * This library is free software; you can redistribute it and/or</span> <a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span> <a name="l00007"></a>00007 <span class="comment"> * License as published by the Free Software Foundation; either</span> <a name="l00008"></a>00008 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span> <a name="l00009"></a>00009 <span class="comment"> *</span> <a name="l00010"></a>00010 <span class="comment"> * This library is distributed in the hope that it will be useful, </span> <a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00013"></a>00013 <span class="comment"> * Lesser General Public License for more details.</span> <a name="l00014"></a>00014 <span class="comment"> *</span> <a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span> <a name="l00016"></a>00016 <span class="comment"> * License along with this library; if not, write to the Free Software </span> <a name="l00017"></a>00017 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span> <a name="l00018"></a>00018 <span class="comment"> *</span> <a name="l00019"></a>00019 <span class="comment"> * Authors:</span> <a name="l00020"></a>00020 <span class="comment"> * Lukas Kuklinek <lkuklinek@redhat.com></span> <a name="l00021"></a>00021 <span class="comment"> */</span> <a name="l00022"></a>00022 <a name="l00032"></a>00032 <span class="preprocessor">#ifndef OSCAP_H_</span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define OSCAP_H_</span> <a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#include <stdbool.h></span> <a name="l00035"></a>00035 <span class="preprocessor">#include <wchar.h></span> <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="text_8h.html" title="Multilingual text processing interface.">text.h</a>"</span> <a name="l00038"></a>00038 <span class="preprocessor">#include "reference.h"</span> <a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="reporter_8h.html" title="Reporters interface.">reporter.h</a>"</span> <a name="l00040"></a>00040 <a name="l00041"></a>00041 <a name="l00065"></a><a class="code" href="group__ITER.html#gaea98dedf8ff9418609496bb11ff8c66c">00065</a> <span class="preprocessor">#define OSCAP_FOREACH_GENERIC(itype, vtype, val, init_val, code) \</span> <a name="l00066"></a>00066 <span class="preprocessor"> { \</span> <a name="l00067"></a>00067 <span class="preprocessor"> struct itype##_iterator *val##_iter = (init_val); \</span> <a name="l00068"></a>00068 <span class="preprocessor"> vtype val; \</span> <a name="l00069"></a>00069 <span class="preprocessor"> while (itype##_iterator_has_more(val##_iter)) { \</span> <a name="l00070"></a>00070 <span class="preprocessor"> val = itype##_iterator_next(val##_iter); \</span> <a name="l00071"></a>00071 <span class="preprocessor"> code \</span> <a name="l00072"></a>00072 <span class="preprocessor"> } \</span> <a name="l00073"></a>00073 <span class="preprocessor"> itype##_iterator_free(val##_iter); \</span> <a name="l00074"></a>00074 <span class="preprocessor"> }</span> <a name="l00075"></a>00075 <span class="preprocessor"></span> <a name="l00084"></a><a class="code" href="group__ITER.html#ga252a13d8be22bb101a8732987eb4e828">00084</a> <span class="preprocessor">#define OSCAP_FOREACH(type, val, init_val, code) \</span> <a name="l00085"></a>00085 <span class="preprocessor"> OSCAP_FOREACH_GENERIC(type, struct type *, val, init_val, code)</span> <a name="l00086"></a>00086 <span class="preprocessor"></span> <a name="l00094"></a><a class="code" href="group__ITER.html#gafdd9cc9b1ae693c07dd4ff9727cfb019">00094</a> <span class="preprocessor">#define OSCAP_FOREACH_STR(val, init_val, code) \</span> <a name="l00095"></a>00095 <span class="preprocessor"> OSCAP_FOREACH_GENERIC(oscap_string, const char *, val, init_val, code)</span> <a name="l00096"></a>00096 <span class="preprocessor"></span> <a name="l00108"></a><a class="code" href="group__ITER.html#gae94ba5c82c04c4119b11bbf8be56ed69">00108</a> <span class="preprocessor">#define OSCAP_FOR_GENERIC(itype, vtype, val, init_val) \</span> <a name="l00109"></a>00109 <span class="preprocessor"> vtype val = NULL; struct itype##_iterator *val##_iter = (init_val); \</span> <a name="l00110"></a>00110 <span class="preprocessor"> while (itype##_iterator_has_more(val##_iter) \</span> <a name="l00111"></a>00111 <span class="preprocessor"> ? (val = itype##_iterator_next(val##_iter), true) \</span> <a name="l00112"></a>00112 <span class="preprocessor"> : (itype##_iterator_free(val##_iter), val##_iter = NULL, false))</span> <a name="l00113"></a>00113 <span class="preprocessor"></span> <a name="l00121"></a><a class="code" href="group__ITER.html#ga4531eed65f8744afef6718920525395c">00121</a> <span class="preprocessor">#define OSCAP_FOR(type, val, init_val) OSCAP_FOR_GENERIC(type, struct type *, val, init_val)</span> <a name="l00122"></a>00122 <span class="preprocessor"></span> <a name="l00129"></a><a class="code" href="group__ITER.html#ga9f9c24f232e5ad2aeeeed602b7b0008c">00129</a> <span class="preprocessor">#define OSCAP_FOR_STR(val, init_val) OSCAP_FOR_GENERIC(oscap_string, const char *, val, init_val)</span> <a name="l00130"></a>00130 <span class="preprocessor"></span> <a name="l00133"></a>00133 <a name="l00134"></a>00134 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> <a class="code" href="group__COMMON.html#ga565da2b8c2c6394c634e3d9acb5a8c3a" title="OS-specific filesystem path delimiter.">OSCAP_OS_PATH_DELIM</a>; <a name="l00135"></a>00135 <a name="l00137"></a>00137 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> <a class="code" href="group__COMMON.html#gaeec1d42e5522500053c221de60e55b2c" title="Default XML Schema path (if not overridden by the environment variable)">OSCAP_SCHEMA_PATH</a>; <a name="l00138"></a>00138 <a name="l00140"></a>00140 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> <a class="code" href="group__COMMON.html#gac6db487dff8c75b0e3af7de2ee4a1e0d" title="Default XSLT path (if not overridden by the environment variable)">OSCAP_XSLT_PATH</a>; <a name="l00141"></a>00141 <a name="l00142"></a>00142 <a name="l00152"></a>00152 <span class="keywordtype">void</span> <a class="code" href="group__COMMON.html#ga732247519dc74a72214c7d8c7ea65a52" title="Initialize OpenSCAP library.">oscap_init</a>(<span class="keywordtype">void</span>); <a name="l00153"></a>00153 <a name="l00161"></a>00161 <span class="keywordtype">void</span> <a class="code" href="group__COMMON.html#gad47f11d32a4245a127c078d52269312c" title="Release library internal caches.">oscap_cleanup</a>(<span class="keywordtype">void</span>); <a name="l00162"></a>00162 <a name="l00164"></a>00164 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="group__COMMON.html#ga01435a7960889179bcedbfafaae5a097" title="Get version of the OpenSCAP library.">oscap_get_version</a>(<span class="keywordtype">void</span>); <a name="l00165"></a>00165 <a name="l00166"></a>00166 <a name="l00173"></a>00173 <a name="l00174"></a><a class="code" href="group__VALID.html#gae11fc65de255d812d72c1f563146200f">00174</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="group__VALID.html#gae11fc65de255d812d72c1f563146200f" title="SCAP document type identifiers.">oscap_document_type</a> { <a name="l00175"></a><a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fafc43196d876e7510c731e9329268b270">00175</a> <a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fafc43196d876e7510c731e9329268b270" title="OVAL Definitions file.">OSCAP_DOCUMENT_OVAL_DEFINITIONS</a> = 1, <a name="l00176"></a><a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fa1beeca5febf1d503ef68b382a515ac0a">00176</a> <a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fa1beeca5febf1d503ef68b382a515ac0a" title="OVAL Variables.">OSCAP_DOCUMENT_OVAL_VARIABLES</a>, <a name="l00177"></a><a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fae8e342ea95744c96444f967671f19fa6">00177</a> <a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fae8e342ea95744c96444f967671f19fa6" title="OVAL system characteristics file.">OSCAP_DOCUMENT_OVAL_SYSCHAR</a>, <a name="l00178"></a><a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200faf668682d31530ba654ad6a501ff2c558">00178</a> <a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200faf668682d31530ba654ad6a501ff2c558" title="OVAL results file.">OSCAP_DOCUMENT_OVAL_RESULTS</a>, <a name="l00179"></a><a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fa3f530686b986be0046ea4b043a3c0ade">00179</a> <a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fa3f530686b986be0046ea4b043a3c0ade" title="XCCDF benchmark file.">OSCAP_DOCUMENT_XCCDF</a>, <a name="l00180"></a><a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200faae51c5951377f65c31e676fdd2e7acf0">00180</a> <a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200faae51c5951377f65c31e676fdd2e7acf0" title="CPE language file.">OSCAP_DOCUMENT_CPE_LANGUAGE</a>, <a name="l00181"></a><a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fa2a2868aeedeafe930100ee5b7695d75f">00181</a> <a class="code" href="group__VALID.html#ggae11fc65de255d812d72c1f563146200fa2a2868aeedeafe930100ee5b7695d75f" title="CPE dictionary file.">OSCAP_DOCUMENT_CPE_DICTIONARY</a>, <a name="l00182"></a>00182 } <a class="code" href="group__VALID.html#gac979f1141240cd8d0a762a2be9341965" title="SCAP document type identifiers.">oscap_document_type_t</a>; <a name="l00183"></a>00183 <a name="l00184"></a>00184 <a name="l00202"></a>00202 <span class="keywordtype">bool</span> <a class="code" href="group__VALID.html#gac6aa74cf46267b053514f7579d010717" title="Validate a SCAP document file against a XML schema.">oscap_validate_document</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *xmlfile, <a class="code" href="group__VALID.html#gac979f1141240cd8d0a762a2be9341965" title="SCAP document type identifiers.">oscap_document_type_t</a> doctype, <span class="keyword">const</span> <span class="keywordtype">char</span> *version, <a class="code" href="group__Reporters.html#gada96dbbbb54a7659c3acf1c00a7d7ad3" title="Reporter prototype.">oscap_reporter</a> reporter, <span class="keywordtype">void</span> *arg); <a name="l00203"></a>00203 <a name="l00217"></a>00217 <span class="keywordtype">bool</span> <a class="code" href="group__VALID.html#ga8c155b31c77a4e546a968321e140f671" title="Apply a XSLT stylesheet to a XML file.">oscap_apply_xslt</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *xmlfile, <span class="keyword">const</span> <span class="keywordtype">char</span> *xsltfile, <span class="keyword">const</span> <span class="keywordtype">char</span> *outfile, <span class="keyword">const</span> <span class="keywordtype">char</span> **params); <a name="l00218"></a>00218 <a name="l00232"></a>00232 <span class="keywordtype">bool</span> <a class="code" href="group__VALID.html#gaca7e3b5061c71dfdd6f589fc2741b4e7" title="Apply XSLT stylesheet to a XML file.">oscap_apply_xslt_var</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *xmlfile, <span class="keyword">const</span> <span class="keywordtype">char</span> *xsltfile, <span class="keyword">const</span> <span class="keywordtype">char</span> *outfile, <span class="keyword">const</span> <span class="keywordtype">char</span> **params, <span class="keyword">const</span> <span class="keywordtype">char</span> *pathvar, <span class="keyword">const</span> <span class="keywordtype">char</span> *defpath); <a name="l00233"></a>00233 <a name="l00234"></a>00234 <span class="comment">/************************************************************/</span> <a name="l00239"></a>00239 <span class="preprocessor">#endif</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated on Mon Jul 25 2011 for Open SCAP Library by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>