mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 04:24:32 +00:00
wifi-p2p: drop WiFi-P2P "group-owner" property from D-Bus API and libnm
It's not yet implemented server-side. Until it is clear that we need this property and until it is implemented, drop it again from public API. See-also: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/80#note_118004
This commit is contained in:
parent
5106d7290b
commit
b7d4ad8547
|
@ -18,15 +18,6 @@
|
|||
-->
|
||||
<property name="HwAddress" type="s" access="read"/>
|
||||
|
||||
<!--
|
||||
GroupOwner:
|
||||
|
||||
Whether this device is currently the group owner.
|
||||
|
||||
Since: 1.16
|
||||
-->
|
||||
<property name="GroupOwner" type="b" access="read"/>
|
||||
|
||||
<!--
|
||||
Peers:
|
||||
|
||||
|
|
|
@ -1450,7 +1450,6 @@ global:
|
|||
nm_client_add_and_activate_connection2;
|
||||
nm_client_add_and_activate_connection2_finish;
|
||||
nm_device_get_connectivity;
|
||||
nm_device_wifi_p2p_get_group_owner;
|
||||
nm_device_wifi_p2p_get_hw_address;
|
||||
nm_device_wifi_p2p_get_peers;
|
||||
nm_device_wifi_p2p_get_type;
|
||||
|
|
|
@ -40,7 +40,6 @@ typedef struct {
|
|||
|
||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||
PROP_HW_ADDRESS,
|
||||
PROP_GROUP_OWNER,
|
||||
PROP_PEERS,
|
||||
);
|
||||
|
||||
|
@ -59,8 +58,6 @@ typedef struct {
|
|||
char *hw_address;
|
||||
|
||||
GPtrArray *peers;
|
||||
|
||||
gboolean group_owner;
|
||||
} NMDeviceWifiP2PPrivate;
|
||||
|
||||
/**
|
||||
|
@ -102,25 +99,6 @@ nm_device_wifi_p2p_get_hw_address (NMDeviceWifiP2P *device)
|
|||
return nm_str_not_empty (NM_DEVICE_WIFI_P2P_GET_PRIVATE (device)->hw_address);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_device_wifi_p2p_get_group_owner:
|
||||
* @device: a #NMDeviceWifiP2P
|
||||
*
|
||||
* Gets whether the device is currently the P2P group owner. This is only
|
||||
* valid when a connection is established.
|
||||
*
|
||||
* Returns: Whether the device is the P2P group owner.
|
||||
*
|
||||
* Since: 1.16
|
||||
**/
|
||||
gboolean
|
||||
nm_device_wifi_p2p_get_group_owner (NMDeviceWifiP2P *device)
|
||||
{
|
||||
g_return_val_if_fail (NM_IS_DEVICE_WIFI_P2P (device), FALSE);
|
||||
|
||||
return NM_DEVICE_WIFI_P2P_GET_PRIVATE (device)->group_owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_device_wifi_p2p_get_peers:
|
||||
* @device: a #NMDeviceWifiP2P
|
||||
|
@ -378,9 +356,6 @@ get_property (GObject *object,
|
|||
case PROP_HW_ADDRESS:
|
||||
g_value_set_string (value, nm_device_wifi_p2p_get_hw_address (self));
|
||||
break;
|
||||
case PROP_GROUP_OWNER:
|
||||
g_value_set_enum (value, nm_device_wifi_p2p_get_group_owner (self));
|
||||
break;
|
||||
case PROP_PEERS:
|
||||
g_value_take_boxed (value, _nm_utils_copy_object_array (nm_device_wifi_p2p_get_peers (self)));
|
||||
break;
|
||||
|
@ -404,7 +379,6 @@ init_dbus (NMObject *object)
|
|||
NMDeviceWifiP2PPrivate *priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (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_PEERS, &priv->peers, NULL, NM_TYPE_WIFI_P2P_PEER, "peer" },
|
||||
{ NULL },
|
||||
};
|
||||
|
@ -468,20 +442,6 @@ nm_device_wifi_p2p_class_init (NMDeviceWifiP2PClass *wifi_class)
|
|||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
/**
|
||||
* NMDeviceWifiP2P:group-owner:
|
||||
*
|
||||
* Whether the device is currently the group owner.
|
||||
*
|
||||
* Since: 1.16
|
||||
**/
|
||||
obj_properties[PROP_GROUP_OWNER] =
|
||||
g_param_spec_boolean (NM_DEVICE_WIFI_P2P_GROUP_OWNER, "", "",
|
||||
FALSE,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMDeviceWifiP2P:peers: (type GPtrArray(NMWifiP2PPeer))
|
||||
*
|
||||
|
|
|
@ -36,7 +36,6 @@ G_BEGIN_DECLS
|
|||
#define NM_DEVICE_WIFI_P2P_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIFI_P2P, NMDeviceWifiP2PClass))
|
||||
|
||||
#define NM_DEVICE_WIFI_P2P_HW_ADDRESS "hw-address"
|
||||
#define NM_DEVICE_WIFI_P2P_GROUP_OWNER "group-owner"
|
||||
#define NM_DEVICE_WIFI_P2P_PEERS "peers"
|
||||
#define NM_DEVICE_WIFI_P2P_WFDIES "wfdies"
|
||||
|
||||
|
@ -48,9 +47,6 @@ GType nm_device_wifi_p2p_get_type (void);
|
|||
NM_AVAILABLE_IN_1_16
|
||||
const char * nm_device_wifi_p2p_get_hw_address (NMDeviceWifiP2P *device);
|
||||
|
||||
NM_AVAILABLE_IN_1_16
|
||||
gboolean nm_device_wifi_p2p_get_group_owner (NMDeviceWifiP2P *device);
|
||||
|
||||
NM_AVAILABLE_IN_1_16
|
||||
NMWifiP2PPeer * nm_device_wifi_p2p_get_peer_by_path (NMDeviceWifiP2P *device,
|
||||
const char *path);
|
||||
|
|
|
@ -47,7 +47,6 @@ _LOG_DECLARE_SELF(NMDeviceWifiP2P);
|
|||
/*****************************************************************************/
|
||||
|
||||
NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceWifiP2P,
|
||||
PROP_GROUP_OWNER,
|
||||
PROP_PEERS,
|
||||
);
|
||||
|
||||
|
@ -68,9 +67,6 @@ typedef struct {
|
|||
guint peer_dump_id;
|
||||
guint peer_missing_id;
|
||||
|
||||
/* FIXME: group-owner is not properly set. */
|
||||
bool group_owner:1;
|
||||
|
||||
bool is_waiting_for_supplicant:1;
|
||||
} NMDeviceWifiP2PPrivate;
|
||||
|
||||
|
@ -591,8 +587,6 @@ act_stage3_ip4_config_start (NMDevice *device,
|
|||
NMIP4Config **out_config,
|
||||
NMDeviceStateReason *out_failure_reason)
|
||||
{
|
||||
NMDeviceWifiP2P *self = NM_DEVICE_WIFI_P2P (device);
|
||||
NMDeviceWifiP2PPrivate *priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (self);
|
||||
NMConnection *connection;
|
||||
NMSettingIPConfig *s_ip4;
|
||||
const char *method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
|
||||
|
@ -605,8 +599,7 @@ act_stage3_ip4_config_start (NMDevice *device,
|
|||
method = nm_setting_ip_config_get_method (s_ip4);
|
||||
|
||||
/* Indicate that a critical protocol is about to start */
|
||||
if ( !priv->group_owner
|
||||
&& nm_streq (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO))
|
||||
if (nm_streq (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO))
|
||||
nm_platform_wifi_indicate_addressing_running (nm_device_get_platform (device), nm_device_get_ip_ifindex (device), TRUE);
|
||||
|
||||
return NM_DEVICE_CLASS (nm_device_wifi_p2p_parent_class)->act_stage3_ip4_config_start (device, out_config, out_failure_reason);
|
||||
|
@ -1201,7 +1194,6 @@ static const NMDBusInterfaceInfoExtended interface_info_device_wifi_p2p = {
|
|||
),
|
||||
.properties = NM_DEFINE_GDBUS_PROPERTY_INFOS (
|
||||
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),
|
||||
),
|
||||
),
|
||||
|
@ -1219,9 +1211,6 @@ get_property (GObject *object, guint prop_id,
|
|||
const char **list;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_GROUP_OWNER:
|
||||
g_value_set_boolean (value, priv->group_owner);
|
||||
break;
|
||||
case PROP_PEERS:
|
||||
list = nm_wifi_p2p_peers_get_paths (&priv->peers_lst_head);
|
||||
g_value_take_boxed (value, nm_utils_strv_make_deep_copied (list));
|
||||
|
@ -1325,12 +1314,6 @@ nm_device_wifi_p2p_class_init (NMDeviceWifiP2PClass *klass)
|
|||
|
||||
device_class->state_changed = device_state_changed;
|
||||
|
||||
obj_properties[PROP_GROUP_OWNER] =
|
||||
g_param_spec_boolean (NM_DEVICE_WIFI_P2P_GROUP_OWNER, "", "",
|
||||
FALSE,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
obj_properties[PROP_PEERS] =
|
||||
g_param_spec_boxed (NM_DEVICE_WIFI_P2P_PEERS, "", "",
|
||||
G_TYPE_STRV,
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#define NM_IS_DEVICE_WIFI_P2P_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_WIFI_P2P))
|
||||
#define NM_DEVICE_WIFI_P2P_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIFI_P2P, NMDeviceWifiP2PClass))
|
||||
|
||||
#define NM_DEVICE_WIFI_P2P_GROUP_OWNER "group-owner"
|
||||
#define NM_DEVICE_WIFI_P2P_PEERS "peers"
|
||||
#define NM_DEVICE_WIFI_P2P_GROUPS "groups"
|
||||
|
||||
|
|
Loading…
Reference in a new issue