Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
seap-types.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 SEAP_TYPES_H
25 #define SEAP_TYPES_H
26 
27 #include <stdint.h>
28 #include <seap-message.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 typedef struct SEAP_CTX SEAP_CTX_t;
35 
36 #define SEAP_CTX_INITIALIZER { NULL, 0, 0, 0, SEAP_DESCTBL_INITIALIZER, SEAP_CMDTABLE_INITIALIZER }
37 
38 typedef struct SEAP_cmd SEAP_cmd_t;
39 
40 /* SEAP errors */
41 #define SEAP_ETYPE_INT 0 /* Internal error */
42 #define SEAP_ETYPE_USER 1 /* User-defined error */
43 
44 #define SEAP_EUNFIN 1 /* Can't finish parsing */
45 #define SEAP_EPARSE 2 /* Parsing error */
46 #define SEAP_ECLOSE 3 /* Connection close */
47 #define SEAP_EINVAL 4 /* Invalid argument */
48 #define SEAP_ENOMEM 5 /* Cannot allocate memory */
49 #define SEAP_EMSEXP 6 /* Missing required S-exp/value */
50 #define SEAP_EMATTR 7 /* Missing required attribute */
51 #define SEAP_EUNEXP 8 /* Unexpected error */
52 #define SEAP_EUSER 9 /* User-defined error */
53 #define SEAP_ENOCMD 10 /* Unknown cmd */
54 #define SEAP_EQFULL 11 /* Queue full */
55 #define SEAP_EUNKNOWN 255 /* Unknown/Unexpected error */
56 
57 /* SEAP I/O flags */
58 #define SEAP_IOFL_RECONN 0x00000001 /* Try to reconnect */
59 #define SEAP_IOFL_NONBLOCK 0x00000002 /* Non-blocking mode */
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif /* SEAP_TYPES_H */
Definition: _seap-types.h:37
Definition: _seap-command.h:49