Open SCAP Library
|
00001 00008 /* 00009 * Copyright 2009-2010 Red Hat Inc., Durham, North Carolina. 00010 * All Rights Reserved. 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2.1 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Lesser General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 * Authors: 00027 * "David Niemoller" <David.Niemoller@g2-inc.com> 00028 */ 00029 00030 #ifndef OVAL_AGENT_API_IMPL_H_ 00031 #define OVAL_AGENT_API_IMPL_H_ 00032 00033 #include "public/oval_agent_api.h" 00034 #include "oval_definitions_impl.h" 00035 #include "../common/util.h" 00036 00037 OSCAP_HIDDEN_START; 00038 00039 #define OVAL_ENUMERATION_INVALID (-1) 00040 00041 #define OVAL_SUPPORTED "5.8" 00042 00043 #define OVAL_COMMON_NAMESPACE BAD_CAST "http://oval.mitre.org/XMLSchema/oval-common-5" 00044 #define OVAL_SYSCHAR_NAMESPACE BAD_CAST "http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" 00045 #define OVAL_RESULTS_NAMESPACE BAD_CAST "http://oval.mitre.org/XMLSchema/oval-results-5" 00046 #define OVAL_DEFINITIONS_NAMESPACE BAD_CAST "http://oval.mitre.org/XMLSchema/oval-definitions-5" 00047 #define OVAL_DIGSIG_NAMESPACE BAD_CAST "http://www.w3.org/2000/09/xmldsig#" 00048 #define OVAL_VARIABLES_NAMESPACE BAD_CAST "http://oval.mitre.org/XMLSchema/oval-variables-5" 00049 00050 /*#define OVAL_DEF_SCHEMA_LOCATION_DEF_PX "http://oval.mitre.org/XMLSchema/oval-definitions-5 http://oval.mitre.org/language/download/schema/version" 00051 #define OVAL_DEF_SCHEMA_LOCATION_DEF_SX "/ovaldefinition/complete/oval-definitions-schema.xsd" 00052 #define OVAL_DEF_SCHEMA_LOCATION_IND_PX "http://oval.mitre.org/XMLSchema/oval-definitions-5#independent http://oval.mitre.org/language/download/schema/version" 00053 #define OVAL_DEF_SCHEMA_LOCATION_IND_SX "/ovaldefinition/complete/independent-definitions-schema.xsd" 00054 #define OVAL_DEF_SCHEMA_LOCATION_UNX_PX "http://oval.mitre.org/XMLSchema/oval-definitions-5#unix http://oval.mitre.org/language/download/schema/version" 00055 #define OVAL_DEF_SCHEMA_LOCATION_UNX_SX "/ovaldefinition/complete/unix-definitions-schema.xsd" 00056 #define OVAL_DEF_SCHEMA_LOCATION_LNX_PX "http://oval.mitre.org/XMLSchema/oval-definitions-5#linux http://oval.mitre.org/language/download/schema/version" 00057 #define OVAL_DEF_SCHEMA_LOCATION_LNX_SX "/ovaldefinition/complete/linux-definitions-schema.xsd" 00058 #define OVAL_DEF_SCHEMA_LOCATION_CMN_PX "http://oval.mitre.org/XMLSchema/oval-common-5 http://oval.mitre.org/language/download/schema/version" 00059 #define OVAL_DEF_SCHEMA_LOCATION_CMN_SX "/ovaldefinition/complete/oval-common-schema.xsd" 00060 */ 00061 00062 #define OVAL_DEF_SCHEMA_LOCATION "http://oval.mitre.org/XMLSchema/oval-definitions-5 http://oval.mitre.org/language/download/schema/version5.5/ovaldefinition/complete/oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent http://oval.mitre.org/language/download/schema/version5.5/ovaldefinition/complete/independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix http://oval.mitre.org/language/download/schema/version5.5/ovaldefinition/complete/unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux http://oval.mitre.org/language/download/schema/version5.5/ovaldefinition/complete/linux-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 http://oval.mitre.org/language/download/schema/version5.5/ovaldefinition/complete/linux-common-schema.xsd" 00063 00064 #define OVAL_SYS_SCHEMA_LOCATION "http://oval.mitre.org/XMLSchema/oval-system-characteristics-5 http://oval.mitre.org/language/version5.5/ovalsc/complete/oval-system-characteristics-schema.xsd http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent http://oval.mitre.org/language/version5.5/ovalsc/complete/independent-system-characteristics-schema.xsd http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix http://oval.mitre.org/language/version5.5/ovalsc/complete/unix-system-characteristics-schema.xsd http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux http://oval.mitre.org/language/version5.5/ovalsc/complete/linux-system-characteristics-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 http://oval.mitre.org/language/version5.5/ovalsc/complete/oval-common-schema.xsd" 00065 00066 #define OVAL_RES_SCHEMA_LOCATION "http://oval.mitre.org/XMLSchema/oval-results-5 http://oval.mitre.org/language/version5.5/ovalresults/complete/oval-results-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 http://oval.mitre.org/language/version5.5/ovalresults/complete/oval-common-schema.xsd" 00067 00068 #define OVAL_XMLNS_XSI BAD_CAST "http://www.w3.org/2001/XMLSchema-instance" 00069 00070 const char * oval_definition_model_get_schema(struct oval_definition_model * model); 00071 void oval_definition_model_set_schema(struct oval_definition_model *model, const char *version); 00072 00073 void oval_syschar_model_set_schema(struct oval_syschar_model *model, const char * schema); 00074 const char * oval_syschar_model_get_schema(struct oval_syschar_model * model); 00075 00076 struct oval_definition *oval_definition_get_new(struct oval_definition_model *, const char *); 00077 00078 typedef bool oval_definitions_resolver(struct oval_definition *, void *); 00079 00080 xmlNode *oval_definitions_to_dom(struct oval_definition_model *definition_model, xmlDocPtr doc, xmlNode * parent); 00081 00082 struct oval_test *oval_test_get_new(struct oval_definition_model *, const char *); 00083 struct oval_object *oval_object_get_new(struct oval_definition_model *, const char *); 00084 struct oval_state *oval_state_get_new(struct oval_definition_model *, const char *); 00085 struct oval_variable *oval_variable_get_new(struct oval_definition_model *, const char *, oval_variable_type_t type); 00086 00087 struct oval_syschar *oval_syschar_get_new(struct oval_syschar_model *, struct oval_object *); 00088 struct oval_syschar_item *oval_syschar_item_get_new(struct oval_syschar_model *, const char *); 00089 struct oval_sysitem *oval_sysitem_get_new(struct oval_syschar_model *model, const char *id); 00090 00091 typedef bool oval_syschar_resolver(struct oval_syschar *, void *); 00092 00093 xmlNode *oval_syschar_model_to_dom(struct oval_syschar_model *, xmlDocPtr, xmlNode *, oval_syschar_resolver, void *); 00094 void oval_syschar_model_reset(struct oval_syschar_model *model); 00095 00096 OSCAP_HIDDEN_END; 00097 00098 #endif /* OVAL_AGENT_API_IMPL_H_ */