Open SCAP Library: seap-message.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

seap-message.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_MESSAGE_H
25 #define SEAP_MESSAGE_H
26
27 #include <stdint.h>
28 #include <stdbool.h>
29 #include <sexp-types.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #if SEAP_MSGID_BITS == 64
36 typedef uint64_t SEAP_msgid_t;
37 #else
38 typedef uint32_t SEAP_msgid_t;
39 #endif
40
41 typedef struct SEAP_msg SEAP_msg_t;
42 typedef struct SEAP_attr SEAP_attr_t;
43
44 SEAP_msg_t *SEAP_msg_new (void);
45 SEAP_msg_t *SEAP_msg_clone (SEAP_msg_t *msg);
46 void SEAP_msg_free (SEAP_msg_t *msg);
47
48 SEAP_msgid_t SEAP_msg_id (SEAP_msg_t *msg);
49
50 int SEAP_msg_set (SEAP_msg_t *msg, SEXP_t *sexp);
51 void SEAP_msg_unset (SEAP_msg_t *msg);
52 SEXP_t *SEAP_msg_get (SEAP_msg_t *msg);
53
54 SEXP_t *SEAP_msgattr_get (SEAP_msg_t *msg, const char *name);
55 int SEAP_msgattr_set (SEAP_msg_t *msg, const char *name, SEXP_t *value);
56 int SEAP_msgattr_del (SEAP_msg_t *msg, const char *name);
57 bool SEAP_msgattr_exists (SEAP_msg_t *msg, const char *name);
58
59 #include <stdio.h>
60 void SEAP_msg_print (FILE *fp, SEAP_msg_t *msg);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif /* SEAP_MESSAGE_H */
SEAP_attr
Definition: _seap-message.h:34
SEXP
Definition: sexp-types.h:82
SEAP_msg
Definition: _seap-message.h:39