android: Native parts handle ikev2-cert VPN type
[strongswan.git] / src / frontends / android / jni / libandroidbridge / backend / android_service.h
1 /*
2 * Copyright (C) 2010-2012 Tobias Brunner
3 * Copyright (C) 2012 Giuliano Grassi
4 * Copyright (C) 2012 Ralf Sager
5 * Hochschule fuer Technik Rapperswil
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
16 */
17
18 /**
19 * @defgroup android_service android_service
20 * @{ @ingroup android_backend
21 */
22
23 #ifndef ANDROID_SERVICE_H_
24 #define ANDROID_SERVICE_H_
25
26 #include "android_creds.h"
27
28 #include <library.h>
29 #include <bus/listeners/listener.h>
30
31 typedef struct android_service_t android_service_t;
32
33 /**
34 * Service that sets up an IKE_SA/CHILD_SA and handles events
35 */
36 struct android_service_t {
37
38 /**
39 * Implements listener_t.
40 */
41 listener_t listener;
42
43 /**
44 * Destroy a android_service_t.
45 */
46 void (*destroy)(android_service_t *this);
47
48 };
49
50 /**
51 * Create an Android service instance. Queues a job that starts initiation of a
52 * new IKE SA.
53 *
54 * @param creds Android specific credential set
55 * @param type VPN type (see VpnType.java)
56 * @param local_address local ip address
57 * @param gateway gateway address
58 * @param username user name (local identity)
59 * @param password password (if any)
60 */
61 android_service_t *android_service_create(android_creds_t *creds, char *type,
62 char *local_address, char *gateway,
63 char *username, char *password);
64
65 #endif /** ANDROID_SERVICE_H_ @}*/