From 308f2c08dd036e57ef672ec89d9f3a27acbf9746 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 25 Nov 2013 15:19:09 -0600 Subject: Revert "core: add Devices property to Manager" This reverts commit c1768154c4cfdc394cd175396157e5e4c48359af. Not supposed to be committed yet, see dcbw/dbus-properties for the real patch. --- introspection/nm-manager.xml | 6 ------ src/nm-manager.c | 28 ++++------------------------ src/nm-manager.h | 1 - 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml index 583e779ca8..e076e0516e 100644 --- a/introspection/nm-manager.xml +++ b/introspection/nm-manager.xml @@ -320,12 +320,6 @@ - - - List of network device object paths. - - - The object path of the "primary" active connection being used diff --git a/src/nm-manager.c b/src/nm-manager.c index 12939f003d..adb8d72185 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -290,7 +290,6 @@ enum { PROP_WIMAX_ENABLED, PROP_WIMAX_HARDWARE_ENABLED, PROP_ACTIVE_CONNECTIONS, - PROP_DEVICES, PROP_CONNECTIVITY, PROP_PRIMARY_CONNECTION, PROP_ACTIVATING_CONNECTION, @@ -817,7 +816,6 @@ remove_device (NMManager *manager, NMDevice *device, gboolean quitting) nm_settings_device_removed (priv->settings, device, quitting); g_signal_emit (manager, signals[DEVICE_REMOVED], 0, device); - g_object_notify (G_OBJECT (manager), NM_MANAGER_DEVICES); g_object_unref (device); priv->devices = g_slist_remove (priv->devices, device); @@ -1881,7 +1879,6 @@ add_device (NMManager *self, NMDevice *device, gboolean generate_con) nm_settings_device_added (priv->settings, device); g_signal_emit (self, signals[DEVICE_ADDED], 0, device); - g_object_notify (G_OBJECT (self), NM_MANAGER_DEVICES); /* New devices might be master interfaces for virtual interfaces; so we may * need to create new virtual interfaces now. @@ -4769,7 +4766,7 @@ get_property (GObject *object, guint prop_id, NMManager *self = NM_MANAGER (object); NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); GSList *iter; - GPtrArray *array; + GPtrArray *active; const char *path; switch (prop_id) { @@ -4805,22 +4802,13 @@ get_property (GObject *object, guint prop_id, g_value_set_boolean (value, priv->radio_states[RFKILL_TYPE_WIMAX].hw_enabled); break; case PROP_ACTIVE_CONNECTIONS: - array = g_ptr_array_sized_new (3); + active = g_ptr_array_sized_new (3); for (iter = priv->active_connections; iter; iter = g_slist_next (iter)) { path = nm_active_connection_get_path (NM_ACTIVE_CONNECTION (iter->data)); if (path) - g_ptr_array_add (array, g_strdup (path)); + g_ptr_array_add (active, g_strdup (path)); } - g_value_take_boxed (value, array); - break; - case PROP_DEVICES: - array = g_ptr_array_sized_new (3); - for (iter = priv->devices; iter; iter = g_slist_next (iter)) { - path = nm_device_get_path (NM_DEVICE (iter->data)); - if (path) - g_ptr_array_add (array, g_strdup (path)); - } - g_value_take_boxed (value, array); + g_value_take_boxed (value, active); break; case PROP_CONNECTIVITY: g_value_set_uint (value, nm_connectivity_get_state (priv->connectivity)); @@ -5100,14 +5088,6 @@ nm_manager_class_init (NMManagerClass *manager_class) DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_DEVICES, - g_param_spec_boxed (NM_MANAGER_DEVICES, - "Network devices", - "Network devices", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, - G_PARAM_READABLE)); - g_object_class_install_property (object_class, PROP_CONNECTIVITY, g_param_spec_uint (NM_MANAGER_CONNECTIVITY, diff --git a/src/nm-manager.h b/src/nm-manager.h index d5a5eafbf4..4d84db5d26 100644 --- a/src/nm-manager.h +++ b/src/nm-manager.h @@ -62,7 +62,6 @@ typedef enum { #define NM_MANAGER_WIMAX_ENABLED "wimax-enabled" #define NM_MANAGER_WIMAX_HARDWARE_ENABLED "wimax-hardware-enabled" #define NM_MANAGER_ACTIVE_CONNECTIONS "active-connections" -#define NM_MANAGER_DEVICES "devices" #define NM_MANAGER_CONNECTIVITY "connectivity" #define NM_MANAGER_PRIMARY_CONNECTION "primary-connection" #define NM_MANAGER_ACTIVATING_CONNECTION "activating-connection" -- cgit v1.2.1