mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 03:50:17 +01:00
libnm/trivial: rename internal connection-get-setting methods
This function will be exposed on the internal header. Rename to _nm_connection_get_setting_by_metatype(). (cherry picked from commit27cbf584bd) (cherry picked from commitc194db5755)
This commit is contained in:
parent
9cb9dfa77b
commit
3922761238
1 changed files with 40 additions and 41 deletions
|
|
@ -339,7 +339,7 @@ _connection_get_setting_check(NMConnection *connection, GType setting_type)
|
|||
}
|
||||
|
||||
static gpointer
|
||||
_connection_get_setting_by_meta_type_check(NMConnection *connection, NMMetaSettingType meta_type)
|
||||
_nm_connection_get_setting_by_metatype(NMConnection *connection, NMMetaSettingType meta_type)
|
||||
{
|
||||
g_return_val_if_fail(NM_IS_CONNECTION(connection), NULL);
|
||||
|
||||
|
|
@ -3231,7 +3231,7 @@ nm_connection_get_virtual_device_description(NMConnection *connection)
|
|||
NMSetting8021x *
|
||||
nm_connection_get_setting_802_1x(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_802_1X);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_802_1X);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3245,7 +3245,7 @@ nm_connection_get_setting_802_1x(NMConnection *connection)
|
|||
NMSettingBluetooth *
|
||||
nm_connection_get_setting_bluetooth(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_BLUETOOTH);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_BLUETOOTH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3259,7 +3259,7 @@ nm_connection_get_setting_bluetooth(NMConnection *connection)
|
|||
NMSettingBond *
|
||||
nm_connection_get_setting_bond(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_BOND);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_BOND);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3273,7 +3273,7 @@ nm_connection_get_setting_bond(NMConnection *connection)
|
|||
NMSettingTeam *
|
||||
nm_connection_get_setting_team(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_TEAM);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_TEAM);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3287,7 +3287,7 @@ nm_connection_get_setting_team(NMConnection *connection)
|
|||
NMSettingTeamPort *
|
||||
nm_connection_get_setting_team_port(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_TEAM_PORT);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_TEAM_PORT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3301,7 +3301,7 @@ nm_connection_get_setting_team_port(NMConnection *connection)
|
|||
NMSettingBridge *
|
||||
nm_connection_get_setting_bridge(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_BRIDGE);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_BRIDGE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3315,7 +3315,7 @@ nm_connection_get_setting_bridge(NMConnection *connection)
|
|||
NMSettingCdma *
|
||||
nm_connection_get_setting_cdma(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_CDMA);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_CDMA);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3329,7 +3329,7 @@ nm_connection_get_setting_cdma(NMConnection *connection)
|
|||
NMSettingConnection *
|
||||
nm_connection_get_setting_connection(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_CONNECTION);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_CONNECTION);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3343,7 +3343,7 @@ nm_connection_get_setting_connection(NMConnection *connection)
|
|||
NMSettingDcb *
|
||||
nm_connection_get_setting_dcb(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_DCB);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_DCB);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3359,7 +3359,7 @@ nm_connection_get_setting_dcb(NMConnection *connection)
|
|||
NMSettingDummy *
|
||||
nm_connection_get_setting_dummy(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_DUMMY);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_DUMMY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3373,7 +3373,7 @@ nm_connection_get_setting_dummy(NMConnection *connection)
|
|||
NMSettingGeneric *
|
||||
nm_connection_get_setting_generic(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_GENERIC);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_GENERIC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3387,7 +3387,7 @@ nm_connection_get_setting_generic(NMConnection *connection)
|
|||
NMSettingGsm *
|
||||
nm_connection_get_setting_gsm(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_GSM);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_GSM);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3401,7 +3401,7 @@ nm_connection_get_setting_gsm(NMConnection *connection)
|
|||
NMSettingInfiniband *
|
||||
nm_connection_get_setting_infiniband(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_INFINIBAND);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_INFINIBAND);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3420,7 +3420,7 @@ nm_connection_get_setting_infiniband(NMConnection *connection)
|
|||
NMSettingIPConfig *
|
||||
nm_connection_get_setting_ip4_config(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_IP4_CONFIG);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_IP4_CONFIG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3436,7 +3436,7 @@ nm_connection_get_setting_ip4_config(NMConnection *connection)
|
|||
NMSettingIPTunnel *
|
||||
nm_connection_get_setting_ip_tunnel(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_IP_TUNNEL);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_IP_TUNNEL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3455,7 +3455,7 @@ nm_connection_get_setting_ip_tunnel(NMConnection *connection)
|
|||
NMSettingIPConfig *
|
||||
nm_connection_get_setting_ip6_config(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_IP6_CONFIG);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_IP6_CONFIG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3471,7 +3471,7 @@ nm_connection_get_setting_ip6_config(NMConnection *connection)
|
|||
NMSettingMacsec *
|
||||
nm_connection_get_setting_macsec(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_MACSEC);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_MACSEC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3487,7 +3487,7 @@ nm_connection_get_setting_macsec(NMConnection *connection)
|
|||
NMSettingMacvlan *
|
||||
nm_connection_get_setting_macvlan(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_MACVLAN);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_MACVLAN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3501,7 +3501,7 @@ nm_connection_get_setting_macvlan(NMConnection *connection)
|
|||
NMSettingOlpcMesh *
|
||||
nm_connection_get_setting_olpc_mesh(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_OLPC_MESH);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_OLPC_MESH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3517,7 +3517,7 @@ nm_connection_get_setting_olpc_mesh(NMConnection *connection)
|
|||
NMSettingOvsBridge *
|
||||
nm_connection_get_setting_ovs_bridge(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_OVS_BRIDGE);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_OVS_BRIDGE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3533,8 +3533,7 @@ nm_connection_get_setting_ovs_bridge(NMConnection *connection)
|
|||
NMSettingOvsInterface *
|
||||
nm_connection_get_setting_ovs_interface(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection,
|
||||
NM_META_SETTING_TYPE_OVS_INTERFACE);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_OVS_INTERFACE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3550,7 +3549,7 @@ nm_connection_get_setting_ovs_interface(NMConnection *connection)
|
|||
NMSettingOvsPatch *
|
||||
nm_connection_get_setting_ovs_patch(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_OVS_PATCH);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_OVS_PATCH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3566,7 +3565,7 @@ nm_connection_get_setting_ovs_patch(NMConnection *connection)
|
|||
NMSettingOvsPort *
|
||||
nm_connection_get_setting_ovs_port(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_OVS_PORT);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_OVS_PORT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3580,7 +3579,7 @@ nm_connection_get_setting_ovs_port(NMConnection *connection)
|
|||
NMSettingPpp *
|
||||
nm_connection_get_setting_ppp(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_PPP);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_PPP);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3594,7 +3593,7 @@ nm_connection_get_setting_ppp(NMConnection *connection)
|
|||
NMSettingPppoe *
|
||||
nm_connection_get_setting_pppoe(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_PPPOE);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_PPPOE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3610,7 +3609,7 @@ nm_connection_get_setting_pppoe(NMConnection *connection)
|
|||
NMSettingProxy *
|
||||
nm_connection_get_setting_proxy(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_PROXY);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_PROXY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3624,7 +3623,7 @@ nm_connection_get_setting_proxy(NMConnection *connection)
|
|||
NMSettingSerial *
|
||||
nm_connection_get_setting_serial(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_SERIAL);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_SERIAL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3640,7 +3639,7 @@ nm_connection_get_setting_serial(NMConnection *connection)
|
|||
NMSettingTCConfig *
|
||||
nm_connection_get_setting_tc_config(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_TC_CONFIG);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_TC_CONFIG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3656,7 +3655,7 @@ nm_connection_get_setting_tc_config(NMConnection *connection)
|
|||
NMSettingTun *
|
||||
nm_connection_get_setting_tun(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_TUN);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_TUN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3670,7 +3669,7 @@ nm_connection_get_setting_tun(NMConnection *connection)
|
|||
NMSettingVpn *
|
||||
nm_connection_get_setting_vpn(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_VPN);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_VPN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3686,7 +3685,7 @@ nm_connection_get_setting_vpn(NMConnection *connection)
|
|||
NMSettingVxlan *
|
||||
nm_connection_get_setting_vxlan(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_VXLAN);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_VXLAN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3700,7 +3699,7 @@ nm_connection_get_setting_vxlan(NMConnection *connection)
|
|||
NMSettingWimax *
|
||||
nm_connection_get_setting_wimax(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_WIMAX);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_WIMAX);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3714,7 +3713,7 @@ nm_connection_get_setting_wimax(NMConnection *connection)
|
|||
NMSettingWired *
|
||||
nm_connection_get_setting_wired(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_WIRED);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_WIRED);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3728,7 +3727,7 @@ nm_connection_get_setting_wired(NMConnection *connection)
|
|||
NMSettingAdsl *
|
||||
nm_connection_get_setting_adsl(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_ADSL);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_ADSL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3742,7 +3741,7 @@ nm_connection_get_setting_adsl(NMConnection *connection)
|
|||
NMSettingWireless *
|
||||
nm_connection_get_setting_wireless(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_WIRELESS);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_WIRELESS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3756,8 +3755,8 @@ nm_connection_get_setting_wireless(NMConnection *connection)
|
|||
NMSettingWirelessSecurity *
|
||||
nm_connection_get_setting_wireless_security(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection,
|
||||
NM_META_SETTING_TYPE_WIRELESS_SECURITY);
|
||||
return _nm_connection_get_setting_by_metatype(connection,
|
||||
NM_META_SETTING_TYPE_WIRELESS_SECURITY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3771,7 +3770,7 @@ nm_connection_get_setting_wireless_security(NMConnection *connection)
|
|||
NMSettingBridgePort *
|
||||
nm_connection_get_setting_bridge_port(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_BRIDGE_PORT);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_BRIDGE_PORT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3785,7 +3784,7 @@ nm_connection_get_setting_bridge_port(NMConnection *connection)
|
|||
NMSettingVlan *
|
||||
nm_connection_get_setting_vlan(NMConnection *connection)
|
||||
{
|
||||
return _connection_get_setting_by_meta_type_check(connection, NM_META_SETTING_TYPE_VLAN);
|
||||
return _nm_connection_get_setting_by_metatype(connection, NM_META_SETTING_TYPE_VLAN);
|
||||
}
|
||||
|
||||
NMSettingBluetooth *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue