Open SCAP Library: seap-command.h Source File

Open SCAP Library

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

- File List
- Globals

seap-command.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_COMMAND_H
25 #define SEAP_COMMAND_H
26
27 #include <stdint.h>
28 #include <stdarg.h>
29 #include <sexp-types.h>
30 #include <seap-types.h>
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 typedef SEXP_t * (*SEAP_cmdfn_t) (SEXP_t *, void *);
37
38 typedef uint16_t SEAP_cmdcode_t;
39 typedef uint16_t SEAP_cmdid_t;
40 typedef uint8_t SEAP_cmdtype_t;
41
42 #define SEAP_CMDTYPE_SYNC 1
43 #define SEAP_CMDTYPE_ASYNC 2
44
45 #define SEAP_CMDREG_LOCAL 0x00000001
46 #define SEAP_CMDREG_USEARG 0x00000002
47 #define SEAP_CMDREG_THREAD 0x00000004
48
49 int SEAP_cmd_register (SEAP_CTX_t *ctx, SEAP_cmdcode_t code, uint32_t flags, SEAP_cmdfn_t func, ...);
50 int SEAP_cmd_unregister (SEAP_CTX_t *ctx, SEAP_cmdcode_t code);
51
52 #define SEAP_EXEC_LOCAL 0x01
53 #define SEAP_EXEC_LONLY 0x02
54 #define SEAP_EXEC_GFIRST 0x04
55 #define SEAP_EXEC_THREAD 0x08
56 #define SEAP_EXEC_WQUEUE 0x10
57 #define SEAP_EXEC_RECV 0x20
58
59 SEXP_t *SEAP_cmd_exec (SEAP_CTX_t *ctx,
60 int sd,
61 uint32_t flags,
62 SEAP_cmdcode_t code,
63 SEXP_t *args,
64 SEAP_cmdtype_t type,
65 SEAP_cmdfn_t func,
66 void *funcarg);
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif /* SEAP_COMMAND_H */
SEAP_CTX
Definition: _seap-types.h:37
SEXP
Definition: sexp-types.h:82