diff options
author | Thomas Haller <thaller@redhat.com> | 2014-11-05 08:28:40 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-11-07 15:23:11 +0100 |
commit | f5c0646e1c0807aa4379ddde820a675e48c2f4bd (patch) | |
tree | 976911cff66113f6b3f1762fa2bc64f36558bdf4 | |
parent | 0c355ea5a0a59f688dcb2f07910a4a4be87ae843 (diff) | |
download | NetworkManager-f5c0646e1c0807aa4379ddde820a675e48c2f4bd.tar.gz |
device: add function nm_device_uses_assumed_connection()
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/devices/nm-device.c | 11 | ||||
-rw-r--r-- | src/devices/nm-device.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index f4a8a1c424..4d5f8a449b 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -775,6 +775,17 @@ nm_device_uses_generated_assumed_connection (NMDevice *self) return FALSE; } +gboolean +nm_device_uses_assumed_connection (NMDevice *self) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + + if ( priv->act_request + && nm_active_connection_get_assumed (NM_ACTIVE_CONNECTION (priv->act_request))) + return TRUE; + return FALSE; +} + static SlaveInfo * find_slave_info (NMDevice *self, NMDevice *slave) { diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h index a2663a0253..6b732cae96 100644 --- a/src/devices/nm-device.h +++ b/src/devices/nm-device.h @@ -275,6 +275,8 @@ gboolean nm_device_complete_connection (NMDevice *device, gboolean nm_device_check_connection_compatible (NMDevice *device, NMConnection *connection); +gboolean nm_device_uses_assumed_connection (NMDevice *device); + gboolean nm_device_can_assume_active_connection (NMDevice *device); gboolean nm_device_spec_match_list (NMDevice *device, const GSList *specs); |