Commit 3d12dbc0 authored by Benjamin Berg's avatar Benjamin Berg Committed by Thomas Haller

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.
parent 8ed7aef2
......@@ -27,20 +27,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:
......
......@@ -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);
......@@ -502,20 +482,6 @@ nm_device_wifi_p2p_class_init (NMDeviceWifiP2PClass *wifi_class)
G_PARAM_READABLE |
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))
*
......
......@@ -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);
}
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment