diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c index bc32cdd8..1752c868 100644 --- a/cli/mmcli-bearer.c +++ b/cli/mmcli-bearer.c @@ -144,6 +144,7 @@ print_bearer_info (MMBearer *bearer) stats = mm_bearer_get_stats (bearer); mmcli_output_string (MMC_F_BEARER_GENERAL_DBUS_PATH, mm_bearer_get_path (bearer)); + mmcli_output_string (MMC_F_BEARER_GENERAL_TYPE, mm_bearer_type_get_string (mm_bearer_get_bearer_type (bearer))); mmcli_output_string (MMC_F_BEARER_STATUS_CONNECTED, mm_bearer_get_connected (bearer) ? "yes" : "no"); mmcli_output_string (MMC_F_BEARER_STATUS_SUSPENDED, mm_bearer_get_suspended (bearer) ? "yes" : "no"); diff --git a/cli/mmcli-output.c b/cli/mmcli-output.c index ac7dc333..79646abc 100644 --- a/cli/mmcli-output.c +++ b/cli/mmcli-output.c @@ -184,6 +184,7 @@ static FieldInfo field_infos[] = { [MMC_F_LOCATION_CDMABS_LAT] = { "modem.location.cdma-bs.latitude", "latitude", MMC_S_MODEM_LOCATION_CDMABS, }, [MMC_F_FIRMWARE_LIST] = { "modem.firmware-list", "list", MMC_S_MODEM_FIRMWARE, }, [MMC_F_BEARER_GENERAL_DBUS_PATH] = { "bearer.dbus-path", "dbus path", MMC_S_BEARER_GENERAL, }, + [MMC_F_BEARER_GENERAL_TYPE] = { "bearer.type", "type", MMC_S_BEARER_GENERAL, }, [MMC_F_BEARER_STATUS_CONNECTED] = { "bearer.status.connected", "connected", MMC_S_BEARER_STATUS, }, [MMC_F_BEARER_STATUS_SUSPENDED] = { "bearer.status.suspended", "suspended", MMC_S_BEARER_STATUS, }, [MMC_F_BEARER_STATUS_INTERFACE] = { "bearer.status.interface", "interface", MMC_S_BEARER_STATUS, }, diff --git a/cli/mmcli-output.h b/cli/mmcli-output.h index 374af66f..9264537c 100644 --- a/cli/mmcli-output.h +++ b/cli/mmcli-output.h @@ -197,6 +197,7 @@ typedef enum { MMC_F_FIRMWARE_LIST, /* Bearer general section */ MMC_F_BEARER_GENERAL_DBUS_PATH, + MMC_F_BEARER_GENERAL_TYPE, /* Bearer status section */ MMC_F_BEARER_STATUS_CONNECTED, MMC_F_BEARER_STATUS_SUSPENDED, diff --git a/docs/reference/api/ModemManager-sections.txt b/docs/reference/api/ModemManager-sections.txt index 6848c6cf..a3fafe6b 100644 --- a/docs/reference/api/ModemManager-sections.txt +++ b/docs/reference/api/ModemManager-sections.txt @@ -10,6 +10,7 @@ MM_CHECK_VERSION
mm-enums Flags and Enumerations +MMBearerType MMBearerIpFamily MMBearerIpMethod MMBearerAllowedAuth diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index 69e0731d..bd169db6 100644 --- a/docs/reference/libmm-glib/libmm-glib-sections.txt +++ b/docs/reference/libmm-glib/libmm-glib-sections.txt @@ -984,6 +984,7 @@ mm_bearer_dup_interface mm_bearer_get_connected mm_bearer_get_suspended mm_bearer_get_ip_timeout +mm_bearer_get_bearer_type mm_bearer_peek_ipv4_config mm_bearer_get_ipv4_config mm_bearer_peek_ipv6_config @@ -1385,6 +1386,7 @@ mm_call_audio_format_get_type
mm-enums-types Flags and Enumerations +mm_bearer_type_get_string mm_bearer_ip_method_get_string mm_bearer_ip_family_get_string mm_bearer_allowed_auth_build_string_from_mask @@ -1445,6 +1447,7 @@ mm_sms_cdma_service_category_build_string_from_mask mm_modem_location_source_get_string mm_modem_location_assistance_data_type_get_string mm_modem_contacts_storage_build_string_from_mask +mm_bearer_type_build_string_from_mask mm_bearer_ip_family_build_string_from_mask mm_bearer_ip_method_build_string_from_mask mm_bearer_allowed_auth_get_string @@ -1467,6 +1470,7 @@ mm_call_direction_build_string_from_mask mm_call_state_build_string_from_mask mm_call_state_reason_build_string_from_mask +MM_TYPE_BEARER_TYPE MM_TYPE_BEARER_IP_FAMILY MM_TYPE_BEARER_IP_METHOD MM_TYPE_BEARER_ALLOWED_AUTH @@ -1507,6 +1511,7 @@ MM_TYPE_OMA_SESSION_TYPE MM_TYPE_CALL_DIRECTION MM_TYPE_CALL_STATE MM_TYPE_CALL_STATE_REASON +mm_bearer_type_get_type mm_bearer_ip_family_get_type mm_bearer_ip_method_get_type mm_bearer_allowed_auth_get_type @@ -1596,6 +1601,7 @@ mm_gdbus_bearer_get_properties mm_gdbus_bearer_dup_properties mm_gdbus_bearer_get_connected mm_gdbus_bearer_get_suspended +mm_gdbus_bearer_get_bearer_type mm_gdbus_bearer_get_stats mm_gdbus_bearer_dup_stats @@ -1614,6 +1620,7 @@ mm_gdbus_bearer_set_ip6_config mm_gdbus_bearer_set_ip_timeout mm_gdbus_bearer_set_properties mm_gdbus_bearer_set_suspended +mm_gdbus_bearer_set_bearer_type mm_gdbus_bearer_set_stats mm_gdbus_bearer_override_properties mm_gdbus_bearer_complete_connect diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h index cc78cdc9..8f06bb91 100644 --- a/include/ModemManager-enums.h +++ b/include/ModemManager-enums.h @@ -970,6 +970,28 @@ typedef enum { /*< underscore_name=mm_modem_contacts_storage >*/ MM_MODEM_CONTACTS_STORAGE_MT = 3, } MMModemContactsStorage; +/** + * MMBearerType: + * @MM_BEARER_TYPE_UNKNOWN: Unknown bearer. + * @MM_BEARER_TYPE_DEFAULT: Primary context (2G/3G) or default bearer (4G), + * defined by the user of the API. + * @MM_BEARER_TYPE_DEFAULT_ATTACH: The initial default bearer established + * during LTE attach procedure, automatically connected as long as the device is + * regitered in the LTE network. + * @MM_BEARER_TYPE_DEDICATED: Secondary context (2G/3G) or dedicated bearer + * (4G), defined by the user of the API. These bearers use the same IP address + * used by a primary context or default bearer and provide a dedicated flow for + * specific traffic with different QoS settings. + * + * Type of context (2G/3G) or bearer (4G). + */ +typedef enum { /*< underscore_name=mm_bearer_type >*/ + MM_BEARER_TYPE_UNKNOWN = 0, + MM_BEARER_TYPE_DEFAULT = 1, + MM_BEARER_TYPE_DEFAULT_ATTACH = 2, + MM_BEARER_TYPE_DEDICATED = 3, +} MMBearerType; + /** * MMBearerIpMethod: * @MM_BEARER_IP_METHOD_UNKNOWN: Unknown method. diff --git a/introspection/org.freedesktop.ModemManager1.Bearer.xml b/introspection/org.freedesktop.ModemManager1.Bearer.xml index 2c844abd..e86ef00d 100644 --- a/introspection/org.freedesktop.ModemManager1.Bearer.xml +++ b/introspection/org.freedesktop.ModemManager1.Bearer.xml @@ -279,6 +279,13 @@ --> + + +