core: add active connection state DEACTIVATING
Not used yet, but will be when device deactivating state gets used. Should be 100% backwards compatible with users that don't know about it for now.
This commit is contained in:
@@ -1187,6 +1187,8 @@ active_connection_state_to_string (NMActiveConnectionState state)
|
|||||||
return _("activating");
|
return _("activating");
|
||||||
case NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
|
case NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
|
||||||
return _("activated");
|
return _("activated");
|
||||||
|
case NM_ACTIVE_CONNECTION_STATE_DEACTIVATING:
|
||||||
|
return _("deactivating");
|
||||||
case NM_ACTIVE_CONNECTION_STATE_UNKNOWN:
|
case NM_ACTIVE_CONNECTION_STATE_UNKNOWN:
|
||||||
default:
|
default:
|
||||||
return _("unknown");
|
return _("unknown");
|
||||||
|
@@ -316,6 +316,22 @@
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>New Active Connection State</title>
|
||||||
|
<para>
|
||||||
|
Along with the new device states, an
|
||||||
|
<ulink url="spec.html#type-NM_ACTIVE_CONNECTION_STATE">additional
|
||||||
|
ActiveConnection state</ulink> has been added: DEACTIVATING. This state
|
||||||
|
is entered when the connection is being torn down and deactivated.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<emphasis role="strong">Action:</emphasis> where code checks active
|
||||||
|
connection states or shows UI indication of active connection states, make
|
||||||
|
sure the DEACTIVATING state is processed correctly, and that code in
|
||||||
|
switch()-type statements is updated to handle it.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Consolidated Modem Devices</title>
|
<title>Consolidated Modem Devices</title>
|
||||||
<para>
|
<para>
|
||||||
|
@@ -417,14 +417,23 @@ typedef enum {
|
|||||||
} NMDeviceStateReason;
|
} NMDeviceStateReason;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMActiveConnectionState:
|
||||||
|
* @NM_ACTIVE_CONNECTION_STATE_UNKNOWN: the state of the connection is unknown
|
||||||
|
* @NM_ACTIVE_CONNECTION_STATE_ACTIVATING: a network connection is being prepared
|
||||||
|
* @NM_ACTIVE_CONNECTION_STATE_ACTIVATED: there is a connection to the network
|
||||||
|
* @NM_ACTIVE_CONNECTION_STATE_DEACTIVATING: the network connection is being
|
||||||
|
* torn down and cleaned up
|
||||||
|
*
|
||||||
|
* #NMActiveConnectionState values indicate the state of a connection to a
|
||||||
|
* specific network while it is starting, connected, or disconnecting from that
|
||||||
|
* network.
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0,
|
NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0,
|
||||||
|
|
||||||
/* Indicates the connection is activating */
|
|
||||||
NM_ACTIVE_CONNECTION_STATE_ACTIVATING,
|
NM_ACTIVE_CONNECTION_STATE_ACTIVATING,
|
||||||
|
NM_ACTIVE_CONNECTION_STATE_ACTIVATED,
|
||||||
/* Indicates the connection is currently active */
|
NM_ACTIVE_CONNECTION_STATE_DEACTIVATING
|
||||||
NM_ACTIVE_CONNECTION_STATE_ACTIVATED
|
|
||||||
} NMActiveConnectionState;
|
} NMActiveConnectionState;
|
||||||
|
|
||||||
#endif /* NETWORK_MANAGER_H */
|
#endif /* NETWORK_MANAGER_H */
|
||||||
|
@@ -48,6 +48,11 @@
|
|||||||
The connection is activated.
|
The connection is activated.
|
||||||
</tp:docstring>
|
</tp:docstring>
|
||||||
</tp:enumvalue>
|
</tp:enumvalue>
|
||||||
|
<tp:enumvalue suffix="DEACTIVATING" value="3">
|
||||||
|
<tp:docstring>
|
||||||
|
The connection is being torn down and cleaned up.
|
||||||
|
</tp:docstring>
|
||||||
|
</tp:enumvalue>
|
||||||
</tp:enum>
|
</tp:enum>
|
||||||
</interface>
|
</interface>
|
||||||
</node>
|
</node>
|
||||||
|
@@ -454,7 +454,7 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class)
|
|||||||
"State",
|
"State",
|
||||||
"State",
|
"State",
|
||||||
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
|
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
|
||||||
NM_ACTIVE_CONNECTION_STATE_ACTIVATED,
|
NM_ACTIVE_CONNECTION_STATE_DEACTIVATING,
|
||||||
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
|
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
|
@@ -440,8 +440,12 @@ device_state_changed (NMDevice *device,
|
|||||||
new_default = priv->is_default;
|
new_default = priv->is_default;
|
||||||
new_default6 = priv->is_default6;
|
new_default6 = priv->is_default6;
|
||||||
break;
|
break;
|
||||||
|
case NM_DEVICE_STATE_DEACTIVATING:
|
||||||
|
new_ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATING;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
new_ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
|
new_ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
|
||||||
|
new_default = new_default6 = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -68,7 +68,7 @@ nm_active_connection_install_properties (GObjectClass *object_class,
|
|||||||
"State",
|
"State",
|
||||||
"State",
|
"State",
|
||||||
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
|
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
|
||||||
NM_ACTIVE_CONNECTION_STATE_ACTIVATED,
|
NM_ACTIVE_CONNECTION_STATE_DEACTIVATING,
|
||||||
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
|
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user