dbus-interface: rename activation flag to use conscious language
This commit is contained in:
@@ -6884,7 +6884,7 @@ nm_device_controller_release_port(NMDevice *self,
|
||||
if (c_list_is_empty(&priv->ports)) {
|
||||
_active_connection_set_state_flags_full(self,
|
||||
0,
|
||||
NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES);
|
||||
NM_ACTIVATION_STATE_FLAG_CONTROLLER_HAS_PORTS);
|
||||
}
|
||||
|
||||
/* Ensure the device's hardware address is up-to-date; it often changes
|
||||
@@ -8535,7 +8535,7 @@ nm_device_controller_add_port(NMDevice *self, NMDevice *port, gboolean configure
|
||||
c_list_link_tail(&priv->ports, &info->lst_port);
|
||||
port_priv->controller = g_object_ref(self);
|
||||
|
||||
_active_connection_set_state_flags(self, NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES);
|
||||
_active_connection_set_state_flags(self, NM_ACTIVATION_STATE_FLAG_CONTROLLER_HAS_PORTS);
|
||||
|
||||
/* no need to emit
|
||||
*
|
||||
|
@@ -157,12 +157,12 @@ static NM_UTILS_FLAGS2STR_DEFINE(
|
||||
_state_flags_to_string,
|
||||
NMActivationStateFlags,
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_NONE, "none"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_IS_MASTER, "is-controller"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_IS_SLAVE, "is-port"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_IS_CONTROLLER, "is-controller"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_IS_PORT, "is-port"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_LAYER2_READY, "layer2-ready"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_IP4_READY, "ip4-ready"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_IP6_READY, "ip6-ready"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES, "controller-has-ports"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_CONTROLLER_HAS_PORTS, "controller-has-ports"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY,
|
||||
"lifetime-bound-to-profile-visibility"),
|
||||
NM_UTILS_FLAGS2STR(NM_ACTIVATION_STATE_FLAG_EXTERNAL, "external"), );
|
||||
@@ -448,15 +448,15 @@ _set_applied_connection_take(NMActiveConnection *self, NMConnection *applied_con
|
||||
* on the connection properties itself. */
|
||||
s_con = nm_connection_get_setting_connection(priv->applied_connection);
|
||||
if (nm_setting_connection_get_controller(s_con))
|
||||
flags_val |= NM_ACTIVATION_STATE_FLAG_IS_SLAVE;
|
||||
flags_val |= NM_ACTIVATION_STATE_FLAG_IS_PORT;
|
||||
|
||||
if (_nm_connection_type_is_controller(nm_setting_connection_get_connection_type(s_con)))
|
||||
flags_val |= NM_ACTIVATION_STATE_FLAG_IS_MASTER;
|
||||
flags_val |= NM_ACTIVATION_STATE_FLAG_IS_CONTROLLER;
|
||||
|
||||
nm_active_connection_set_state_flags_full(self,
|
||||
flags_val,
|
||||
NM_ACTIVATION_STATE_FLAG_IS_MASTER
|
||||
| NM_ACTIVATION_STATE_FLAG_IS_SLAVE);
|
||||
NM_ACTIVATION_STATE_FLAG_IS_CONTROLLER
|
||||
| NM_ACTIVATION_STATE_FLAG_IS_PORT);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -1091,12 +1091,12 @@ typedef enum /*< flags >*/ {
|
||||
/**
|
||||
* NMActivationStateFlags:
|
||||
* @NM_ACTIVATION_STATE_FLAG_NONE: an alias for numeric zero, no flags set.
|
||||
* @NM_ACTIVATION_STATE_FLAG_IS_MASTER: the device is a controller.
|
||||
* @NM_ACTIVATION_STATE_FLAG_IS_SLAVE: the device is a slave.
|
||||
* @NM_ACTIVATION_STATE_FLAG_IS_CONTROLLER: the device is a controller.
|
||||
* @NM_ACTIVATION_STATE_FLAG_IS_PORT: the device is a port.
|
||||
* @NM_ACTIVATION_STATE_FLAG_LAYER2_READY: layer2 is activated and ready.
|
||||
* @NM_ACTIVATION_STATE_FLAG_IP4_READY: IPv4 setting is completed.
|
||||
* @NM_ACTIVATION_STATE_FLAG_IP6_READY: IPv6 setting is completed.
|
||||
* @NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES: The controller has any slave devices attached.
|
||||
* @NM_ACTIVATION_STATE_FLAG_CONTROLLER_HAS_PORTS: The controller has any port devices attached.
|
||||
* This only makes sense if the device is a controller.
|
||||
* @NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY: the lifetime
|
||||
* of the activation is bound to the visibility of the connection profile,
|
||||
@@ -1112,16 +1112,20 @@ typedef enum /*< flags >*/ {
|
||||
typedef enum /*< flags >*/ {
|
||||
NM_ACTIVATION_STATE_FLAG_NONE = 0,
|
||||
|
||||
NM_ACTIVATION_STATE_FLAG_IS_MASTER = 0x1,
|
||||
NM_ACTIVATION_STATE_FLAG_IS_SLAVE = 0x2,
|
||||
NM_ACTIVATION_STATE_FLAG_IS_CONTROLLER = 0x1,
|
||||
NM_ACTIVATION_STATE_FLAG_IS_PORT = 0x2,
|
||||
NM_ACTIVATION_STATE_FLAG_LAYER2_READY = 0x4,
|
||||
NM_ACTIVATION_STATE_FLAG_IP4_READY = 0x8,
|
||||
NM_ACTIVATION_STATE_FLAG_IP6_READY = 0x10,
|
||||
NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES = 0x20,
|
||||
NM_ACTIVATION_STATE_FLAG_CONTROLLER_HAS_PORTS = 0x20,
|
||||
NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY = 0x40,
|
||||
NM_ACTIVATION_STATE_FLAG_EXTERNAL = 0x80,
|
||||
} NMActivationStateFlags;
|
||||
|
||||
#define NM_ACTIVATION_STATE_FLAG_IS_MASTER NM_ACTIVATION_STATE_FLAG_IS_CONTROLLER
|
||||
#define NM_ACTIVATION_STATE_FLAG_IS_SLAVE NM_ACTIVATION_STATE_FLAG_IS_PORT
|
||||
#define NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES NM_ACTIVATION_FLAG_CONTROLLER_HAS_PORTS
|
||||
|
||||
/**
|
||||
* NMSettingsAddConnection2Flags:
|
||||
* @NM_SETTINGS_ADD_CONNECTION2_FLAG_NONE: an alias for numeric zero, no flags set.
|
||||
|
Reference in New Issue
Block a user