aboutsummaryrefslogtreecommitdiffstats
path: root/src/frontends/osx/charon-xpc/xpc_channels.h
blob: d9516a3308bcf07cda87cec1a8d91a3d687f4716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * Copyright (C) 2013 Martin Willi
 * Copyright (C) 2013 revosec AG
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 */

/**
 * @defgroup xpc charon-xpc
 *
 * @defgroup xpc_channels xpc_channels
 * @{ @ingroup xpc
 */

#ifndef XPC_CHANNELS_H_
#define XPC_CHANNELS_H_

#include <xpc/xpc.h>

#include <bus/bus.h>

typedef struct xpc_channels_t xpc_channels_t;

/**
 * XPC to App channel management.
 */
struct xpc_channels_t {

	/**
	 * Implements listener_t.
	 */
	listener_t listener;

	/**
	 * Associate an IKE_SA unique identifier to an XPC connection.
	 *
	 * @param conn			XPC connection to channel
	 * @param ike_sa		IKE_SA unique identifier to associate to connection
	 */
	void (*add)(xpc_channels_t *this, xpc_connection_t conn, uint32_t ike_sa);

	/**
	 * Destroy a xpc_channels_t.
	 */
	void (*destroy)(xpc_channels_t *this);
};

/**
 * Create a xpc_channels instance.
 */
xpc_channels_t *xpc_channels_create();

#endif /** XPC_CHANNELS_H_ @}*/