<!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/openscap/openscap-0.5.7/src/common/public/error.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.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <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 class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <h1>/home/pvrabec/openscap/openscap-0.5.7/src/common/public/error.h</h1><a href="error_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 <a name="l00029"></a>00029 <span class="preprocessor">#pragma once</span> <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#ifndef OSCAP_ERROR_H</span> <a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define OSCAP_ERROR_H</span> <a name="l00032"></a>00032 <span class="preprocessor"></span> <a name="l00033"></a>00033 <span class="preprocessor">#include <stdint.h></span> <a name="l00034"></a>00034 <span class="preprocessor">#include <stdbool.h></span> <a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="keyword">typedef</span> uint16_t oscap_errfamily_t; <a name="l00037"></a>00037 <span class="keyword">typedef</span> uint16_t oscap_errcode_t; <a name="l00038"></a>00038 <a name="l00045"></a><a class="code" href="group__ERRORS.html#ga0ed353169f944f7e4d075e6c462511b1">00045</a> <span class="preprocessor">#define OSCAP_ELEVEL_NONE 0 </span> <a name="l00046"></a><a class="code" href="group__ERRORS.html#gad0c7a798b14ee03a65f26059b3228a1d">00046</a> <span class="preprocessor">#define OSCAP_ELEVEL_WARNING 1 </span> <a name="l00047"></a><a class="code" href="group__ERRORS.html#gab494886d54bb962830923f1f37e38f69">00047</a> <span class="preprocessor">#define OSCAP_ELEVEL_ERROR 2 </span> <a name="l00048"></a><a class="code" href="group__ERRORS.html#ga3b392fe03aa1ba3c84006d3adec7575c">00048</a> <span class="preprocessor">#define OSCAP_ELEVEL_FATAL 3 </span> <a name="l00055"></a><a class="code" href="group__ERRORS.html#ga2a4b222f295b167554e471b040639383">00055</a> <span class="preprocessor">#define OSCAP_EFAMILY_NONE 0 </span> <a name="l00056"></a><a class="code" href="group__ERRORS.html#gacc53d2370c80b6ed73177e50cadd9dff">00056</a> <span class="preprocessor">#define OSCAP_EFAMILY_GLIBC 1 </span> <a name="l00057"></a><a class="code" href="group__ERRORS.html#ga5c221a396c86b253134dcf2cdd8fffc6">00057</a> <span class="preprocessor">#define OSCAP_EFAMILY_XML 2 </span> <a name="l00058"></a><a class="code" href="group__ERRORS.html#ga063ef25dbff56281ad8b88bd3e5637a2">00058</a> <span class="preprocessor">#define OSCAP_EFAMILY_OSCAP 3 </span> <a name="l00059"></a><a class="code" href="group__ERRORS.html#gac0e81243524424435f8099c768fd3ab3">00059</a> <span class="preprocessor">#define OSCAP_EFAMILY_OVAL 4 </span> <a name="l00067"></a><a class="code" href="group__ERRORS.html#gaae500549b229e017c725e9966cd2a2c4">00067</a> <span class="preprocessor">#define OSCAP_ENONE 0 </span> <a name="l00068"></a><a class="code" href="group__ERRORS.html#gaf91e97093f1908b1f17107f6eeedde56">00068</a> <span class="preprocessor">#define OSCAP_EALLOC 1 </span> <a name="l00069"></a><a class="code" href="group__ERRORS.html#ga7f49cf2c3395080d9e20eb4929f1e4c1">00069</a> <span class="preprocessor">#define OSCAP_EXMLELEM 2 </span> <a name="l00070"></a><a class="code" href="group__ERRORS.html#ga46726341cece72639c5f2b4fc7295516">00070</a> <span class="preprocessor">#define OSCAP_EXMLNODETYPE 3 </span> <a name="l00071"></a><a class="code" href="group__ERRORS.html#ga27e56d550fd6b4552d121ca3a8ae4d56">00071</a> <span class="preprocessor">#define OSCAP_EXMLNOELEMENT 4 </span> <a name="l00072"></a><a class="code" href="group__ERRORS.html#ga9699911605704906159aabccdf4a91f5">00072</a> <span class="preprocessor">#define OSCAP_ECPEINVOP 5 </span> <a name="l00073"></a><a class="code" href="group__ERRORS.html#ga7b7d8374463e1b1f8fbcbaa29a3cd881">00073</a> <span class="preprocessor">#define OSCAP_EOVALINT 6 </span> <a name="l00074"></a><a class="code" href="group__ERRORS.html#ga69e77261ac3dff2ff961e7c08a719d33">00074</a> <span class="preprocessor">#define OSCAP_EREGEXP 7 </span> <a name="l00075"></a><a class="code" href="group__ERRORS.html#ga632665abf7879d5d83f72e9eeda8fc8a">00075</a> <span class="preprocessor">#define OSCAP_EREGEXPCOMP 8 </span> <a name="l00076"></a><a class="code" href="group__ERRORS.html#ga176ff2af193aea64e6c04937cab7559b">00076</a> <span class="preprocessor">#define OSCAP_EUNDATATYPE 9 </span> <a name="l00077"></a><a class="code" href="group__ERRORS.html#gaa703884800f0698cec4b4c962c2dbceb">00077</a> <span class="preprocessor">#define OSCAP_EINVARG 10 </span> <a name="l00078"></a><a class="code" href="group__ERRORS.html#ga0302d365e7db2adf84ea1d6c73b9d382">00078</a> <span class="preprocessor">#define OSCAP_EVARTYPE 11 </span> <a name="l00079"></a><a class="code" href="group__ERRORS.html#ga7f036c14907d908874999d9ede0a77af">00079</a> <span class="preprocessor">#define OSCAP_ESEAPINIT 12 </span> <a name="l00080"></a><a class="code" href="group__ERRORS.html#ga59786eea4688dba343c2040528eebda1">00080</a> <span class="preprocessor">#define OSCAP_EUSER1 201 </span> <a name="l00081"></a><a class="code" href="group__ERRORS.html#gaee2c1605819089fe132e0d0efd375445">00081</a> <span class="preprocessor">#define OSCAP_EUSER2 202 </span> <a name="l00082"></a><a class="code" href="group__ERRORS.html#gaaa2f59e51ab637af202c9147f5b61acc">00082</a> <span class="preprocessor">#define OSCAP_ENOTIMPL 254 </span> <a name="l00083"></a><a class="code" href="group__ERRORS.html#ga3246fd5141f9216a29b81f95dfe557f6">00083</a> <span class="preprocessor">#define OSCAP_EUNKNOWN 255 </span> <a name="l00086"></a>00086 <span class="preprocessor">#define oscap_seterr(family, code, desc) __oscap_seterr (__FILE__, __LINE__, __PRETTY_FUNCTION__, family, code, desc)</span> <a name="l00087"></a>00087 <span class="preprocessor"></span> <a name="l00088"></a>00088 <a name="l00094"></a>00094 <span class="keywordtype">void</span> __oscap_seterr(<span class="keyword">const</span> <span class="keywordtype">char</span> *file, uint32_t line, <span class="keyword">const</span> <span class="keywordtype">char</span> *func, <a name="l00095"></a>00095 oscap_errfamily_t family, oscap_errcode_t code, <span class="keyword">const</span> <span class="keywordtype">char</span> *desc); <a name="l00096"></a>00096 <a name="l00100"></a>00100 <span class="keywordtype">void</span> <a class="code" href="group__ERRORS.html#ga460f0799ef0d3718e656525d78b3f77d" title="Clear an error.">oscap_clearerr</a>(<span class="keywordtype">void</span>); <a name="l00101"></a>00101 <a name="l00105"></a>00105 <span class="keywordtype">bool</span> <a class="code" href="group__ERRORS.html#ga6250756dc15760ad37288410b1117433" title="Check for an error.">oscap_err</a>(<span class="keywordtype">void</span>); <a name="l00106"></a>00106 <a name="l00110"></a>00110 oscap_errfamily_t <a class="code" href="group__ERRORS.html#gaf5a130197519ab79f452a592c327c89b" title="Get last error family.">oscap_err_family</a>(<span class="keywordtype">void</span>); <a name="l00111"></a>00111 <a name="l00115"></a>00115 oscap_errcode_t <a class="code" href="group__ERRORS.html#ga7a04a1e9253a5097bf25c1520ab75c58" title="Get last error code.">oscap_err_code</a>(<span class="keywordtype">void</span>); <a name="l00116"></a>00116 <a name="l00120"></a>00120 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="group__ERRORS.html#ga40156d16cfcddd2596f56b9fcc5f752f" title="Get last error description.">oscap_err_desc</a>(<span class="keywordtype">void</span>); <a name="l00121"></a>00121 <a name="l00124"></a>00124 <span class="preprocessor">#endif </span><span class="comment">/* OSCAP_ERROR_H */</span> </pre></div></div> <hr size="1"/><address style="text-align: right;"><small>Generated on 26 Feb 2010 for Open SCAP Library by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>