Open SCAP Library

seap-types.h

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 SEAP_TYPES_H
00025 #define SEAP_TYPES_H
00026 
00027 #include <stdint.h>
00028 #include <seap-message.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 typedef struct SEAP_CTX SEAP_CTX_t;
00035 
00036 #define SEAP_CTX_INITIALIZER { NULL, 0, 0, 0, SEAP_DESCTBL_INITIALIZER, SEAP_CMDTABLE_INITIALIZER }
00037 
00038 typedef struct SEAP_cmd SEAP_cmd_t;
00039 
00040 /* SEAP errors */
00041 #define SEAP_ETYPE_INT  0 /* Internal error */
00042 #define SEAP_ETYPE_USER 1 /* User-defined error */
00043 
00044 #define SEAP_EUNFIN 1  /* Can't finish parsing */
00045 #define SEAP_EPARSE 2  /* Parsing error */
00046 #define SEAP_ECLOSE 3  /* Connection close */
00047 #define SEAP_EINVAL 4  /* Invalid argument */
00048 #define SEAP_ENOMEM 5  /* Cannot allocate memory */
00049 #define SEAP_EMSEXP 6  /* Missing required S-exp/value */
00050 #define SEAP_EMATTR 7  /* Missing required attribute */
00051 #define SEAP_EUNEXP 8  /* Unexpected error */
00052 #define SEAP_EUSER  9  /* User-defined error */
00053 #define SEAP_ENOCMD 10 /* Unknown cmd */
00054 #define SEAP_EQFULL 11 /* Queue full */
00055 #define SEAP_EUNKNOWN 255 /* Unknown/Unexpected error */
00056 
00057 /* SEAP I/O flags */
00058 #define SEAP_IOFL_RECONN   0x00000001 /* Try to reconnect */
00059 #define SEAP_IOFL_NONBLOCK 0x00000002 /* Non-blocking mode */
00060 
00061 #ifdef __cplusplus
00062 }
00063 #endif
00064 
00065 #endif /* SEAP_TYPES_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines