core: generalize interface for enabling/disabling devices

We'll use it for WWAN too.
This commit is contained in:
Dan Williams
2009-12-22 23:36:57 -08:00
parent 7b10ec29a2
commit 052cf6b2e2
5 changed files with 29 additions and 12 deletions

View File

@@ -355,3 +355,12 @@ nm_device_interface_can_assume_connection (NMDeviceInterface *device)
return !!NM_DEVICE_INTERFACE_GET_INTERFACE (device)->connection_match_config;
}
void
nm_device_interface_set_enabled (NMDeviceInterface *device, gboolean enabled)
{
g_return_if_fail (NM_IS_DEVICE_INTERFACE (device));
if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->set_enabled)
return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->set_enabled (device, enabled);
}