00001 00016 /* 00017 * Copyright 2009,2010 Red Hat Inc., Durham, North Carolina. 00018 * All Rights Reserved. 00019 * 00020 * This library is free software; you can redistribute it and/or 00021 * modify it under the terms of the GNU Lesser General Public 00022 * License as published by the Free Software Foundation; either 00023 * version 2.1 of the License, or (at your option) any later version. 00024 * 00025 * This library is distributed in the hope that it will be useful, 00026 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00027 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00028 * Lesser General Public License for more details. 00029 * 00030 * You should have received a copy of the GNU Lesser General Public 00031 * License along with this library; if not, write to the Free Software 00032 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00033 * 00034 */ 00035 00036 00037 #ifndef OVAL_AGENT_API_H_ 00038 #define OVAL_AGENT_API_H_ 00039 00040 #include "oval_definitions.h" 00041 #include "oval_system_characteristics.h" 00042 #include "oval_results.h" 00043 #include "oval_variables.h" 00044 #include "oval_probe.h" 00045 00046 struct oval_agent_session; 00047 00053 typedef struct oval_agent_session oval_agent_session_t; 00054 00060 oval_agent_session_t * oval_agent_new_session(struct oval_definition_model * model, const char * name); 00061 00065 struct oval_definition_model* oval_agent_get_definition_model(oval_agent_session_t* ag_sess); 00066 00073 void oval_agent_set_product_name(oval_agent_session_t *, char *); 00074 00079 int oval_agent_eval_definition(oval_agent_session_t *, const char *); 00080 00085 int oval_agent_get_definition_result(oval_agent_session_t *, const char *, oval_result_t *); 00086 00091 struct oval_result_definition * oval_agent_get_result_definition(oval_agent_session_t *ag_sess, const char *id); 00092 00096 int oval_agent_reset_session(oval_agent_session_t * ag_sess); 00097 00101 int oval_agent_abort_session(oval_agent_session_t *ag_sess); 00102 00103 typedef int (*agent_reporter)(const struct oval_result_definition * res_def, void *arg); 00104 00109 int oval_agent_eval_system(oval_agent_session_t * ag_sess, agent_reporter cb, void *arg); 00110 00114 struct oval_results_model * oval_agent_get_results_model(oval_agent_session_t * ag_sess); 00118 const char * oval_agent_get_filename(oval_agent_session_t * ag_sess); 00119 00123 void oval_agent_destroy_session(oval_agent_session_t * ag_sess); 00124 00125 00130 #endif