summaryrefslogtreecommitdiff
path: root/libnm
diff options
context:
space:
mode:
Diffstat (limited to 'libnm')
-rw-r--r--libnm/libnm.ver12
-rw-r--r--libnm/nm-device-team.c40
-rw-r--r--libnm/nm-device-team.h3
-rw-r--r--libnm/nm-vpn-editor.h2
4 files changed, 56 insertions, 1 deletions
diff --git a/libnm/libnm.ver b/libnm/libnm.ver
index 7ece1b2fef..4362cd25c0 100644
--- a/libnm/libnm.ver
+++ b/libnm/libnm.ver
@@ -1058,3 +1058,15 @@ global:
nm_vpn_service_plugin_set_ip6_config;
nm_vpn_service_plugin_set_login_banner;
} libnm_1_0_0;
+
+libnm_1_2_4 {
+global:
+ nm_device_team_get_config;
+ nm_setting_ip6_config_get_token;
+ nm_setting_ip_config_get_dns_priority;
+ nm_vpn_editor_plugin_load;
+ nm_vpn_plugin_info_get_auth_dialog;
+ nm_vpn_plugin_info_get_service;
+ nm_vpn_plugin_info_new_search_file;
+ nm_vpn_plugin_info_supports_hints;
+} libnm_1_2_0;
diff --git a/libnm/nm-device-team.c b/libnm/nm-device-team.c
index b855d5ec38..7fa24f23f9 100644
--- a/libnm/nm-device-team.c
+++ b/libnm/nm-device-team.c
@@ -39,6 +39,7 @@ typedef struct {
char *hw_address;
gboolean carrier;
GPtrArray *slaves;
+ char *config;
} NMDeviceTeamPrivate;
enum {
@@ -46,6 +47,7 @@ enum {
PROP_HW_ADDRESS,
PROP_CARRIER,
PROP_SLAVES,
+ PROP_CONFIG,
LAST_PROP
};
@@ -101,6 +103,25 @@ nm_device_team_get_slaves (NMDeviceTeam *device)
return NM_DEVICE_TEAM_GET_PRIVATE (device)->slaves;
}
+/**
+ * nm_device_team_get_config:
+ * @device: a #NMDeviceTeam
+ *
+ * Gets the current JSON configuration of the #NMDeviceTeam
+ *
+ * Returns: the current configuration. This is the internal string used by the
+ * device, and must not be modified.
+ *
+ * Since: 1.2.4
+ **/
+const char *
+nm_device_team_get_config (NMDeviceTeam *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_TEAM (device), NULL);
+
+ return NM_DEVICE_TEAM_GET_PRIVATE (device)->config;
+}
+
static const char *
get_hw_address (NMDevice *device)
{
@@ -150,6 +171,7 @@ init_dbus (NMObject *object)
{ NM_DEVICE_TEAM_HW_ADDRESS, &priv->hw_address },
{ NM_DEVICE_TEAM_CARRIER, &priv->carrier },
{ NM_DEVICE_TEAM_SLAVES, &priv->slaves, NULL, NM_TYPE_DEVICE },
+ { NM_DEVICE_TEAM_CONFIG, &priv->config },
{ NULL },
};
@@ -176,6 +198,7 @@ finalize (GObject *object)
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (object);
g_free (priv->hw_address);
+ g_free (priv->config);
G_OBJECT_CLASS (nm_device_team_parent_class)->finalize (object);
}
@@ -198,6 +221,9 @@ get_property (GObject *object,
case PROP_SLAVES:
g_value_take_boxed (value, _nm_utils_copy_object_array (nm_device_team_get_slaves (device)));
break;
+ case PROP_CONFIG:
+ g_value_set_string (value, nm_device_team_get_config (device));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -265,4 +291,18 @@ nm_device_team_class_init (NMDeviceTeamClass *team_class)
G_TYPE_PTR_ARRAY,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
+
+ /**
+ * NMDeviceTeam:config:
+ *
+ * The current JSON configuration of the device.
+ *
+ * Since: 1.2.4
+ **/
+ g_object_class_install_property
+ (object_class, PROP_CONFIG,
+ g_param_spec_string (NM_DEVICE_TEAM_CONFIG, "", "",
+ NULL,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
}
diff --git a/libnm/nm-device-team.h b/libnm/nm-device-team.h
index a9b71c6ab0..93cc14e51d 100644
--- a/libnm/nm-device-team.h
+++ b/libnm/nm-device-team.h
@@ -39,6 +39,7 @@ G_BEGIN_DECLS
#define NM_DEVICE_TEAM_HW_ADDRESS "hw-address"
#define NM_DEVICE_TEAM_CARRIER "carrier"
#define NM_DEVICE_TEAM_SLAVES "slaves"
+#define NM_DEVICE_TEAM_CONFIG "config"
/**
* NMDeviceTeam:
@@ -59,6 +60,8 @@ GType nm_device_team_get_type (void);
const char *nm_device_team_get_hw_address (NMDeviceTeam *device);
gboolean nm_device_team_get_carrier (NMDeviceTeam *device);
const GPtrArray *nm_device_team_get_slaves (NMDeviceTeam *device);
+NM_AVAILABLE_IN_1_2_4
+const char *nm_device_team_get_config (NMDeviceTeam *device);
G_END_DECLS
diff --git a/libnm/nm-vpn-editor.h b/libnm/nm-vpn-editor.h
index a11e9fd16d..2ee34525d8 100644
--- a/libnm/nm-vpn-editor.h
+++ b/libnm/nm-vpn-editor.h
@@ -30,7 +30,7 @@
#include <glib-object.h>
#include <nm-types.h>
-#include "nm-vpn-editor-plugin.h"
+#include <nm-vpn-editor-plugin.h>
G_BEGIN_DECLS