Open SCAP Library
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 #include "oscap_export.h"
34 
35 typedef struct SEXP_psetup SEXP_psetup_t;
36 
37 OSCAP_API SEXP_psetup_t *SEXP_psetup_new (void);
38 OSCAP_API void SEXP_psetup_free (SEXP_psetup_t *);
39 
40 typedef uint8_t SEXP_pflags_t;
41 
42 #define SEXP_PFLAG_EOFOK 0x01
43 #define SEXP_PFLAG_FREEBUF 0x02
44 #define SEXP_PFLAG_ALL 0x03
45 
46 OSCAP_API int SEXP_psetup_setflags (SEXP_psetup_t *psetup, SEXP_pflags_t flags);
47 OSCAP_API int SEXP_psetup_unsetflags (SEXP_psetup_t *psetup, SEXP_pflags_t flags);
48 
49 typedef struct SEXP_pstate SEXP_pstate_t;
50 
51 OSCAP_API SEXP_pstate_t *SEXP_pstate_new (void);
52 OSCAP_API void SEXP_pstate_free (SEXP_pstate_t *);
53 OSCAP_API SEXP_pstate_t *SEXP_pstate_init (SEXP_pstate_t *);
54 
55 OSCAP_API SEXP_t *SEXP_parse (const SEXP_psetup_t *psetup, char *buffer, size_t buflen, SEXP_pstate_t **pstate);
56 
57 OSCAP_API bool SEXP_pstate_errorp(SEXP_pstate_t *pstate);
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif /* SEXP_PARSE_H */
Definition: _sexp-parser.h:47
Definition: sexp-types.h:82
Definition: _sexp-parser.h:109