diff options
author | Dan Williams <dcbw@redhat.com> | 2014-01-08 11:40:56 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-01-23 17:34:12 -0600 |
commit | 67676c65bf4dd0277544fdefe98965c6fbbe6344 (patch) | |
tree | 657c56167b92bb9b9c87e68dbaf2752b9a497233 /src | |
parent | a0c4483bdb9b4334da4d74a22db5d28e8bc8ccef (diff) |
api/wifi: add GetAllAccessPoints() method
The original GetAccessPoints() method call never returned hidden SSID
access points. That's useful though, and the new AccessPoints
property returns all of them too, so add this new method to return
all access points, including hidden SSID ones.
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/nm-device-wifi.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/devices/nm-device-wifi.c b/src/devices/nm-device-wifi.c index 995c2f858e..e91214e162 100644 --- a/src/devices/nm-device-wifi.c +++ b/src/devices/nm-device-wifi.c @@ -65,6 +65,10 @@ static gboolean impl_device_get_access_points (NMDeviceWifi *device, GPtrArray **aps, GError **err); +static gboolean impl_device_get_all_access_points (NMDeviceWifi *device, + GPtrArray **aps, + GError **err); + static void impl_device_request_scan (NMDeviceWifi *device, GHashTable *options, DBusGMethodInvocation *context); @@ -1376,9 +1380,8 @@ impl_device_get_access_points (NMDeviceWifi *self, GSList *elt; *aps = g_ptr_array_new (); - for (elt = priv->ap_list; elt; elt = g_slist_next (elt)) { - NMAccessPoint * ap = NM_AP (elt->data); + NMAccessPoint *ap = NM_AP (elt->data); if (nm_ap_get_ssid (ap)) g_ptr_array_add (*aps, g_strdup (nm_ap_get_dbus_path (ap))); @@ -1386,6 +1389,20 @@ impl_device_get_access_points (NMDeviceWifi *self, return TRUE; } +static gboolean +impl_device_get_all_access_points (NMDeviceWifi *self, + GPtrArray **aps, + GError **err) +{ + NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); + GSList *elt; + + *aps = g_ptr_array_new (); + for (elt = priv->ap_list; elt; elt = g_slist_next (elt)) + g_ptr_array_add (*aps, g_strdup (nm_ap_get_dbus_path (NM_AP (elt->data)))); + return TRUE; +} + static void request_scan_cb (NMDevice *device, DBusGMethodInvocation *context, |