Annotation of embedaddon/strongswan/src/charon-cmd/cmd/cmd_connection.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2013 Martin Willi
3: * Copyright (C) 2013 revosec AG
4: *
5: * This program is free software; you can redistribute it and/or modify it
6: * under the terms of the GNU General Public License as published by the
7: * Free Software Foundation; either version 2 of the License, or (at your
8: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: * for more details.
14: */
15:
16: /**
17: * @defgroup charon-cmd charon-cmd
18: *
19: * @defgroup cmd cmd
20: * @ingroup charon-cmd
21: *
22: * @defgroup cmd_connection cmd_connection
23: * @{ @ingroup cmd
24: */
25:
26: #ifndef CMD_CONNECTION_H_
27: #define CMD_CONNECTION_H_
28:
29: #include <library.h>
30:
31: #include "cmd_options.h"
32:
33: typedef struct cmd_connection_t cmd_connection_t;
34:
35: /**
36: * Connection definition to construct and initiate.
37: */
38: struct cmd_connection_t {
39:
40: /**
41: * Handle a command line option.
42: *
43: * @param opt option to handle
44: * @param arg option argument
45: * @return TRUE if option handled
46: */
47: bool (*handle)(cmd_connection_t *this, cmd_option_type_t opt, char *arg);
48:
49: /**
50: * Destroy a cmd_connection_t.
51: */
52: void (*destroy)(cmd_connection_t *this);
53: };
54:
55: /**
56: * Create a cmd_connection instance.
57: */
58: cmd_connection_t *cmd_connection_create();
59:
60: #endif /** CMD_CONNECTION_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>