]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/frontends/osx/charon-xpc/xpc_logger.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / frontends / osx / charon-xpc / xpc_logger.h
1 /*
2 * Copyright (C) 2013 Martin Willi
3 *
4 * Copyright (C) secunet Security Networks AG
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 /**
18 * @defgroup xpc_logger xpc_logger
19 * @{ @ingroup xpc
20 */
21
22 #ifndef XPC_LOGGER_H_
23 #define XPC_LOGGER_H_
24
25 #include <xpc/xpc.h>
26
27 #include <daemon.h>
28
29 typedef struct xpc_logger_t xpc_logger_t;
30
31 /**
32 * Connection specific logger over XPC.
33 */
34 struct xpc_logger_t {
35
36 /**
37 * Implements logger_t.
38 */
39 logger_t logger;
40
41 /**
42 * Set the IKE_SA unique identifier this logger logs for.
43 *
44 * @param ike_sa IKE_SA unique identifier
45 */
46 void (*set_ike_sa)(xpc_logger_t *this, uint32_t ike_sa);
47
48 /**
49 * Destroy a xpc_logger_t.
50 */
51 void (*destroy)(xpc_logger_t *this);
52 };
53
54 /**
55 * Create a xpc_logger instance.
56 *
57 * @param conn XPC connection to send logging events to
58 * @return XPC logger
59 */
60 xpc_logger_t *xpc_logger_create(xpc_connection_t conn);
61
62 #endif /** XPC_LOGGER_H_ @}*/