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