2014-07-24 08:53:33 -04:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
|
|
|
/*
|
|
|
|
|
* 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.
|
|
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*
|
|
|
|
|
* Copyright 2007 - 2008 Novell, Inc.
|
|
|
|
|
* Copyright 2007 - 2012 Red Hat, Inc.
|
|
|
|
|
*/
|
|
|
|
|
|
2016-02-19 14:57:48 +01:00
|
|
|
#include "nm-default.h"
|
2014-11-13 10:07:02 -05:00
|
|
|
|
2014-07-24 08:53:33 -04:00
|
|
|
#include <string.h>
|
2016-02-19 14:57:48 +01:00
|
|
|
|
2014-07-24 08:53:33 -04:00
|
|
|
#include "nm-vpn-connection.h"
|
2014-07-05 16:23:30 -04:00
|
|
|
#include "nm-dbus-interface.h"
|
2014-07-24 08:53:33 -04:00
|
|
|
#include "nm-utils.h"
|
|
|
|
|
#include "nm-object-private.h"
|
|
|
|
|
#include "nm-active-connection.h"
|
2014-09-10 13:51:53 -04:00
|
|
|
#include "nm-dbus-helpers.h"
|
|
|
|
|
|
|
|
|
|
#include "nmdbus-vpn-connection.h"
|
2014-07-24 08:53:33 -04:00
|
|
|
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
G_DEFINE_TYPE (NMVpnConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION)
|
2014-07-24 08:53:33 -04:00
|
|
|
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
#define NM_VPN_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_VPN_CONNECTION, NMVpnConnectionPrivate))
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
char *banner;
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
NMVpnConnectionState vpn_state;
|
|
|
|
|
} NMVpnConnectionPrivate;
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
PROP_0,
|
|
|
|
|
PROP_VPN_STATE,
|
|
|
|
|
PROP_BANNER,
|
|
|
|
|
|
|
|
|
|
LAST_PROP
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
VPN_STATE_CHANGED,
|
|
|
|
|
|
|
|
|
|
LAST_SIGNAL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static guint signals[LAST_SIGNAL] = { 0 };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* nm_vpn_connection_get_banner:
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
* @vpn: a #NMVpnConnection
|
2014-07-24 08:53:33 -04:00
|
|
|
*
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
* Gets the VPN login banner of the active #NMVpnConnection.
|
2014-07-24 08:53:33 -04:00
|
|
|
*
|
|
|
|
|
* Returns: the VPN login banner of the VPN connection. This is the internal
|
|
|
|
|
* string used by the connection, and must not be modified.
|
|
|
|
|
**/
|
|
|
|
|
const char *
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
nm_vpn_connection_get_banner (NMVpnConnection *vpn)
|
2014-07-24 08:53:33 -04:00
|
|
|
{
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
NMVpnConnectionPrivate *priv;
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
g_return_val_if_fail (NM_IS_VPN_CONNECTION (vpn), NULL);
|
|
|
|
|
|
|
|
|
|
priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn);
|
|
|
|
|
|
|
|
|
|
if (priv->vpn_state != NM_VPN_CONNECTION_STATE_ACTIVATED)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
return priv->banner;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* nm_vpn_connection_get_vpn_state:
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
* @vpn: a #NMVpnConnection
|
2014-07-24 08:53:33 -04:00
|
|
|
*
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
* Gets the current #NMVpnConnection state.
|
2014-07-24 08:53:33 -04:00
|
|
|
*
|
|
|
|
|
* Returns: the VPN state of the active VPN connection.
|
|
|
|
|
**/
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
NMVpnConnectionState
|
|
|
|
|
nm_vpn_connection_get_vpn_state (NMVpnConnection *vpn)
|
2014-07-24 08:53:33 -04:00
|
|
|
{
|
|
|
|
|
g_return_val_if_fail (NM_IS_VPN_CONNECTION (vpn), NM_VPN_CONNECTION_STATE_UNKNOWN);
|
|
|
|
|
|
|
|
|
|
return NM_VPN_CONNECTION_GET_PRIVATE (vpn)->vpn_state;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2014-09-10 13:51:53 -04:00
|
|
|
vpn_state_changed_proxy (NMDBusVpnConnection *proxy,
|
|
|
|
|
guint vpn_state,
|
|
|
|
|
guint reason,
|
2014-07-24 08:53:33 -04:00
|
|
|
gpointer user_data)
|
|
|
|
|
{
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
NMVpnConnection *connection = NM_VPN_CONNECTION (user_data);
|
|
|
|
|
NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
if (priv->vpn_state != vpn_state) {
|
|
|
|
|
priv->vpn_state = vpn_state;
|
|
|
|
|
g_signal_emit (connection, signals[VPN_STATE_CHANGED], 0, vpn_state, reason);
|
|
|
|
|
g_object_notify (G_OBJECT (connection), NM_VPN_CONNECTION_VPN_STATE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static void
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
nm_vpn_connection_init (NMVpnConnection *connection)
|
2014-07-24 08:53:33 -04:00
|
|
|
{
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
priv->vpn_state = NM_VPN_CONNECTION_STATE_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2014-05-15 14:24:56 -04:00
|
|
|
init_dbus (NMObject *object)
|
2014-07-24 08:53:33 -04:00
|
|
|
{
|
2014-05-15 14:24:56 -04:00
|
|
|
NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object);
|
2014-07-24 08:53:33 -04:00
|
|
|
const NMPropertiesInfo property_info[] = {
|
|
|
|
|
{ NM_VPN_CONNECTION_BANNER, &priv->banner },
|
|
|
|
|
{ NM_VPN_CONNECTION_VPN_STATE, &priv->vpn_state },
|
|
|
|
|
{ NULL },
|
|
|
|
|
};
|
2014-09-10 13:51:53 -04:00
|
|
|
GDBusProxy *proxy;
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2014-05-15 14:24:56 -04:00
|
|
|
NM_OBJECT_CLASS (nm_vpn_connection_parent_class)->init_dbus (object);
|
|
|
|
|
|
|
|
|
|
_nm_object_register_properties (object,
|
2014-08-18 14:17:52 -04:00
|
|
|
NM_DBUS_INTERFACE_VPN_CONNECTION,
|
2014-07-24 08:53:33 -04:00
|
|
|
property_info);
|
|
|
|
|
|
2014-08-18 14:17:52 -04:00
|
|
|
proxy = _nm_object_get_proxy (object, NM_DBUS_INTERFACE_VPN_CONNECTION);
|
2014-09-10 13:51:53 -04:00
|
|
|
g_signal_connect (proxy, "vpn-state-changed",
|
|
|
|
|
G_CALLBACK (vpn_state_changed_proxy), object);
|
2014-07-24 08:53:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
finalize (GObject *object)
|
|
|
|
|
{
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
g_free (priv->banner);
|
|
|
|
|
|
|
|
|
|
G_OBJECT_CLASS (nm_vpn_connection_parent_class)->finalize (object);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
get_property (GObject *object,
|
|
|
|
|
guint prop_id,
|
|
|
|
|
GValue *value,
|
|
|
|
|
GParamSpec *pspec)
|
|
|
|
|
{
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
NMVpnConnection *self = NM_VPN_CONNECTION (object);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
switch (prop_id) {
|
|
|
|
|
case PROP_VPN_STATE:
|
2014-06-26 16:47:46 -04:00
|
|
|
g_value_set_enum (value, nm_vpn_connection_get_vpn_state (self));
|
2014-07-24 08:53:33 -04:00
|
|
|
break;
|
|
|
|
|
case PROP_BANNER:
|
|
|
|
|
g_value_set_string (value, nm_vpn_connection_get_banner (self));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
nm_vpn_connection_class_init (NMVpnConnectionClass *connection_class)
|
2014-07-24 08:53:33 -04:00
|
|
|
{
|
|
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (connection_class);
|
2014-05-15 14:24:56 -04:00
|
|
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (connection_class);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
g_type_class_add_private (connection_class, sizeof (NMVpnConnectionPrivate));
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2014-08-18 14:17:52 -04:00
|
|
|
_nm_object_class_add_interface (nm_object_class, NM_DBUS_INTERFACE_VPN_CONNECTION);
|
2014-09-10 13:51:53 -04:00
|
|
|
_nm_dbus_register_proxy_type (NM_DBUS_INTERFACE_VPN_CONNECTION,
|
|
|
|
|
NMDBUS_TYPE_VPN_CONNECTION_PROXY);
|
2014-08-18 14:17:52 -04:00
|
|
|
|
2014-07-24 08:53:33 -04:00
|
|
|
/* virtual methods */
|
|
|
|
|
object_class->get_property = get_property;
|
|
|
|
|
object_class->finalize = finalize;
|
|
|
|
|
|
2014-05-15 14:24:56 -04:00
|
|
|
nm_object_class->init_dbus = init_dbus;
|
|
|
|
|
|
2014-07-24 08:53:33 -04:00
|
|
|
/* properties */
|
|
|
|
|
|
|
|
|
|
/**
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
* NMVpnConnection:vpn-state:
|
2014-07-24 08:53:33 -04:00
|
|
|
*
|
|
|
|
|
* The VPN state of the active VPN connection.
|
|
|
|
|
**/
|
|
|
|
|
g_object_class_install_property
|
|
|
|
|
(object_class, PROP_VPN_STATE,
|
2014-06-26 16:47:46 -04:00
|
|
|
g_param_spec_enum (NM_VPN_CONNECTION_VPN_STATE, "", "",
|
|
|
|
|
NM_TYPE_VPN_CONNECTION_STATE,
|
2014-07-24 08:53:33 -04:00
|
|
|
NM_VPN_CONNECTION_STATE_UNKNOWN,
|
|
|
|
|
G_PARAM_READABLE |
|
|
|
|
|
G_PARAM_STATIC_STRINGS));
|
|
|
|
|
|
|
|
|
|
/**
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
* NMVpnConnection:banner:
|
2014-07-24 08:53:33 -04:00
|
|
|
*
|
|
|
|
|
* The VPN login banner of the active VPN connection.
|
|
|
|
|
**/
|
|
|
|
|
g_object_class_install_property
|
|
|
|
|
(object_class, PROP_BANNER,
|
|
|
|
|
g_param_spec_string (NM_VPN_CONNECTION_BANNER, "", "",
|
|
|
|
|
NULL,
|
|
|
|
|
G_PARAM_READABLE |
|
|
|
|
|
G_PARAM_STATIC_STRINGS));
|
|
|
|
|
|
|
|
|
|
/* signals */
|
|
|
|
|
signals[VPN_STATE_CHANGED] =
|
|
|
|
|
g_signal_new ("vpn-state-changed",
|
|
|
|
|
G_OBJECT_CLASS_TYPE (object_class),
|
|
|
|
|
G_SIGNAL_RUN_FIRST,
|
libnm, core, cli, tui: fix the capitalization of various types
GLib/Gtk have mostly settled on the convention that two-letter
acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
become initial-caps-only (eg, "Tcp").
NM was inconsistent, with most long acronyms using initial caps only
(Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
three-or-more-letter-long acronyms (and update nmcli and nmtui for the
libnm changes).
2014-06-26 13:44:36 -04:00
|
|
|
G_STRUCT_OFFSET (NMVpnConnectionClass, vpn_state_changed),
|
2014-07-24 08:53:33 -04:00
|
|
|
NULL, NULL, NULL,
|
|
|
|
|
G_TYPE_NONE, 2,
|
|
|
|
|
G_TYPE_UINT, G_TYPE_UINT);
|
|
|
|
|
}
|