Revert "libnm: introduce the new get_ports() in bridge/bond API"
Let's instead add a generic nm_device_get_ports() function. Also, only adding new API is maybe not sufficient. We should at the same time deprecate and alias the D-Bus API, like was done for commit067a3d6c08
('nm-device: expose via D-Bus the 'hw-address' property'). This reverts commit754143f4e8
.
This commit is contained in:
@@ -1787,8 +1787,6 @@ global:
|
||||
|
||||
libnm_1_32_0 {
|
||||
global:
|
||||
nm_device_bond_get_ports;
|
||||
nm_device_bridge_get_ports;
|
||||
nm_ethtool_optname_is_pause;
|
||||
nm_setting_match_new;
|
||||
nm_setting_wired_get_accept_all_mac_addresses;
|
||||
|
@@ -83,29 +83,9 @@ nm_device_bond_get_carrier(NMDeviceBond *device)
|
||||
* Returns: (element-type NMDevice): the #GPtrArray containing
|
||||
* #NMDevices that are slaves of @device. This is the internal
|
||||
* copy used by the device, and must not be modified.
|
||||
*
|
||||
* Deprecated: 1.32: Use nm_device_bond_get_ports().
|
||||
**/
|
||||
const GPtrArray *
|
||||
nm_device_bond_get_slaves(NMDeviceBond *device)
|
||||
{
|
||||
return nm_device_bond_get_ports(device);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_device_bond_get_ports:
|
||||
* @device: a #NMDeviceBond
|
||||
*
|
||||
* Gets the devices currently set as port of @device.
|
||||
*
|
||||
* Returns: (element-type NMDevice): the #GPtrArray containing
|
||||
* #NMDevices that are ports of @device. This is the internal
|
||||
* copy used by the device, and must not be modified.
|
||||
*
|
||||
* Since: 1.32
|
||||
**/
|
||||
const GPtrArray *
|
||||
nm_device_bond_get_ports(NMDeviceBond *device)
|
||||
{
|
||||
g_return_val_if_fail(NM_IS_DEVICE_BOND(device), FALSE);
|
||||
|
||||
|
@@ -82,29 +82,9 @@ nm_device_bridge_get_carrier(NMDeviceBridge *device)
|
||||
* Returns: (element-type NMDevice): the #GPtrArray containing
|
||||
* #NMDevices that are slaves of @device. This is the internal
|
||||
* copy used by the device, and must not be modified.
|
||||
*
|
||||
* Deprecated: 1.32: Use nm_device_bridge_get_ports().
|
||||
**/
|
||||
const GPtrArray *
|
||||
nm_device_bridge_get_slaves(NMDeviceBridge *device)
|
||||
{
|
||||
return nm_device_bridge_get_ports(device);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_device_bridge_get_ports:
|
||||
* @device: a #NMDeviceBridge
|
||||
*
|
||||
* Gets the devices currently set as port of @device.
|
||||
*
|
||||
* Returns: (element-type NMDevice): the #GPtrArray containing
|
||||
* #NMDevices that are ports of @device. This is the internal
|
||||
* copy used by the device, and must not be modified.
|
||||
*
|
||||
* Since: 1.32
|
||||
**/
|
||||
const GPtrArray *
|
||||
nm_device_bridge_get_ports(NMDeviceBridge *device)
|
||||
{
|
||||
g_return_val_if_fail(NM_IS_DEVICE_BRIDGE(device), FALSE);
|
||||
|
||||
|
@@ -37,12 +37,7 @@ GType nm_device_bond_get_type(void);
|
||||
NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address)
|
||||
const char *nm_device_bond_get_hw_address(NMDeviceBond *device);
|
||||
|
||||
gboolean nm_device_bond_get_carrier(NMDeviceBond *device);
|
||||
|
||||
NM_AVAILABLE_IN_1_32
|
||||
const GPtrArray *nm_device_bond_get_ports(NMDeviceBond *device);
|
||||
|
||||
NM_DEPRECATED_IN_1_32_FOR(nm_device_get_ports)
|
||||
gboolean nm_device_bond_get_carrier(NMDeviceBond *device);
|
||||
const GPtrArray *nm_device_bond_get_slaves(NMDeviceBond *device);
|
||||
|
||||
G_END_DECLS
|
||||
|
@@ -38,12 +38,7 @@ GType nm_device_bridge_get_type(void);
|
||||
NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address)
|
||||
const char *nm_device_bridge_get_hw_address(NMDeviceBridge *device);
|
||||
|
||||
gboolean nm_device_bridge_get_carrier(NMDeviceBridge *device);
|
||||
|
||||
NM_AVAILABLE_IN_1_32
|
||||
const GPtrArray *nm_device_bridge_get_ports(NMDeviceBridge *device);
|
||||
|
||||
NM_DEPRECATED_IN_1_32_FOR(nm_device_bridge_get_ports)
|
||||
gboolean nm_device_bridge_get_carrier(NMDeviceBridge *device);
|
||||
const GPtrArray *nm_device_bridge_get_slaves(NMDeviceBridge *device);
|
||||
|
||||
G_END_DECLS
|
||||
|
Reference in New Issue
Block a user