• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

/home/pvrabec/project/openscap/openscap-0.7.1/src/OVAL/oval_definitions_impl.h

Go to the documentation of this file.
00001 
00008 /*
00009  * Copyright 2009 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_DEFINITIONS_IMPL
00031 #define OVAL_DEFINITIONS_IMPL
00032 
00033 #include <libxml/xmlreader.h>
00034 #include "public/oval_definitions.h"
00035 #include "oval_parser_impl.h"
00036 #include "oval_agent_api_impl.h"
00037 #include "oval_string_map_impl.h"
00038 #include "../common/util.h"
00039 
00040 OSCAP_HIDDEN_START;
00041 
00042 oval_family_t oval_family_parse(xmlTextReaderPtr);
00043 oval_subtype_t oval_subtype_parse(xmlTextReaderPtr);
00044 oval_affected_family_t oval_affected_family_parse(xmlTextReaderPtr);
00045 oval_operator_t oval_operator_parse(xmlTextReaderPtr, char *, oval_operator_t);
00046 oval_operation_t oval_operation_parse(xmlTextReaderPtr, char *, oval_operation_t);
00047 oval_definition_class_t oval_definition_class_parse(xmlTextReaderPtr);
00048 oval_existence_t oval_existence_parse(xmlTextReaderPtr, char *, oval_existence_t);
00049 oval_check_t oval_check_parse(xmlTextReaderPtr, char *, oval_check_t);
00050 oval_entity_type_t oval_entity_type_parse(xmlTextReaderPtr);
00051 oval_datatype_t oval_datatype_parse(xmlTextReaderPtr, char *, oval_datatype_t);
00052 oval_entity_varref_type_t oval_entity_varref_type_parse(xmlTextReaderPtr);
00053 oval_setobject_type_t oval_set_type_parse(xmlTextReaderPtr);
00054 oval_setobject_operation_t oval_set_operation_parse(xmlTextReaderPtr, char *, oval_setobject_operation_t);
00055 oval_filter_action_t oval_filter_action_parse(xmlTextReaderPtr, char *, oval_filter_action_t);
00056 oval_variable_type_t oval_variable_type_parse(xmlTextReaderPtr);
00057 oval_component_type_t oval_component_type_parse(xmlTextReaderPtr);
00058 oval_arithmetic_operation_t oval_arithmetic_operation_parse(xmlTextReaderPtr, char *, oval_arithmetic_operation_t);
00059 oval_datetime_format_t oval_datetime_format_parse(xmlTextReaderPtr, char *, oval_arithmetic_operation_t);
00060 oval_message_level_t oval_message_level_parse(xmlTextReaderPtr, char *, oval_message_level_t);
00061 void oval_variable_set_type(struct oval_variable *variable, oval_variable_type_t type);
00062 
00063 typedef void (*oval_affected_consumer) (struct oval_affected *, void *);
00064 int oval_affected_parse_tag(xmlTextReaderPtr reader,
00065                             struct oval_parser_context *context, oval_affected_consumer, void *);
00066 void oval_affected_to_print(struct oval_affected *affected, char *indent, int idx);
00067 
00068 int oval_test_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context);
00069 void oval_test_to_print(struct oval_test *test, char *indent, int index);
00070 xmlNode *oval_test_to_dom(struct oval_test *, xmlDoc *, xmlNode *);
00071 
00072 void oval_criteria_node_to_print(struct oval_criteria_node *node, char *indent, int index);
00073 xmlNode *oval_criteria_node_to_dom(struct oval_criteria_node *, xmlDoc *, xmlNode *);
00074 typedef void (*oval_criteria_consumer) (struct oval_criteria_node *, void *);
00075 int oval_criteria_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_criteria_consumer, void *);
00076 
00077 typedef void (*oval_reference_consumer) (struct oval_reference *, void *);
00078 int oval_reference_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_reference_consumer, void *);
00079 void oval_reference_to_print(struct oval_reference *ref, char *indent, int index);
00080 
00081 int oval_definition_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context);
00082 void oval_definition_to_print(struct oval_definition *definition, char *indent, int idx);
00083 xmlNode *oval_definition_to_dom(struct oval_definition *, xmlDoc *, xmlNode *);
00084 
00085 int oval_object_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context);
00086 void oval_object_to_print(struct oval_object *object, char *indent, int idx);
00087 xmlNode *oval_object_to_dom(struct oval_object *, xmlDoc *, xmlNode *);
00088 struct oval_object *oval_object_clone2(struct oval_definition_model *, struct oval_object *, char *);
00089 struct oval_object *oval_object_create_internal(struct oval_object *, char *);
00090 struct oval_object *oval_object_get_base_obj(struct oval_object *);
00091 
00092 int oval_state_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context);
00093 void oval_state_to_print(struct oval_state *, char *indent, int index);
00094 xmlNode *oval_state_to_dom(struct oval_state *, xmlDoc *, xmlNode *);
00095 
00096 int oval_variable_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context);
00097 void oval_variable_to_print(struct oval_variable *variable, char *indent, int idx);
00098 xmlNode *oval_variable_to_dom(struct oval_variable *, xmlDoc *, xmlNode *);
00099 
00100 void oval_variable_binding_to_dom(struct oval_variable_binding *, xmlDoc *, xmlNode *);
00101 typedef void (*oval_variable_binding_consumer) (struct oval_variable_binding *, void *);
00102 int oval_variable_binding_parse_tag
00103     (xmlTextReaderPtr, struct oval_parser_context *, oval_variable_binding_consumer, void *);
00104 
00105 const char *oval_variable_type_get_text(oval_variable_type_t);
00106 const char *oval_filter_action_get_text(oval_filter_action_t);
00107 
00108 typedef void (*oval_filter_consumer) (struct oval_filter *, void *);
00109 int oval_filter_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_filter_consumer, void *);
00110 xmlNode *oval_filter_to_dom(struct oval_filter *, xmlDoc *, xmlNode *);
00111 
00112 typedef void (*oval_object_content_consumer) (struct oval_object_content *, void *);
00113 xmlNode *oval_object_content_to_dom(struct oval_object_content *, xmlDoc *, xmlNode *);
00114 int oval_object_content_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_object_content_consumer, void *);
00115 void oval_object_content_to_print(struct oval_object_content *, char *indent, int index);
00116 struct oval_filter *oval_object_content_get_filter(struct oval_object_content *);
00117 void oval_object_content_set_filter(struct oval_object_content *, struct oval_filter *);
00118 
00119 int oval_state_content_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oscap_consumer_func, void *);
00120 xmlNode *oval_state_content_to_dom(struct oval_state_content *, xmlDoc *, xmlNode *);
00121 
00122 typedef void (*oval_behavior_consumer) (struct oval_behavior *, void *);
00123 int oval_behavior_parse_tag(xmlTextReaderPtr, struct oval_parser_context *,
00124                             oval_family_t, oval_behavior_consumer, void *);
00125 void oval_behavior_to_print(struct oval_behavior *, char *indent, int index);
00126 
00127 int oval_entity_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oscap_consumer_func, void *);
00128 void oval_entity_to_print(struct oval_entity *, char *indent, int index);
00129 xmlNode *oval_entity_to_dom(struct oval_entity *, xmlDoc *, xmlNode *);
00130 
00131 typedef void (*oval_set_consumer) (struct oval_setobject *, void *);
00132 int oval_set_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_set_consumer, void *);
00133 void oval_set_to_print(struct oval_setobject *, char *indent, int index);
00134 xmlNode *oval_set_to_dom(struct oval_setobject *, xmlDoc *, xmlNode *);
00135 void oval_set_propagate_filters(struct oval_definition_model *, struct oval_setobject *, char *);
00136 
00137 typedef void (*oval_value_consumer) (struct oval_value *, void *);
00138 int oval_value_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_value_consumer, void *);
00139 void oval_value_to_print(struct oval_value *value, char *indent, int idx);
00140 xmlNode *oval_value_to_dom(struct oval_value *, xmlDoc *, xmlNode *);
00141 int oval_value_cast(struct oval_value *value, oval_datatype_t new_dt);
00142 
00143 oval_syschar_collection_flag_t oval_component_compute(struct oval_syschar_model *sysmod, struct oval_component *component,
00144                                                       struct oval_collection *value_collection);
00145 oval_syschar_collection_flag_t oval_component_query(oval_probe_session_t *sess, struct oval_component *component,
00146                                                     struct oval_collection *value_collection);
00147 int oval_probe_session_query_object(oval_probe_session_t *sess, struct oval_object *object);
00148 typedef void (*oval_component_consumer) (struct oval_component *, void *);
00149 int oval_component_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_component_consumer, void *);
00150 void oval_component_to_print(struct oval_component *, char *indent, int index);
00151 xmlNode *oval_component_to_dom(struct oval_component *, xmlDoc *, xmlNode *);
00152 
00153 typedef void (*oval_message_consumer) (struct oval_message *, void *);
00154 int oval_message_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oscap_consumer_func, void *);
00155 void oval_message_to_print(struct oval_message *message, char *indent, int index);
00156 void oval_message_to_dom(struct oval_message *, xmlDoc *, xmlNode *);
00157 
00158 int oval_generator_parse_tag(xmlTextReader *, struct oval_parser_context *, struct oval_generator *);
00159 xmlNode *oval_generator_to_dom(struct oval_generator *, xmlDocPtr, xmlNode *);
00160 
00161 xmlDoc *oval_definition_model_get_metadata_doc(struct oval_definition_model *);
00162 void oval_definition_model_add_definition(struct oval_definition_model *, struct oval_definition *);
00163 void oval_definition_model_add_test(struct oval_definition_model *, struct oval_test *);
00164 void oval_definition_model_add_object(struct oval_definition_model *, struct oval_object *);
00165 void oval_definition_model_add_state(struct oval_definition_model *, struct oval_state *);
00166 void oval_definition_model_add_variable(struct oval_definition_model *, struct oval_variable *);
00167 
00168 void oval_definition_model_optimize_by_filter_propagation(struct oval_definition_model *);
00169 
00170 //Synthetic object subtype for probing system info.
00171 #define  OVAL_INDEPENDENT_SYSCHAR_SUBTYPE 7999
00172 
00173 OSCAP_HIDDEN_END
00174 #endif

Generated on Fri Mar 11 2011 for Open SCAP Library by  doxygen 1.7.1