diff options
| author | Michael Biebl <biebl@debian.org> | 2018-05-11 22:09:26 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-05-11 22:09:26 +0200 |
| commit | 341d403947279cd347ebd975cae8977703c0b1f3 (patch) | |
| tree | 34fa6425901e37182b353e7c95dd1d1ec8bc41ec /src/nm-active-connection.c | |
| parent | 962a081193fcc84bbcead3dac6ebe36ccf4415ed (diff) | |
| parent | ee9c73a923909e23a649407be77e25235d769e25 (diff) | |
Update upstream source from tag 'upstream/1.10.8'
Update to upstream version '1.10.8' with Debian dir 3c3431643bdd2871afa3e1131ed2320f988f564d
Diffstat (limited to 'src/nm-active-connection.c')
| -rw-r--r-- | src/nm-active-connection.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 65f57565..c3f92464 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -54,6 +54,7 @@ typedef struct _NMActiveConnectionPrivate { bool master_ready:1; NMActivationType activation_type:3; + NMActivationReason activation_reason:3; NMAuthSubject *subject; NMActiveConnection *master; @@ -92,6 +93,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMActiveConnection, PROP_INT_MASTER, PROP_INT_MASTER_READY, PROP_INT_ACTIVATION_TYPE, + PROP_INT_ACTIVATION_REASON, ); enum { @@ -882,6 +884,14 @@ _set_activation_type_managed (NMActiveConnection *self) nm_device_sys_iface_state_set (priv->device, NM_DEVICE_SYS_IFACE_STATE_MANAGED); } +NMActivationReason +nm_active_connection_get_activation_reason (NMActiveConnection *self) +{ + g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (self), NM_ACTIVATION_REASON_UNSET); + + return NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->activation_reason; +} + /*****************************************************************************/ static void @@ -1281,6 +1291,12 @@ set_property (GObject *object, guint prop_id, g_return_if_reached (); _set_activation_type (self, (NMActivationType) i); break; + case PROP_INT_ACTIVATION_REASON: + /* construct-only */ + i = g_value_get_int (value); + priv->activation_reason = i; + nm_assert (priv->activation_reason == ((NMActivationReason) i)); + break; case PROP_SPECIFIC_OBJECT: /* construct-only */ tmp = g_value_get_string (value); @@ -1551,6 +1567,15 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); + obj_properties[PROP_INT_ACTIVATION_REASON] = + g_param_spec_int (NM_ACTIVE_CONNECTION_INT_ACTIVATION_REASON, "", "", + NM_ACTIVATION_REASON_UNSET, + NM_ACTIVATION_REASON_USER_REQUEST, + NM_ACTIVATION_REASON_UNSET, + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS); + g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); signals[DEVICE_CHANGED] = |