Open SCAP Library
|
00001 /* 00002 * Copyright 2009 Red Hat Inc., Durham, North Carolina. 00003 * All Rights Reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 * Authors: 00020 * "Daniel Kopecek" <dkopecek@redhat.com> 00021 */ 00022 00023 #pragma once 00024 #ifndef SEXP_PARSE_H 00025 #define SEXP_PARSE_H 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 #include <stddef.h> 00032 #include <seap-debug.h> 00033 #include <sexp-types.h> 00034 00035 typedef struct SEXP_psetup SEXP_psetup_t; 00036 00037 SEXP_psetup_t *SEXP_psetup_new (void); 00038 void SEXP_psetup_free (SEXP_psetup_t *); 00039 00040 typedef uint8_t SEXP_pflags_t; 00041 00042 #define SEXP_PFLAG_EOFOK 0x01 00043 #define SEXP_PFLAG_FREEBUF 0x02 00044 #define SEXP_PFLAG_ALL 0x03 00045 00046 int SEXP_psetup_setflags (SEXP_psetup_t *psetup, SEXP_pflags_t flags); 00047 int SEXP_psetup_unsetflags (SEXP_psetup_t *psetup, SEXP_pflags_t flags); 00048 00049 typedef struct SEXP_pstate SEXP_pstate_t; 00050 00051 SEXP_pstate_t *SEXP_pstate_new (void); 00052 void SEXP_pstate_free (SEXP_pstate_t *); 00053 SEXP_pstate_t *SEXP_pstate_init (SEXP_pstate_t *); 00054 00055 SEXP_t *SEXP_parse (const SEXP_psetup_t *psetup, char *buffer, size_t buflen, SEXP_pstate_t **pstate); 00056 00057 bool SEXP_pstate_errorp(SEXP_pstate_t *pstate); 00058 00059 #ifdef __cplusplus 00060 } 00061 #endif 00062 00063 #endif /* SEXP_PARSE_H */