Open SCAP Library: sexp-parser.h Source File

Open SCAP Library

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

- File List
- Globals

sexp-parser.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_PARSE_H
25 #define SEXP_PARSE_H
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 #include <stddef.h>
32 #include <sexp-types.h>
33
34 typedef struct SEXP_psetup SEXP_psetup_t;
35
36 SEXP_psetup_t *SEXP_psetup_new (void);
37 void SEXP_psetup_free (SEXP_psetup_t *);
38
39 typedef uint8_t SEXP_pflags_t;
40
41 #define SEXP_PFLAG_EOFOK 0x01
42 #define SEXP_PFLAG_FREEBUF 0x02
43 #define SEXP_PFLAG_ALL 0x03
44
45 int SEXP_psetup_setflags (SEXP_psetup_t *psetup, SEXP_pflags_t flags);
46 int SEXP_psetup_unsetflags (SEXP_psetup_t *psetup, SEXP_pflags_t flags);
47
48 typedef struct SEXP_pstate SEXP_pstate_t;
49
50 SEXP_pstate_t *SEXP_pstate_new (void);
51 void SEXP_pstate_free (SEXP_pstate_t *);
52 SEXP_pstate_t *SEXP_pstate_init (SEXP_pstate_t *);
53
54 SEXP_t *SEXP_parse (const SEXP_psetup_t *psetup, char *buffer, size_t buflen, SEXP_pstate_t **pstate);
55
56 bool SEXP_pstate_errorp(SEXP_pstate_t *pstate);
57
58 #ifdef __cplusplus
59 }
60 #endif
61
62 #endif /* SEXP_PARSE_H */