Management class for connection settings added, connections are stored in a simple...
[strongswan.git] / src / frontends / maemo / src / strongswan-connections.h
1 /*
2 * Copyright (C) 2010 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
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 #ifndef __STRONGSWAN_CONNECTIONS_H__
17 #define __STRONGSWAN_CONNECTIONS_H__
18
19 #include "strongswan-connection.h"
20
21 G_BEGIN_DECLS
22
23 #define STRONGSWAN_TYPE_CONNECTIONS (strongswan_connections_get_type ())
24 #define STRONGSWAN_CONNECTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STRONGSWAN_TYPE_CONNECTIONS, StrongswanConnections))
25 #define STRONGSWAN_CONNECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STRONGSWAN_TYPE_CONNECTIONS, StrongswanConnectionsClass))
26 #define STRONGSWAN_IS_CONNECTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STRONGSWAN_TYPE_CONNECTIONS))
27 #define STRONGSWAN_IS_CONNECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STRONGSWAN_TYPE_CONNECTIONS))
28 #define STRONGSWAN_CONNECTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STRONGSWAN_TYPE_CONNECTIONS, StrongswanConnectionsClass))
29
30 typedef struct _StrongswanConnections StrongswanConnections;
31 typedef struct _StrongswanConnectionsClass StrongswanConnectionsClass;
32 typedef struct _StrongswanConnectionsPrivate StrongswanConnectionsPrivate;
33
34 struct _StrongswanConnections
35 {
36 GObject gobject;
37
38 StrongswanConnectionsPrivate *priv;
39 };
40
41 struct _StrongswanConnectionsClass
42 {
43 GObjectClass parent_class;
44 };
45
46 GType strongswan_connections_get_type (void);
47
48 StrongswanConnections *strongswan_connections_new (void);
49
50 StrongswanConnection *strongswan_connections_get_connection (StrongswanConnections *self, const gchar *name);
51 void strongswan_connections_save_connection (StrongswanConnections *self, StrongswanConnection *conn);
52 void strongswan_connections_remove_connection (StrongswanConnections *self, const gchar *name);
53
54 G_END_DECLS
55
56 #endif /* __STRONGSWAN_CONNECTIONS_H__ */