device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm / nm-vpn-connection.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
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.
7  *
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.
12  *
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.
17  *
18  * Copyright 2007 - 2008 Novell, Inc.
19  * Copyright 2007 - 2010 Red Hat, Inc.
20  */
21
22 #ifndef __NM_VPN_CONNECTION_H__
23 #define __NM_VPN_CONNECTION_H__
24
25 #if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
26 #error "Only <NetworkManager.h> can be included directly."
27 #endif
28
29 #include <nm-active-connection.h>
30 #include <nm-vpn-dbus-interface.h>
31
32 G_BEGIN_DECLS
33
34 #define NM_TYPE_VPN_CONNECTION            (nm_vpn_connection_get_type ())
35 #define NM_VPN_CONNECTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_CONNECTION, NMVpnConnection))
36 #define NM_VPN_CONNECTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_VPN_CONNECTION, NMVpnConnectionClass))
37 #define NM_IS_VPN_CONNECTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_VPN_CONNECTION))
38 #define NM_IS_VPN_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_VPN_CONNECTION))
39 #define NM_VPN_CONNECTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_VPN_CONNECTION, NMVpnConnectionClass))
40
41 #define NM_VPN_CONNECTION_VPN_STATE "vpn-state"
42 #define NM_VPN_CONNECTION_BANNER "banner"
43
44 struct _NMVpnConnection {
45         NMActiveConnection parent;
46 };
47
48 typedef struct {
49         NMActiveConnectionClass parent;
50
51         /* Signals */
52         void (*vpn_state_changed) (NMVpnConnection *connection,
53                                    NMVpnConnectionState state,
54                                    NMVpnConnectionStateReason reason);
55
56         /*< private >*/
57         gpointer padding[4];
58 } NMVpnConnectionClass;
59
60 GType nm_vpn_connection_get_type (void);
61
62 NMVpnConnectionState  nm_vpn_connection_get_vpn_state  (NMVpnConnection *vpn);
63 const char *          nm_vpn_connection_get_banner (NMVpnConnection *vpn);
64
65 G_END_DECLS
66
67 #endif /* __NM_VPN_CONNECTION_H__ */