| 1 | /* |
| 2 | * Copyright 2009 Red Hat Inc., Durham, North Carolina. |
| 3 | * All Rights Reserved. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this library; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | * |
| 19 | * Authors: |
| 20 | * "Daniel Kopecek" <[email protected]> |
| 21 | */ |
| 22 | |
| 23 | #pragma once |
| 24 | #ifndef SEXP_DATATYPE |
| 25 | #define SEXP_DATATYPE |
| 26 | |
| 27 | #include <stdarg.h> |
| 28 | #include <stdint.h> |
| 29 | #include <sexp.h> |
| 30 | #include "oscap_export.h" |
| 31 | |
| 32 | #ifdef __cplusplus |
| 33 | extern "C" { |
| 34 | #endif |
| 35 | |
| 36 | typedef void (*SEXP_datatypeOP_t) (SEXP_t *, const SEXP_t *, void *); |
| 37 | |
| 38 | typedef struct SEXP_datatype SEXP_datatype_t; |
| 39 | typedef struct SEXP_datatypeTbl SEXP_datatypeTbl_t; |
| 40 | |
| 41 | extern SEXP_datatypeTbl_t g_datatypes; |
| 42 | |
| 43 | OSCAP_API SEXP_datatype_t *SEXP_datatype_new(void); |
| 44 | OSCAP_API int SEXP_datatype_setflag(SEXP_datatype_t **dp, uint16_t flag, ...); |
| 45 | OSCAP_API int SEXP_datatype_unsetflag(SEXP_datatype_t **dp, uint16_t flag); |
| 46 | OSCAP_API int SEXP_datatype_addop(SEXP_datatype_t **dp, int opnum, SEXP_datatypeOP_t *op); |
| 47 | OSCAP_API int SEXP_datatype_delop(SEXP_datatype_t **dp, int opnum); |
| 48 | |
| 49 | #ifdef __cplusplus |
| 50 | } |
| 51 | #endif |
| 52 | |
| 53 | #endif /* SEXP_DATATYPE */ |