Open SCAP Library
/home/pvrabec/project/openscap/openscap-0.8.1/src/common/public/error.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009 Red Hat Inc., Durham, North Carolina.
00003  * All Rights Reserved.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00041 #pragma once
00042 #ifndef OSCAP_ERROR_H
00043 #define OSCAP_ERROR_H
00044 
00045 #include <stdint.h>
00046 #include <stdbool.h>
00047 
00049 typedef uint16_t oscap_errfamily_t;
00051 typedef uint16_t oscap_errcode_t;
00052 
00057 #define OSCAP_EFAMILY_NONE     0        
00058 #define OSCAP_EFAMILY_GLIBC    1        
00059 #define OSCAP_EFAMILY_XML      2        
00060 #define OSCAP_EFAMILY_OSCAP    3        
00061 #define OSCAP_EFAMILY_OVAL     4        
00062 #define OSCAP_EFAMILY_XCCDF    5        
00063 #define OSCAP_EFAMILY_SCE      6        
00070 #define OSCAP_ENONE         0   
00071 #define OSCAP_EXMLELEM      1   
00072 #define OSCAP_EINVARG       2   
00073 #define OSCAP_ENOTIMPL      254 
00080 #define OVAL_EOVALINT        1
00081 #define OVAL_EPROBE          253
00082 #define OVAL_EPROBEINVAL     254
00083 #define OVAL_EPROBECONTEXT   255
00084 #define OVAL_EPROBEINIT      256
00085 #define OVAL_EPROBECONN      257
00086 #define OVAL_EPROBENOTSUPP   258
00087 #define OVAL_EPROBEOBJINVAL  259
00088 #define OVAL_EPROBEITEMINVAL 260
00089 #define OVAL_EPROBENODATA    261
00090 #define OVAL_EPROBECLOSE     262
00091 #define OVAL_EPROBESEND      263
00092 #define OVAL_EPROBERECV      264
00093 #define OVAL_EPROBEOBJTRANS  265
00094 #define OVAL_EPROBEITEMTRANS 266
00095 #define OVAL_EPROBEUNKNOWN   511
00096 
00102 #define XCCDF_EREFIDCONFLICT  1   
00103 #define XCCDF_EREFGROUPATTR   2   
00104 #define XCCDF_EUNKNOWNTYPE    3   
00105 #define XCCDF_EUNKNOWNCB      4   
00106 #define XCCDF_EBADID          5   
00107 #define XCCDF_EVALUE          6   
00114 void oscap_clearerr(void);
00115 
00119 bool oscap_err(void);
00120 
00124 oscap_errfamily_t oscap_err_family(void);
00125 
00129 oscap_errcode_t oscap_err_code(void);
00130 
00134 const char *oscap_err_desc(void);
00135 
00136 
00137 #endif                          /* OSCAP_ERROR_H */