diff options
author | Benjamin Berg <bberg@redhat.com> | 2019-02-18 11:43:36 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-21 10:10:20 +0100 |
commit | 3d12dbc0a7d7d533a22e8e5d28f9d177dae7acf0 (patch) | |
tree | a252d5015b9ee4cc4bbd71f04e15342acdecc767 | |
parent | 8ed7aef26d1afb78569ad4f75ad5e2771e4f078a (diff) | |
download | NetworkManager-3d12dbc0a7d7d533a22e8e5d28f9d177dae7acf0.tar.gz |
Remove WFD IEs property from P2P device
While this can be considered a property of the P2P device, the API will
require setting it through the settings when activating a connection. As
such, having a (read only) property on the device is not very useful, so
remove it again.
-rw-r--r-- | introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml | 14 | ||||
-rw-r--r-- | libnm/nm-device-wifi-p2p.c | 34 | ||||
-rw-r--r-- | src/devices/wifi/nm-device-wifi-p2p.c | 17 | ||||
-rw-r--r-- | src/devices/wifi/nm-device-wifi-p2p.h | 1 |
4 files changed, 0 insertions, 66 deletions
diff --git a/introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml b/introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml index 82a0e89b62..1fb508cb1c 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml @@ -28,20 +28,6 @@ <property name="GroupOwner" type="b" access="read"/> <!-- - WFDIEs: - - The Wi-Fi Display information elements. - - Since: 1.16 - --> - <property name="WFDIEs" type="ay" access="read"> - <!-- gdbus-codegen assumes that "ay" means "non-UTF-8 string" and - won't deal with '\0' bytes correctly. - --> - <annotation name="org.gtk.GDBus.C.ForceGVariant" value="1"/> - </property> - - <!-- Peers: List of object paths of peers visible to this Wi-Fi P2P device. diff --git a/libnm/nm-device-wifi-p2p.c b/libnm/nm-device-wifi-p2p.c index c368fe3f46..090aa1cef8 100644 --- a/libnm/nm-device-wifi-p2p.c +++ b/libnm/nm-device-wifi-p2p.c @@ -41,7 +41,6 @@ typedef struct { NM_GOBJECT_PROPERTIES_DEFINE_BASE ( PROP_HW_ADDRESS, PROP_GROUP_OWNER, - PROP_WFDIES, PROP_PEERS, ); @@ -59,7 +58,6 @@ typedef struct { char *hw_address; - GByteArray *wfd_ies; GPtrArray *peers; gboolean group_owner; @@ -366,18 +364,6 @@ get_hw_address (NMDevice *device) return nm_device_wifi_p2p_get_hw_address (NM_DEVICE_WIFI_P2P (device)); } -static GVariant * -nm_device_wifi_p2p_get_wfdies_as_variant (const NMDeviceWifiP2P *self) -{ - const NMDeviceWifiP2PPrivate *priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (self); - - if (priv->wfd_ies) { - return g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, - priv->wfd_ies->data, priv->wfd_ies->len, 1); - } else - return g_variant_new_array (G_VARIANT_TYPE_BYTE, NULL, 0); -} - /*****************************************************************************/ static void @@ -395,9 +381,6 @@ get_property (GObject *object, case PROP_GROUP_OWNER: g_value_set_enum (value, nm_device_wifi_p2p_get_group_owner (self)); break; - case PROP_WFDIES: - g_value_take_variant (value, nm_device_wifi_p2p_get_wfdies_as_variant (self)); - break; case PROP_PEERS: g_value_take_boxed (value, _nm_utils_copy_object_array (nm_device_wifi_p2p_get_peers (self))); break; @@ -422,7 +405,6 @@ init_dbus (NMObject *object) const NMPropertiesInfo property_info[] = { { NM_DEVICE_WIFI_P2P_HW_ADDRESS, &priv->hw_address }, { NM_DEVICE_WIFI_P2P_GROUP_OWNER, &priv->group_owner }, - { NM_DEVICE_WIFI_P2P_WFDIES, &priv->wfd_ies }, { NM_DEVICE_WIFI_P2P_PEERS, &priv->peers, NULL, NM_TYPE_WIFI_P2P_PEER, "peer" }, { NULL }, }; @@ -450,8 +432,6 @@ finalize (GObject *object) g_clear_object (&priv->proxy); g_free (priv->hw_address); - if (priv->wfd_ies) - g_byte_array_unref (priv->wfd_ies); if (priv->peers) g_ptr_array_unref (priv->peers); @@ -503,20 +483,6 @@ nm_device_wifi_p2p_class_init (NMDeviceWifiP2PClass *wifi_class) G_PARAM_STATIC_STRINGS); /** - * NMDeviceWifiP2P:wfd-ies: - * - * Whether the device is currently the group owner. - * - * Since: 1.16 - **/ - obj_properties[PROP_WFDIES] = - g_param_spec_variant (NM_DEVICE_WIFI_P2P_WFDIES, "", "", - G_VARIANT_TYPE ("ay"), - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - - /** * NMDeviceWifiP2P:peers: (type GPtrArray(NMWifiP2PPeer)) * * List of all Wi-Fi P2P peers the device can see. diff --git a/src/devices/wifi/nm-device-wifi-p2p.c b/src/devices/wifi/nm-device-wifi-p2p.c index 56e82fe540..530cb21a22 100644 --- a/src/devices/wifi/nm-device-wifi-p2p.c +++ b/src/devices/wifi/nm-device-wifi-p2p.c @@ -49,9 +49,6 @@ _LOG_DECLARE_SELF(NMDeviceWifiP2P); NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceWifiP2P, PROP_GROUP_OWNER, PROP_PEERS, - PROP_WFDIES, /* TODO: Make this a property of the setting and Find feature - * making the device stateless. - */ ); typedef struct { @@ -66,7 +63,6 @@ typedef struct { NMSupplicantInterface *group_iface; CList peers_lst_head; - GBytes *wfd_ies; guint sup_timeout_id; guint peer_dump_id; @@ -1198,7 +1194,6 @@ static const NMDBusInterfaceInfoExtended interface_info_device_wifi_p2p = { NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("HwAddress", "s", NM_DEVICE_HW_ADDRESS), NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("GroupOwner", "b", NM_DEVICE_WIFI_P2P_GROUP_OWNER), NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("Peers", "ao", NM_DEVICE_WIFI_P2P_PEERS), - NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("WFDIEs", "ay", NM_DEVICE_WIFI_P2P_WFDIES), ), ), .legacy_property_changed = FALSE, @@ -1222,9 +1217,6 @@ get_property (GObject *object, guint prop_id, list = nm_wifi_p2p_peers_get_paths (&priv->peers_lst_head); g_value_take_boxed (value, nm_utils_strv_make_deep_copied (list)); break; - case PROP_WFDIES: - g_value_take_variant (value, nm_utils_gbytes_to_variant_ay (priv->wfd_ies)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1286,8 +1278,6 @@ finalize (GObject *object) nm_assert (c_list_is_empty (&priv->peers_lst_head)); - g_bytes_unref (priv->wfd_ies); - G_OBJECT_CLASS (nm_device_wifi_p2p_parent_class)->finalize (object); } @@ -1338,12 +1328,5 @@ nm_device_wifi_p2p_class_init (NMDeviceWifiP2PClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - obj_properties[PROP_WFDIES] = - g_param_spec_variant (NM_DEVICE_WIFI_P2P_WFDIES, "", "", - G_VARIANT_TYPE ("ay"), - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); } diff --git a/src/devices/wifi/nm-device-wifi-p2p.h b/src/devices/wifi/nm-device-wifi-p2p.h index 64dcdd67c7..aa90c72566 100644 --- a/src/devices/wifi/nm-device-wifi-p2p.h +++ b/src/devices/wifi/nm-device-wifi-p2p.h @@ -34,7 +34,6 @@ #define NM_DEVICE_WIFI_P2P_GROUP_OWNER "group-owner" #define NM_DEVICE_WIFI_P2P_PEERS "peers" #define NM_DEVICE_WIFI_P2P_GROUPS "groups" -#define NM_DEVICE_WIFI_P2P_WFDIES "WFDIEs" typedef struct _NMDeviceWifiP2P NMDeviceWifiP2P; typedef struct _NMDeviceWifiP2PClass NMDeviceWifiP2PClass; |