Open SCAP Library: sexp-datatype.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

sexp-datatype.h
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Authors:
20 * "Daniel Kopecek" <dkopecek@redhat.com>
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
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 typedef void (*SEXP_datatypeOP_t) (SEXP_t *, const SEXP_t *, void *);
36
37 typedef struct SEXP_datatype SEXP_datatype_t;
38 typedef struct SEXP_datatypeTbl SEXP_datatypeTbl_t;
39
40 extern SEXP_datatypeTbl_t g_datatypes;
41
42 /* const char *SEXP_datatype (const SEXP_t *sexp); */
43
44 int SEXP_datatype_register (SEXP_datatypeTbl_t *t, const char *datatype);
45 /* int SEXP_datatype_unregister (void); */
46
47 int SEXP_datatype_op (uint8_t op, const SEXP_t *sexp, void *res, ...);
48 int SEXP_datatype_op_safe (const char *datatype, uint8_t op, const SEXP_t *sexp, void *res, ...);
49
50 SEXP_datatype_t *SEXP_datatype_new(void);
51 int SEXP_datatype_setflag(SEXP_datatype_t **dp, uint16_t flag, ...);
52 int SEXP_datatype_unsetflag(SEXP_datatype_t **dp, uint16_t flag);
53 int SEXP_datatype_addop(SEXP_datatype_t **dp, int opnum, SEXP_datatypeOP_t *op);
54 int SEXP_datatype_delop(SEXP_datatype_t **dp, int opnum);
55
56 #ifdef __cplusplus
57 }
58 #endif
59
60 #endif /* SEXP_DATATYPE */
SEXP_datatype
Definition: _sexp-datatype.h:33
SEXP_datatypeTbl
Definition: _sexp-datatype.h:46
SEXP
Definition: sexp-types.h:82