2007-09-09 Dan Williams <dcbw@redhat.com>
* src/nm-device.h src/nm-device.c - (nm_device_get_best_connection): new function; get best connection for the device at that time git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2774 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2007-09-09 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/nm-device.h
|
||||||
|
src/nm-device.c
|
||||||
|
- (nm_device_get_best_connection): new function; get best connection
|
||||||
|
for the device at that time
|
||||||
|
|
||||||
2007-09-09 Dan Williams <dcbw@redhat.com>
|
2007-09-09 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* src/nm-device-interface.h
|
* src/nm-device-interface.h
|
||||||
|
@@ -380,6 +380,24 @@ nm_device_set_active_link (NMDevice *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NMConnection *
|
||||||
|
nm_device_get_best_connection (NMDevice *dev)
|
||||||
|
{
|
||||||
|
guint32 caps;
|
||||||
|
|
||||||
|
g_return_val_if_fail (NM_IS_DEVICE (dev), NULL);
|
||||||
|
|
||||||
|
caps = nm_device_get_capabilities (dev);
|
||||||
|
/* Don't use devices that SUCK */
|
||||||
|
if (!(caps & NM_DEVICE_CAP_NM_SUPPORTED))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!NM_DEVICE_GET_CLASS (dev)->get_best_connection)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return NM_DEVICE_GET_CLASS (dev)->get_best_connection (dev);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nm_device_activate_stage1_device_prepare
|
* nm_device_activate_stage1_device_prepare
|
||||||
*
|
*
|
||||||
|
@@ -90,6 +90,8 @@ struct _NMDeviceClass
|
|||||||
guint32 (* get_type_capabilities) (NMDevice *self);
|
guint32 (* get_type_capabilities) (NMDevice *self);
|
||||||
guint32 (* get_generic_capabilities) (NMDevice *self);
|
guint32 (* get_generic_capabilities) (NMDevice *self);
|
||||||
|
|
||||||
|
NMConnection * (* get_best_connection) (NMDevice *self);
|
||||||
|
|
||||||
gboolean (* check_connection) (NMDevice *self, NMConnection *connection);
|
gboolean (* check_connection) (NMDevice *self, NMConnection *connection);
|
||||||
|
|
||||||
NMActStageReturn (* act_stage1_prepare) (NMDevice *self);
|
NMActStageReturn (* act_stage1_prepare) (NMDevice *self);
|
||||||
@@ -142,6 +144,7 @@ void * nm_device_get_system_config_data (NMDevice *dev);
|
|||||||
|
|
||||||
NMActRequest * nm_device_get_act_request (NMDevice *dev);
|
NMActRequest * nm_device_get_act_request (NMDevice *dev);
|
||||||
|
|
||||||
|
NMConnection * nm_device_get_best_connection (NMDevice *dev);
|
||||||
|
|
||||||
void nm_device_activate_schedule_stage1_device_prepare (NMDevice *device);
|
void nm_device_activate_schedule_stage1_device_prepare (NMDevice *device);
|
||||||
void nm_device_activate_schedule_stage2_device_config (NMDevice *device);
|
void nm_device_activate_schedule_stage2_device_config (NMDevice *device);
|
||||||
|
Reference in New Issue
Block a user