1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301 USA.
18 * Copyright 2007 - 2008 Novell, Inc.
19 * Copyright 2007 - 2010 Red Hat, Inc.
22 #ifndef NM_VPN_CONNECTION_H
23 #define NM_VPN_CONNECTION_H
26 #include <glib-object.h>
27 #include <dbus/dbus-glib.h>
28 #include "nm-active-connection.h"
29 #include "NetworkManagerVPN.h"
33 #define NM_TYPE_VPN_CONNECTION (nm_vpn_connection_get_type ())
34 #define NM_VPN_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_CONNECTION, NMVPNConnection))
35 #define NM_VPN_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_VPN_CONNECTION, NMVPNConnectionClass))
36 #define NM_IS_VPN_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_VPN_CONNECTION))
37 #define NM_IS_VPN_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_VPN_CONNECTION))
38 #define NM_VPN_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_VPN_CONNECTION, NMVPNConnectionClass))
40 #define NM_VPN_CONNECTION_VPN_STATE "vpn-state"
41 #define NM_VPN_CONNECTION_BANNER "banner"
44 NMActiveConnection parent;
48 NMActiveConnectionClass parent;
51 void (*vpn_state_changed) (NMVPNConnection *connection,
52 NMVPNConnectionState state,
53 NMVPNConnectionStateReason reason);
55 /* Padding for future expansion */
56 void (*_reserved1) (void);
57 void (*_reserved2) (void);
58 void (*_reserved3) (void);
59 void (*_reserved4) (void);
60 void (*_reserved5) (void);
61 void (*_reserved6) (void);
62 } NMVPNConnectionClass;
64 GType nm_vpn_connection_get_type (void);
66 GObject * nm_vpn_connection_new (DBusGConnection *connection, const char *path);
68 NMVPNConnectionState nm_vpn_connection_get_vpn_state (NMVPNConnection *vpn);
69 const char * nm_vpn_connection_get_banner (NMVPNConnection *vpn);
73 #endif /* NM_VPN_CONNECTION_H */