Open SCAP Library
|
00001 /* 00002 * Copyright 2012 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 * Authors: 00020 * "Martin Preisler" <mpreisle@redhat.com> 00021 */ 00022 00023 #ifndef SCE_ENGINE_API_H_ 00024 #define SCE_ENGINE_API_H 00025 00026 #include <xccdf.h> 00027 #include <xccdf_policy.h> 00028 00029 struct sce_check_result* sce_check_result_new(void); 00030 void sce_check_result_free(struct sce_check_result* v); 00031 00032 void sce_check_result_set_href(struct sce_check_result* v, const char* href); 00033 const char* sce_check_result_get_href(struct sce_check_result* v); 00034 void sce_check_result_set_basename(struct sce_check_result* v, const char* basename); 00035 const char* sce_check_result_get_basename(struct sce_check_result* v); 00036 void sce_check_result_set_details(struct sce_check_result* v, const char* details); 00037 const char* sce_check_result_get_details(struct sce_check_result* v); 00038 void sce_check_result_set_xccdf_result(struct sce_check_result* v, xccdf_test_result_type_t result); 00039 xccdf_test_result_type_t sce_check_result_get_xccdf_result(struct sce_check_result* v); 00040 00044 void sce_check_result_export(struct sce_check_result* v, const char* target_file); 00045 00046 struct sce_session* sce_session_new(void); 00047 void sce_session_free(struct sce_session* s); 00048 00052 void sce_session_reset(struct sce_session* s); 00053 00060 void sce_session_add_check_result(struct sce_session* s, struct sce_check_result* result); 00061 void sce_session_export_to_directory(struct sce_session* s, const char* directory); 00062 00063 struct sce_parameters* sce_parameters_new(void); 00064 void sce_parameters_free(struct sce_parameters* v); 00065 void sce_parameters_set_xccdf_directory(struct sce_parameters* v, const char* value); 00066 const char* sce_parameters_get_xccdf_directory(struct sce_parameters* v); 00067 00074 void sce_parameters_set_session(struct sce_parameters* v, struct sce_session* value); 00075 struct sce_session* sce_parameters_get_session(struct sce_parameters* v); 00076 00082 void sce_parameters_allocate_session(struct sce_parameters* v); 00083 00089 xccdf_test_result_type_t sce_engine_eval_rule(struct xccdf_policy *policy, const char *rule_id, const char *id, 00090 const char *href, struct xccdf_value_binding_iterator *it, void *usr); 00091 00098 bool xccdf_policy_model_register_engine_sce(struct xccdf_policy_model * model, struct sce_parameters *sce_parameters); 00099 00100 #endif