From 339b51652a85d3423d1ae5d826b992b01f5202ec Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 2 Nov 2021 11:17:06 +0100 Subject: [PATCH] api,bearer: new 'access-type-preference' setting In 5G capable devices, which can support multiple types of access types (either 3GPP or non-3GPP), the UE may request to use a 3GPP access type exclusively, prefer a 3GPP access type, or just report no preference. When supported, this field may also be part of the settings that can be stored as part of a profile. --- docs/reference/api/ModemManager-sections.txt | 1 + .../libmm-glib/libmm-glib-sections.txt | 4 ++++ include/ModemManager-enums.h | 19 +++++++++++++++++++ .../org.freedesktop.ModemManager1.Bearer.xml | 7 +++++++ 4 files changed, 31 insertions(+) diff --git a/docs/reference/api/ModemManager-sections.txt b/docs/reference/api/ModemManager-sections.txt index e2c43223..886454f8 100644 --- a/docs/reference/api/ModemManager-sections.txt +++ b/docs/reference/api/ModemManager-sections.txt @@ -16,6 +16,7 @@ MMBearerIpMethod MMBearerAllowedAuth MMBearerMultiplexSupport MMBearerApnType +MMBearerAccessTypePreference MMCallDirection MMCallState MMCallStateReason diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index ca3daa99..42c4d81a 100644 --- a/docs/reference/libmm-glib/libmm-glib-sections.txt +++ b/docs/reference/libmm-glib/libmm-glib-sections.txt @@ -1705,6 +1705,7 @@ mm_bearer_apn_type_build_string_from_mask mm_sim_type_get_string mm_sim_esim_status_get_string mm_sim_removability_get_string +mm_bearer_access_type_preference_get_string mm_modem_capability_build_string_from_mask mm_modem_state_get_string mm_modem_state_failed_reason_get_string @@ -1775,6 +1776,7 @@ mm_bearer_apn_type_get_string mm_sim_type_build_string_from_mask mm_sim_esim_status_build_string_from_mask mm_sim_removability_build_string_from_mask +mm_bearer_access_type_preference_build_string_from_mask mm_modem_cdma_registration_state_build_string_from_mask mm_modem_cdma_activation_state_build_string_from_mask mm_modem_cdma_rm_protocol_build_string_from_mask @@ -1807,6 +1809,7 @@ MM_TYPE_BEARER_APN_TYPE MM_TYPE_SIM_TYPE MM_TYPE_ESIM_STATUS MM_TYPE_SIM_REMOVAL_STATUS +MM_TYPE_BEARER_ACCESS_TYPE_PREFERENCE MM_TYPE_FIRMWARE_IMAGE_TYPE MM_TYPE_MODEM_3GPP_FACILITY MM_TYPE_MODEM_3GPP_NETWORK_AVAILABILITY @@ -1857,6 +1860,7 @@ mm_bearer_apn_type_get_type mm_sim_type_get_type mm_sim_esim_status_get_type mm_sim_removability_get_type +mm_bearer_access_type_preference_get_type mm_firmware_image_type_get_type mm_modem_3gpp_facility_get_type mm_modem_3gpp_network_availability_get_type diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h index 3c540dc1..6abad2c1 100644 --- a/include/ModemManager-enums.h +++ b/include/ModemManager-enums.h @@ -1821,4 +1821,23 @@ typedef enum { /*< underscore_name=mm_modem_3gpp_drx_cycle >*/ MM_MODEM_3GPP_DRX_CYCLE_256 = 5, } MMModem3gppDrxCycle; +/** + * MMBearerAccessTypePreference: + * @MM_BEARER_ACCESS_TYPE_PREFERENCE_NONE: No access type preference, or unknown. + * @MM_BEARER_ACCESS_TYPE_PREFERENCE_3GPP_ONLY: 3GPP access type only. + * @MM_BEARER_ACCESS_TYPE_PREFERENCE_3GPP_PREFERRED: All access types allowed but 3GPP preferred. + * @MM_BEARER_ACCESS_TYPE_PREFERENCE_NON_3GPP_ONLY: Non-3GPP access type only. + * + * 5G network access type preference, such as 3GPP (NR, E-UTRA) or + * non-3GPP (untrusted WiFi, trusted WiFi, wireline). + * + * Since: 1.20 + */ +typedef enum { /*< underscore_name=mm_bearer_access_type_preference >*/ + MM_BEARER_ACCESS_TYPE_PREFERENCE_NONE = 0, + MM_BEARER_ACCESS_TYPE_PREFERENCE_3GPP_ONLY = 1, + MM_BEARER_ACCESS_TYPE_PREFERENCE_3GPP_PREFERRED = 2, + MM_BEARER_ACCESS_TYPE_PREFERENCE_NON_3GPP_ONLY = 3, +} MMBearerAccessTypePreference; + #endif /* _MODEMMANAGER_ENUMS_H_ */ diff --git a/introspection/org.freedesktop.ModemManager1.Bearer.xml b/introspection/org.freedesktop.ModemManager1.Bearer.xml index 07cab833..54411fcd 100644 --- a/introspection/org.freedesktop.ModemManager1.Bearer.xml +++ b/introspection/org.freedesktop.ModemManager1.Bearer.xml @@ -482,6 +482,13 @@ value (signature "s"). + "access-type-preference" + + Access type preference for 5G devices, given as a + MMBearerAccessTypePreference + value (signature "u". Since 1.20. + + "profile-id" The ID of the 3GPP profile to connect to (signature