diff options
Diffstat (limited to 'src/libnm-client-impl/nm-device-bridge.c')
| -rw-r--r-- | src/libnm-client-impl/nm-device-bridge.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/libnm-client-impl/nm-device-bridge.c b/src/libnm-client-impl/nm-device-bridge.c index 9bc41ac8..fb0ad873 100644 --- a/src/libnm-client-impl/nm-device-bridge.c +++ b/src/libnm-client-impl/nm-device-bridge.c @@ -18,8 +18,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_CARRIER, PROP_SLAVES, ); typedef struct { - NMLDBusPropertyAO slaves; - bool carrier; + bool carrier; } NMDeviceBridgePrivate; struct _NMDeviceBridge { @@ -82,13 +81,13 @@ 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.34 Use nm_device_get_ports() instead. **/ const GPtrArray * nm_device_bridge_get_slaves(NMDeviceBridge *device) { - g_return_val_if_fail(NM_IS_DEVICE_BRIDGE(device), FALSE); - - return nml_dbus_property_ao_get_objs_as_ptrarray(&NM_DEVICE_BRIDGE_GET_PRIVATE(device)->slaves); + return nm_device_get_ports(NM_DEVICE(device)); } static gboolean @@ -156,11 +155,10 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_bridge = NML_DBUS_META_IFA 0, "s", _nm_device_notify_update_prop_hw_address), - NML_DBUS_META_PROPERTY_INIT_AO_PROP("Slaves", - PROP_SLAVES, - NMDeviceBridge, - _priv.slaves, - nm_device_get_type), ), ); + NML_DBUS_META_PROPERTY_INIT_FCN("Slaves", + PROP_SLAVES, + "ao", + _nm_device_notify_update_prop_ports), ), ); static void nm_device_bridge_class_init(NMDeviceBridgeClass *klass) @@ -173,8 +171,6 @@ nm_device_bridge_class_init(NMDeviceBridgeClass *klass) _NM_OBJECT_CLASS_INIT_PRIV_PTR_DIRECT(nm_object_class, NMDeviceBridge); - _NM_OBJECT_CLASS_INIT_PROPERTY_AO_FIELDS_1(nm_object_class, NMDeviceBridgePrivate, slaves); - device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; @@ -201,4 +197,6 @@ nm_device_bridge_class_init(NMDeviceBridgeClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); _nml_dbus_meta_class_init_with_properties(object_class, &_nml_dbus_meta_iface_nm_device_bridge); + + device_class->slaves_param_spec = obj_properties[PROP_SLAVES]; } |