core: move nm_device_interface_connection_match_config() to nm-device.c

This commit is contained in:
Dan Williams 2011-11-17 23:14:10 -06:00
parent 1287c8e18d
commit 2db920659f
5 changed files with 7 additions and 22 deletions

View file

@ -370,17 +370,6 @@ nm_device_interface_spec_match_list (NMDeviceInterface *device,
return FALSE;
}
NMConnection *
nm_device_interface_connection_match_config (NMDeviceInterface *device,
const GSList *connections)
{
g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), NULL);
if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->connection_match_config)
return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->connection_match_config (device, connections);
return NULL;
}
void
nm_device_interface_set_enabled (NMDeviceInterface *device, gboolean enabled)
{

View file

@ -102,8 +102,6 @@ struct _NMDeviceInterface {
gboolean (*spec_match_list) (NMDeviceInterface *device, const GSList *specs);
NMConnection * (*connection_match_config) (NMDeviceInterface *device, const GSList *specs);
void (*set_enabled) (NMDeviceInterface *device, gboolean enabled);
gboolean (*get_enabled) (NMDeviceInterface *device);
@ -131,9 +129,6 @@ void nm_device_interface_deactivate (NMDeviceInterface *device, NMDeviceStateRea
gboolean nm_device_interface_spec_match_list (NMDeviceInterface *device,
const GSList *specs);
NMConnection * nm_device_interface_connection_match_config (NMDeviceInterface *device,
const GSList *connections);
gboolean nm_device_interface_get_enabled (NMDeviceInterface *device);
void nm_device_interface_set_enabled (NMDeviceInterface *device, gboolean enabled);

View file

@ -174,7 +174,6 @@ static gboolean nm_device_activate (NMDeviceInterface *device,
static void nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason);
static gboolean device_disconnect (NMDeviceInterface *device, GError **error);
static gboolean spec_match_list (NMDeviceInterface *device, const GSList *specs);
static NMConnection *connection_match_config (NMDeviceInterface *device, const GSList *connections);
static void nm_device_take_down (NMDevice *dev, gboolean wait, NMDeviceStateReason reason);
@ -205,7 +204,6 @@ device_interface_init (NMDeviceInterface *device_interface_class)
device_interface_class->deactivate = nm_device_deactivate;
device_interface_class->disconnect = device_disconnect;
device_interface_class->spec_match_list = spec_match_list;
device_interface_class->connection_match_config = connection_match_config;
}
@ -4055,10 +4053,11 @@ spec_match_list (NMDeviceInterface *device, const GSList *specs)
return FALSE;
}
static NMConnection *
connection_match_config (NMDeviceInterface *device, const GSList *connections)
NMConnection *
nm_device_connection_match_config (NMDevice *device, const GSList *connections)
{
g_return_val_if_fail (device != NULL, NULL);
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
if (NM_DEVICE_GET_CLASS (device)->connection_match_config)
return NM_DEVICE_GET_CLASS (device)->connection_match_config (NM_DEVICE (device), connections);

View file

@ -162,6 +162,9 @@ gboolean nm_device_check_connection_compatible (NMDevice *device,
gboolean nm_device_can_assume_connections (NMDevice *device);
NMConnection * nm_device_connection_match_config (NMDevice *device,
const GSList *connections);
gboolean nm_device_is_activating (NMDevice *dev);
gboolean nm_device_can_interrupt_activation (NMDevice *self);
gboolean nm_device_autoconnect_allowed (NMDevice *self);

View file

@ -1567,8 +1567,7 @@ add_device (NMManager *self, NMDevice *device)
GSList *connections = NULL;
connections = nm_settings_get_connections (priv->settings);
existing = nm_device_interface_connection_match_config (NM_DEVICE_INTERFACE (device),
(const GSList *) connections);
existing = nm_device_connection_match_config (device, (const GSList *) connections);
g_slist_free (connections);
if (existing)