2 * Copyright (C) 2010 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
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>.
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
16 #ifndef __STRONGSWAN_CONNECTIONS_H__
17 #define __STRONGSWAN_CONNECTIONS_H__
19 #include "strongswan-connection.h"
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))
30 typedef struct _StrongswanConnections StrongswanConnections
;
31 typedef struct _StrongswanConnectionsClass StrongswanConnectionsClass
;
32 typedef struct _StrongswanConnectionsPrivate StrongswanConnectionsPrivate
;
34 struct _StrongswanConnections
38 StrongswanConnectionsPrivate
*priv
;
41 struct _StrongswanConnectionsClass
43 GObjectClass parent_class
;
46 GType
strongswan_connections_get_type (void);
48 StrongswanConnections
*strongswan_connections_new (void);
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
);
56 #endif /* __STRONGSWAN_CONNECTIONS_H__ */