device/trivial: rename NMDeviceClass.connection_type to connection_type_supported
The term "connection_type" is overused. Give it a more distinct name.
This commit is contained in:
@@ -303,7 +303,7 @@ nm_device_6lowpan_class_init (NMDevice6LowpanClass *klass)
|
||||
device_class->act_stage1_prepare = act_stage1_prepare;
|
||||
device_class->check_connection_compatible = check_connection_compatible;
|
||||
device_class->complete_connection = complete_connection;
|
||||
device_class->connection_type = NM_SETTING_6LOWPAN_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_6LOWPAN_SETTING_NAME;
|
||||
device_class->create_and_realize = create_and_realize;
|
||||
device_class->get_generic_capabilities = get_generic_capabilities;
|
||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
||||
|
@@ -177,7 +177,7 @@ nm_device_dummy_class_init (NMDeviceDummyClass *klass)
|
||||
|
||||
dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_dummy);
|
||||
|
||||
device_class->connection_type = NM_SETTING_DUMMY_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_DUMMY_SETTING_NAME;
|
||||
device_class->complete_connection = complete_connection;
|
||||
device_class->check_connection_compatible = check_connection_compatible;
|
||||
device_class->create_and_realize = create_and_realize;
|
||||
|
@@ -861,7 +861,7 @@ nm_device_macsec_class_init (NMDeviceMacsecClass *klass)
|
||||
device_class->state_changed = device_state_changed;
|
||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
||||
|
||||
device_class->connection_type = NM_SETTING_MACSEC_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_MACSEC_SETTING_NAME;
|
||||
|
||||
obj_properties[PROP_SCI] =
|
||||
g_param_spec_uint64 (NM_DEVICE_MACSEC_SCI, "", "",
|
||||
|
@@ -505,7 +505,7 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass)
|
||||
device_class->act_stage1_prepare = act_stage1_prepare;
|
||||
device_class->check_connection_compatible = check_connection_compatible;
|
||||
device_class->complete_connection = complete_connection;
|
||||
device_class->connection_type = NM_SETTING_MACVLAN_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_MACVLAN_SETTING_NAME;
|
||||
device_class->create_and_realize = create_and_realize;
|
||||
device_class->get_generic_capabilities = get_generic_capabilities;
|
||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
||||
|
@@ -131,7 +131,7 @@ void nm_device_commit_mtu (NMDevice *self);
|
||||
/*****************************************************************************/
|
||||
|
||||
#define NM_DEVICE_CLASS_DECLARE_TYPES(klass, conn_type, ...) \
|
||||
NM_DEVICE_CLASS (klass)->connection_type = conn_type; \
|
||||
NM_DEVICE_CLASS (klass)->connection_type_supported = conn_type; \
|
||||
{ \
|
||||
static const NMLinkType link_types[] = { __VA_ARGS__, NM_LINK_TYPE_NONE }; \
|
||||
NM_DEVICE_CLASS (klass)->link_types = link_types; \
|
||||
|
@@ -436,7 +436,7 @@ nm_device_tun_class_init (NMDeviceTunClass *klass)
|
||||
|
||||
dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_tun);
|
||||
|
||||
device_class->connection_type = NM_SETTING_TUN_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_TUN_SETTING_NAME;
|
||||
device_class->link_changed = link_changed;
|
||||
device_class->complete_connection = complete_connection;
|
||||
device_class->check_connection_compatible = check_connection_compatible;
|
||||
|
@@ -585,7 +585,7 @@ nm_device_vxlan_class_init (NMDeviceVxlanClass *klass)
|
||||
|
||||
device_class->link_changed = link_changed;
|
||||
device_class->unrealize_notify = unrealize_notify;
|
||||
device_class->connection_type = NM_SETTING_VXLAN_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_VXLAN_SETTING_NAME;
|
||||
device_class->create_and_realize = create_and_realize;
|
||||
device_class->check_connection_compatible = check_connection_compatible;
|
||||
device_class->complete_connection = complete_connection;
|
||||
|
@@ -217,7 +217,7 @@ nm_device_wpan_class_init (NMDeviceWpanClass *klass)
|
||||
|
||||
dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_wpan);
|
||||
|
||||
device_class->connection_type = NM_SETTING_WPAN_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_WPAN_SETTING_NAME;
|
||||
device_class->complete_connection = complete_connection;
|
||||
device_class->check_connection_compatible = check_connection_compatible;
|
||||
device_class->update_connection = update_connection;
|
||||
|
@@ -5239,8 +5239,9 @@ nm_device_generate_connection (NMDevice *self,
|
||||
NM_SETTING_CONNECTION_INTERFACE_NAME, ifname,
|
||||
NM_SETTING_CONNECTION_TIMESTAMP, (guint64) time (NULL),
|
||||
NULL);
|
||||
if (klass->connection_type)
|
||||
g_object_set (s_con, NM_SETTING_CONNECTION_TYPE, klass->connection_type, NULL);
|
||||
if (klass->connection_type_supported)
|
||||
g_object_set (s_con, NM_SETTING_CONNECTION_TYPE, klass->connection_type_supported, NULL);
|
||||
|
||||
nm_connection_add_setting (connection, s_con);
|
||||
|
||||
/* If the device is a slave, update various slave settings */
|
||||
@@ -5474,7 +5475,7 @@ nm_device_check_slave_connection_compatible (NMDevice *self, NMConnection *slave
|
||||
return FALSE;
|
||||
|
||||
/* All masters should have connection type set */
|
||||
connection_type = NM_DEVICE_GET_CLASS (self)->connection_type;
|
||||
connection_type = NM_DEVICE_GET_CLASS (self)->connection_type_supported;
|
||||
g_return_val_if_fail (connection_type, FALSE);
|
||||
|
||||
s_con = nm_connection_get_setting_connection (slave);
|
||||
|
@@ -202,7 +202,7 @@ typedef struct _NMDeviceClass {
|
||||
struct _NMDeviceClass *default_type_description_klass;
|
||||
const char *default_type_description;
|
||||
|
||||
const char *connection_type;
|
||||
const char *connection_type_supported;
|
||||
const NMLinkType *link_types;
|
||||
|
||||
/* Whether the device type is a master-type. This depends purely on the
|
||||
|
@@ -152,7 +152,7 @@ nm_device_ovs_bridge_class_init (NMDeviceOvsBridgeClass *klass)
|
||||
|
||||
dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_ovs_bridge);
|
||||
|
||||
device_class->connection_type = NM_SETTING_OVS_BRIDGE_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_OVS_BRIDGE_SETTING_NAME;
|
||||
device_class->is_master = TRUE;
|
||||
device_class->get_type_description = get_type_description;
|
||||
device_class->create_and_realize = create_and_realize;
|
||||
|
@@ -203,7 +203,7 @@ nm_device_ovs_interface_class_init (NMDeviceOvsInterfaceClass *klass)
|
||||
|
||||
dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_ovs_interface);
|
||||
|
||||
device_class->connection_type = NM_SETTING_OVS_INTERFACE_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_OVS_INTERFACE_SETTING_NAME;
|
||||
device_class->get_type_description = get_type_description;
|
||||
device_class->create_and_realize = create_and_realize;
|
||||
device_class->get_generic_capabilities = get_generic_capabilities;
|
||||
|
@@ -198,7 +198,7 @@ nm_device_ovs_port_class_init (NMDeviceOvsPortClass *klass)
|
||||
|
||||
dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_ovs_port);
|
||||
|
||||
device_class->connection_type = NM_SETTING_OVS_PORT_SETTING_NAME;
|
||||
device_class->connection_type_supported = NM_SETTING_OVS_PORT_SETTING_NAME;
|
||||
device_class->is_master = TRUE;
|
||||
device_class->get_type_description = get_type_description;
|
||||
device_class->create_and_realize = create_and_realize;
|
||||
|
Reference in New Issue
Block a user