<!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/CPE/public/cpeuri.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/CPE/public/cpeuri.h</div> </div> </div> <div class="contents"> <a href="cpeuri_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00015"></a>00015 <span class="comment">/*</span> <a name="l00016"></a>00016 <span class="comment"> * Copyright 2009 Red Hat Inc., Durham, North Carolina.</span> <a name="l00017"></a>00017 <span class="comment"> * All Rights Reserved.</span> <a name="l00018"></a>00018 <span class="comment"> *</span> <a name="l00019"></a>00019 <span class="comment"> * This library is free software; you can redistribute it and/or</span> <a name="l00020"></a>00020 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span> <a name="l00021"></a>00021 <span class="comment"> * License as published by the Free Software Foundation; either</span> <a name="l00022"></a>00022 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span> <a name="l00023"></a>00023 <span class="comment"> *</span> <a name="l00024"></a>00024 <span class="comment"> * This library is distributed in the hope that it will be useful, </span> <a name="l00025"></a>00025 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00026"></a>00026 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00027"></a>00027 <span class="comment"> * Lesser General Public License for more details.</span> <a name="l00028"></a>00028 <span class="comment"> *</span> <a name="l00029"></a>00029 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span> <a name="l00030"></a>00030 <span class="comment"> * License along with this library; if not, write to the Free Software </span> <a name="l00031"></a>00031 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span> <a name="l00032"></a>00032 <span class="comment"> *</span> <a name="l00033"></a>00033 <span class="comment"> * Authors:</span> <a name="l00034"></a>00034 <span class="comment"> * Lukas Kuklinek <lkuklinek@redhat.com></span> <a name="l00035"></a>00035 <span class="comment"> */</span> <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="preprocessor">#ifndef _CPEURI_H_</span> <a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define _CPEURI_H_</span> <a name="l00039"></a>00039 <span class="preprocessor"></span> <a name="l00040"></a>00040 <span class="preprocessor">#include <stdbool.h></span> <a name="l00041"></a>00041 <span class="preprocessor">#include <stdlib.h></span> <a name="l00042"></a>00042 <span class="preprocessor">#include <stdio.h></span> <a name="l00043"></a>00043 <a name="l00045"></a><a class="code" href="group__cpeuri.html#ga683b693cae1d4b68f257be24c4cc2ab7">00045</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { <a name="l00046"></a><a class="code" href="group__cpeuri.html#gga683b693cae1d4b68f257be24c4cc2ab7a5c781205ea171ce6daacf4202cd8dfcd">00046</a> <a class="code" href="group__cpeuri.html#gga683b693cae1d4b68f257be24c4cc2ab7a5c781205ea171ce6daacf4202cd8dfcd" title="no part specified">CPE_PART_NONE</a>, <a name="l00047"></a><a class="code" href="group__cpeuri.html#gga683b693cae1d4b68f257be24c4cc2ab7a56e20d753d7bacb0a52ab1e2f77deef9">00047</a> <a class="code" href="group__cpeuri.html#gga683b693cae1d4b68f257be24c4cc2ab7a56e20d753d7bacb0a52ab1e2f77deef9" title="hardware">CPE_PART_HW</a>, <a name="l00048"></a><a class="code" href="group__cpeuri.html#gga683b693cae1d4b68f257be24c4cc2ab7abcc204922bfb1b0b9aeee3e9c5253150">00048</a> <a class="code" href="group__cpeuri.html#gga683b693cae1d4b68f257be24c4cc2ab7abcc204922bfb1b0b9aeee3e9c5253150" title="operating system">CPE_PART_OS</a>, <a name="l00049"></a><a class="code" href="group__cpeuri.html#gga683b693cae1d4b68f257be24c4cc2ab7a6a885dbf3b1805209dd77f9c4747850a">00049</a> <a class="code" href="group__cpeuri.html#gga683b693cae1d4b68f257be24c4cc2ab7a6a885dbf3b1805209dd77f9c4747850a" title="application">CPE_PART_APP</a> <a name="l00050"></a>00050 } <a class="code" href="group__cpeuri.html#ga683b693cae1d4b68f257be24c4cc2ab7" title="enumeration of possible CPE parts">cpe_part_t</a>; <a name="l00051"></a>00051 <a name="l00058"></a>00058 <span class="keyword">struct </span><a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a>; <a name="l00059"></a>00059 <a name="l00069"></a>00069 <span class="keyword">struct </span><a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *<a class="code" href="group__cpeuri.html#ga6177bf1f59c75b3cdace48d52a817257" title="Create a new CPE structure from string cpe.">cpe_name_new</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *cpe); <a name="l00070"></a>00070 <a name="l00076"></a>00076 <span class="keyword">struct </span><a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> * <a class="code" href="group__cpeuri.html#gaabe4411fd5d2a955dd6c8e5f95fd2138" title="Clone CPE Name.">cpe_name_clone</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> * old_name); <a name="l00077"></a>00077 <a name="l00083"></a>00083 <span class="keywordtype">void</span> <a class="code" href="group__cpeuri.html#ga6fcacf25ee259b5b9343da178722ea1b" title="Destructor.">cpe_name_free</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00084"></a>00084 <a name="l00085"></a>00085 <span class="comment">/************************************************************/</span> <a name="l00097"></a>00097 <a class="code" href="group__cpeuri.html#ga683b693cae1d4b68f257be24c4cc2ab7" title="enumeration of possible CPE parts">cpe_part_t</a> <a class="code" href="group__cpeuri.html#ga9471548809b90edca59ae2cec770575e" title="Get CPE name part type field.">cpe_name_get_part</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00098"></a>00098 <a name="l00103"></a>00103 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="group__cpeuri.html#ga8407fac5886e8440ebe512fe99e3038e" title="Get CPE name vendor field.">cpe_name_get_vendor</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00104"></a>00104 <a name="l00109"></a>00109 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="group__cpeuri.html#gacb0ea70e7a1f33e597c7a5c949852e5e" title="Get CPE name product field.">cpe_name_get_product</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00110"></a>00110 <a name="l00115"></a>00115 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="group__cpeuri.html#ga441bc68b100261b3a477ba10bea9f319" title="Get CPE name version field.">cpe_name_get_version</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00116"></a>00116 <a name="l00121"></a>00121 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="group__cpeuri.html#ga13d719e99ec308110024e87aaeb1309e" title="Get CPE name update field.">cpe_name_get_update</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00122"></a>00122 <a name="l00127"></a>00127 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="group__cpeuri.html#ga636aef898ccd7b5e7314336a4756add9" title="Get CPE name edition field.">cpe_name_get_edition</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00128"></a>00128 <a name="l00133"></a>00133 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="group__cpeuri.html#gaeb40ced7dc773e5303354ccd6ddeb07b" title="Get CPE name language field.">cpe_name_get_language</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00134"></a>00134 <a name="l00143"></a>00143 <span class="keywordtype">char</span> *<a class="code" href="group__cpeuri.html#ga855d92cdf74999859b86ef855b8a3170" title="Return CPE URI as a new string.">cpe_name_get_uri</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe); <a name="l00144"></a>00144 <a name="l00145"></a>00145 <span class="comment">/************************************************************/</span> <a name="l00148"></a>00148 <span class="comment">/************************************************************/</span> <a name="l00160"></a>00160 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#gae91ca3e6fb76cacf2f2bbf3227fa3050" title="Set CPE name part type field.">cpe_name_set_part</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, <a class="code" href="group__cpeuri.html#ga683b693cae1d4b68f257be24c4cc2ab7" title="enumeration of possible CPE parts">cpe_part_t</a> newval); <a name="l00161"></a>00161 <a name="l00166"></a>00166 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#gaca661342dca3ba6f24396c3c4d52e995" title="Set CPE name vendor field.">cpe_name_set_vendor</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, <span class="keyword">const</span> <span class="keywordtype">char</span> *newval); <a name="l00167"></a>00167 <a name="l00172"></a>00172 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#ga9ac1773a3bafd52855835bea7a9fc1d7" title="Set CPE name product field.">cpe_name_set_product</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, <span class="keyword">const</span> <span class="keywordtype">char</span> *newval); <a name="l00173"></a>00173 <a name="l00178"></a>00178 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#ga6a65fbe17d81d69cac34c4d848f1be35" title="Set CPE name version field.">cpe_name_set_version</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, <span class="keyword">const</span> <span class="keywordtype">char</span> *newval); <a name="l00179"></a>00179 <a name="l00184"></a>00184 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#ga1d90b5f12042253d4455efb2d33c4730" title="Set CPE name update field.">cpe_name_set_update</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, <span class="keyword">const</span> <span class="keywordtype">char</span> *newval); <a name="l00185"></a>00185 <a name="l00190"></a>00190 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#ga8fa070ce8bc4d6811ba68388328c5cea" title="Set CPE name edition field.">cpe_name_set_edition</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, <span class="keyword">const</span> <span class="keywordtype">char</span> *newval); <a name="l00191"></a>00191 <a name="l00196"></a>00196 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#ga7f069900ea6c421e00a38caff4cf768a" title="Set CPE name language field.">cpe_name_set_language</a>(<span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, <span class="keyword">const</span> <span class="keywordtype">char</span> *newval); <a name="l00197"></a>00197 <a name="l00198"></a>00198 <span class="comment">/************************************************************/</span> <a name="l00201"></a>00201 <span class="comment">/************************************************************/</span> <a name="l00212"></a>00212 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#gaf3b2a0e23c35f22e126a9cd221bd6e70" title="Check if candidate CPE cpe matches CPE against according to CPE specification v 2.1.">cpe_name_match_one</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *against); <a name="l00213"></a>00213 <a name="l00222"></a>00222 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#gada347ce1193dc959312f0fefbdab9fa3" title="Check if CPE name matches any CPE in namelist.">cpe_name_match_cpes</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *name, <span class="keywordtype">size_t</span> n, <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> **namelist); <a name="l00223"></a>00223 <a name="l00232"></a>00232 <span class="keywordtype">int</span> <a class="code" href="group__cpeuri.html#ga5830b374983190bd7a0bdabd93808a03" title="Write CPE URI cpe to file a descriptor f.">cpe_name_write</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structcpe__name.html" title="Structure holding Common Platform Enumeration URI data.">cpe_name</a> *cpe, FILE * f); <a name="l00233"></a>00233 <a name="l00239"></a>00239 <span class="keywordtype">bool</span> <a class="code" href="group__cpeuri.html#gafd151f3ad1a0a5df02ad69643f083c19" title="Ensures str is in proper CPE format.">cpe_name_check</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str); <a name="l00240"></a>00240 <a name="l00251"></a>00251 <span class="keywordtype">int</span> <a class="code" href="group__cpeuri.html#ga12c833bf057353c756b92570e0cfa047" title="Match CPE URI candidate against list of n CPE URIs given by targets.">cpe_name_match_strs</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *candidate, <span class="keywordtype">size_t</span> n, <span class="keywordtype">char</span> **targets); <a name="l00252"></a>00252 <a name="l00258"></a>00258 <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="group__cpeuri.html#gaf107a1e1f7eb3aa94d941e003585f6a1" title="Get supported version of CPE uri XML.">cpe_name_supported</a>(<span class="keywordtype">void</span>); <a name="l00259"></a>00259 <a name="l00260"></a>00260 <span class="comment">/************************************************************/</span> <a name="l00264"></a>00264 <a name="l00267"></a>00267 <span class="preprocessor">#endif </span><span class="comment">/* _CPEURI_H_ */</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>