00001 00009 /* 00010 * Copyright 2010 Red Hat Inc., Durham, North Carolina. 00011 * All Rights Reserved. 00012 * 00013 * This library is free software; you can redistribute it and/or 00014 * modify it under the terms of the GNU Lesser General Public 00015 * License as published by the Free Software Foundation; either 00016 * version 2.1 of the License, or (at your option) any later version. 00017 * 00018 * This library is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 * Lesser General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU Lesser General Public 00024 * License along with this library; if not, write to the Free Software 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 * 00027 * Authors: 00028 * "Daniel Kopecek" <dkopecek@redhat.com> 00029 */ 00030 #ifndef _OVAL_PROBE_HANDLER 00031 #define _OVAL_PROBE_HANDLER 00032 00033 #include <stdint.h> 00034 #include "public/oval_probe_handler.h" 00035 00036 struct oval_ph { 00037 oval_subtype_t type; 00038 oval_probe_handler_t *func; 00039 void *uptr; 00040 }; 00041 00042 struct oval_phtbl { 00043 struct oval_ph **ph; 00044 uint32_t sz; 00045 }; 00046 00047 oval_phtbl_t *oval_phtbl_new(void); 00048 void oval_phtbl_free(oval_phtbl_t *phtbl); 00049 oval_ph_t *oval_probe_handler_get(oval_phtbl_t *phtbl, oval_subtype_t type); 00050 int oval_probe_handler_set(oval_phtbl_t *phtbl, oval_subtype_t type, oval_probe_handler_t *handler, void *uptr); 00051 00052 #endif /* _OVAL_PROBE_HANDLER */