Commit fa015f2a authored by Thomas Haller's avatar Thomas Haller

core/trivial: rename activation-type related checks for device and active-connection

nm_device_uses_assumed_connection() basically called
nm_active_connection_get_assumed() on the device.

Rename those functions to be closer to the activation-type
flags.

The concepts of "assume", "external", and "assume_or_external"
will make sense with the following commits.
parent 3973f8eb
......@@ -96,7 +96,7 @@ parent_hwaddr_maybe_changed (NMDevice *parent,
NMSettingIPConfig *s_ip6;
/* Never touch assumed devices */
if (nm_device_uses_assumed_connection ((NMDevice *) self))
if (nm_device_has_activation_type_assume_or_external ((NMDevice *) self))
return;
connection = nm_device_get_applied_connection ((NMDevice *) self);
......
This diff is collapsed.
......@@ -489,7 +489,7 @@ gboolean nm_device_complete_connection (NMDevice *device,
gboolean nm_device_check_connection_compatible (NMDevice *device, NMConnection *connection);
gboolean nm_device_check_slave_connection_compatible (NMDevice *device, NMConnection *connection);
gboolean nm_device_uses_assumed_connection (NMDevice *device);
gboolean nm_device_has_activation_type_assume_or_external (NMDevice *device);
gboolean nm_device_unmanage_on_quit (NMDevice *self);
......
......@@ -416,7 +416,7 @@ teamd_dbus_appeared (GDBusConnection *connection,
success = teamd_read_config (device);
if (success)
nm_device_activate_schedule_stage2_device_config (device);
else if (!nm_device_uses_assumed_connection (device))
else if (!nm_device_has_activation_type_assume_or_external (device))
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED);
}
}
......
......@@ -722,7 +722,7 @@ nm_active_connection_get_activation_type (NMActiveConnection *self)
}
gboolean
nm_active_connection_get_assumed (NMActiveConnection *self)
nm_active_connection_has_activation_type_assume_or_external (NMActiveConnection *self)
{
return nm_active_connection_get_activation_type (self) == NM_ACTIVATION_TYPE_ASSUME;
}
......
......@@ -159,7 +159,7 @@ void nm_active_connection_set_master (NMActiveConnection *self,
void nm_active_connection_set_parent (NMActiveConnection *self,
NMActiveConnection *parent);
gboolean nm_active_connection_get_assumed (NMActiveConnection *self);
gboolean nm_active_connection_has_activation_type_assume_or_external (NMActiveConnection *self);
NMActivationType nm_active_connection_get_activation_type (NMActiveConnection *self);
......
......@@ -271,7 +271,7 @@ active_connection_remove (NMManager *self, NMActiveConnection *active)
g_signal_handlers_disconnect_by_func (active, active_connection_default_changed, self);
g_signal_handlers_disconnect_by_func (active, active_connection_parent_active, self);
if ( nm_active_connection_get_assumed (active)
if ( nm_active_connection_has_activation_type_assume_or_external (active)
&& (connection = nm_active_connection_get_settings_connection (active))
&& nm_settings_connection_get_volatile (connection))
g_object_ref (connection);
......@@ -802,13 +802,13 @@ find_best_device_state (NMManager *manager, gboolean *force_connectivity_check)
}
break;
case NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
if (!nm_active_connection_get_assumed (ac)) {
if (!nm_active_connection_has_activation_type_assume_or_external (ac)) {
if (best_state != NM_STATE_CONNECTED_GLOBAL)
best_state = NM_STATE_CONNECTING;
}
break;
case NM_ACTIVE_CONNECTION_STATE_DEACTIVATING:
if (!nm_active_connection_get_assumed (ac)) {
if (!nm_active_connection_has_activation_type_assume_or_external (ac)) {
if (best_state < NM_STATE_DISCONNECTING)
best_state = NM_STATE_DISCONNECTING;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment