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_CONNECTION_H__
17 #define __STRONGSWAN_CONNECTION_H__
20 #include <glib-object.h>
24 #define STRONGSWAN_TYPE_CONNECTION (strongswan_connection_get_type ())
25 #define STRONGSWAN_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STRONGSWAN_TYPE_CONNECTION, StrongswanConnection))
26 #define STRONGSWAN_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STRONGSWAN_TYPE_CONNECTION, StrongswanConnectionClass))
27 #define STRONGSWAN_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STRONGSWAN_TYPE_CONNECTION))
28 #define STRONGSWAN_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STRONGSWAN_TYPE_CONNECTION))
29 #define STRONGSWAN_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STRONGSWAN_TYPE_CONNECTION, StrongswanConnectionClass))
31 typedef struct _StrongswanConnection StrongswanConnection
;
32 typedef struct _StrongswanConnectionClass StrongswanConnectionClass
;
33 typedef struct _StrongswanConnectionPrivate StrongswanConnectionPrivate
;
35 struct _StrongswanConnection
39 StrongswanConnectionPrivate
*priv
;
42 struct _StrongswanConnectionClass
44 GObjectClass parent_class
;
47 GType
strongswan_connection_get_type (void);
49 StrongswanConnection
*strongswan_connection_new (const gchar
*name
);
51 StrongswanConnection
*strongswan_connection_new_from_key_file(GKeyFile
*key_file
, const gchar
*name
);
52 void strongswan_connection_save_to_key_file (GKeyFile
*key_file
, StrongswanConnection
*connection
);
54 #ifdef USE_DYNAMIC_TYPES
55 void strongswan_connection_register (GTypeModule
*type_module
);
60 #endif /* __STRONGSWAN_CONNECTION_H__ */