diff options
author | Dan Williams <dcbw@redhat.com> | 2015-04-20 11:11:56 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2015-05-06 15:23:47 -0500 |
commit | 2028ef2c829f1544ad1cd5f40dd0a552f16fcc19 (patch) | |
tree | 80f0bde932d9f84ebb8cf9f5ba87a3227c0c4bc5 | |
parent | a646514fb6f472a7ca9562260c3e6383c299e128 (diff) | |
download | NetworkManager-2028ef2c829f1544ad1cd5f40dd0a552f16fcc19.tar.gz |
wifi: remove anachronistic NMAccessPoint getter pattern
Just use priv.
-rw-r--r-- | src/devices/wifi/nm-wifi-ap.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c index 220558c0c6..ea4ec2a8d6 100644 --- a/src/devices/wifi/nm-wifi-ap.c +++ b/src/devices/wifi/nm-wifi-ap.c @@ -218,13 +218,9 @@ nm_ap_set_address (NMAccessPoint *ap, const char *addr) NM80211Mode nm_ap_get_mode (NMAccessPoint *ap) { - NM80211Mode mode; + g_return_val_if_fail (NM_IS_AP (ap), NM_802_11_MODE_UNKNOWN); - g_return_val_if_fail (NM_IS_AP (ap), -1); - - g_object_get (ap, NM_AP_MODE, &mode, NULL); - - return mode; + return NM_AP_GET_PRIVATE (ap)->mode; } static void @@ -255,13 +251,9 @@ nm_ap_is_hotspot (NMAccessPoint *ap) gint8 nm_ap_get_strength (NMAccessPoint *ap) { - gint8 strength; - g_return_val_if_fail (NM_IS_AP (ap), 0); - g_object_get (ap, NM_AP_STRENGTH, &strength, NULL); - - return strength; + return NM_AP_GET_PRIVATE (ap)->strength; } void @@ -282,13 +274,9 @@ nm_ap_set_strength (NMAccessPoint *ap, const gint8 strength) guint32 nm_ap_get_freq (NMAccessPoint *ap) { - guint32 freq; - g_return_val_if_fail (NM_IS_AP (ap), 0); - g_object_get (ap, NM_AP_FREQUENCY, &freq, NULL); - - return freq; + return NM_AP_GET_PRIVATE (ap)->freq; } void @@ -310,13 +298,9 @@ nm_ap_set_freq (NMAccessPoint *ap, guint32 nm_ap_get_max_bitrate (NMAccessPoint *ap) { - guint32 rate; - g_return_val_if_fail (NM_IS_AP (ap), 0); - g_object_get (ap, NM_AP_MAX_BITRATE, &rate, NULL); - - return rate; + return NM_AP_GET_PRIVATE (ap)->max_bitrate; } void |