nm-vpn-connection.h 2.74 KB
Newer Older
1 2 3
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
 * libnm_glib -- Access network status & information from glib applications
4
 *
5 6 7 8
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
14
 *
15 16 17 18
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA.
19
 *
20
 * Copyright (C) 2007 - 2008 Novell, Inc.
21
 * Copyright (C) 2007 - 2010 Red Hat, Inc.
22 23 24 25 26
 */

#ifndef NM_VPN_CONNECTION_H
#define NM_VPN_CONNECTION_H

27
#include <glib.h>
28 29
#include <glib-object.h>
#include <dbus/dbus-glib.h>
30
#include "nm-active-connection.h"
31 32
#include "NetworkManagerVPN.h"

33 34
G_BEGIN_DECLS

35 36 37 38
#define NM_TYPE_VPN_CONNECTION            (nm_vpn_connection_get_type ())
#define NM_VPN_CONNECTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_CONNECTION, NMVPNConnection))
#define NM_VPN_CONNECTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_VPN_CONNECTION, NMVPNConnectionClass))
#define NM_IS_VPN_CONNECTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_VPN_CONNECTION))
39
#define NM_IS_VPN_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_VPN_CONNECTION))
40 41
#define NM_VPN_CONNECTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_VPN_CONNECTION, NMVPNConnectionClass))

42 43 44
#define NM_VPN_CONNECTION_VPN_STATE "vpn-state"
#define NM_VPN_CONNECTION_BANNER "banner"

45
typedef struct {
46
	NMActiveConnection parent;
47 48 49
} NMVPNConnection;

typedef struct {
50
	NMActiveConnectionClass parent;
51 52

	/* Signals */
53
	void (*vpn_state_changed) (NMVPNConnection *connection,
54
	                           NMVPNConnectionState state,
55
	                           NMVPNConnectionStateReason reason);
56 57 58 59 60 61 62 63

	/* Padding for future expansion */
	void (*_reserved1) (void);
	void (*_reserved2) (void);
	void (*_reserved3) (void);
	void (*_reserved4) (void);
	void (*_reserved5) (void);
	void (*_reserved6) (void);
64 65 66 67
} NMVPNConnectionClass;

GType nm_vpn_connection_get_type (void);

68
GObject * nm_vpn_connection_new (DBusGConnection *connection, const char *path);
69

70
NMVPNConnectionState  nm_vpn_connection_get_vpn_state  (NMVPNConnection *vpn);
71
const char *          nm_vpn_connection_get_banner (NMVPNConnection *vpn);
72

73 74
G_END_DECLS

75
#endif /* NM_VPN_CONNECTION_H */