aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-11-11 14:46:53 +0100
committerDan Williams <dcbw@redhat.com>2018-12-07 16:20:53 +0000
commitdc154cf005bbcb2f0bd1123093f6ac3c402c4de8 (patch)
tree940cbeb5d4a6dcf7e80e99fe26f82d1ccddff097 /cli
parent46d627ff831b7d4d609060d77cd852f42cfcfa83 (diff)
api,bearer: new 'BearerType' property
Until now we have only allowed to use and setup 'default bearers' (in 4G) or 'primary contexts' (in 2G/3G). We can define a couple of additional bearer types, though: * The 'dedicated bearers' (in 4G) or 'secondary contexts' (in 2G/3G), which are associated to a specific default/primary one, but which provide specific QoS settings configured via traffic flow templates. * The 'initial default EPS bearer', which is a special case of default bearer in LTE, which is automatically created and connected when the modem is registered in the LTE network. This commit introduces a new 'MMBearerType' enumeration that will be associated to each bearer through a 'BearerType' property in the org.freedesktop.ModemManager1.Bearer interface, showing what kind of bearer/context this is. By default, right now, all bearer objects created are 'default' bearers.
Diffstat (limited to 'cli')
-rw-r--r--cli/mmcli-bearer.c1
-rw-r--r--cli/mmcli-output.c1
-rw-r--r--cli/mmcli-output.h1
3 files changed, 3 insertions, 0 deletions
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,