diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-02-17 15:31:08 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-02-17 23:41:24 +0100 |
commit | 6dd5ced86d80c695be9898b9ac4ea3e50ff64f32 (patch) | |
tree | 24d279f2ec38c2014d0443bed017d6af55676577 | |
parent | c4f215c9cb2d8497e7ebfea2904563526bb08d90 (diff) |
libmm-glib,simple-connect-properties: add missing APIs to get/set RM protocol
Probably not a big deal, since no one has asked for these in the past
years, but let's add them for completeness with the DBus API.
-rw-r--r-- | docs/reference/libmm-glib/libmm-glib-sections.txt | 2 | ||||
-rw-r--r-- | libmm-glib/mm-simple-connect-properties.c | 37 | ||||
-rw-r--r-- | libmm-glib/mm-simple-connect-properties.h | 21 |
3 files changed, 51 insertions, 9 deletions
diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index 7fc82f91..0a72befa 100644 --- a/docs/reference/libmm-glib/libmm-glib-sections.txt +++ b/docs/reference/libmm-glib/libmm-glib-sections.txt @@ -870,6 +870,8 @@ mm_simple_connect_properties_get_ip_type mm_simple_connect_properties_set_ip_type mm_simple_connect_properties_get_allow_roaming mm_simple_connect_properties_set_allow_roaming +mm_simple_connect_properties_get_rm_protocol +mm_simple_connect_properties_set_rm_protocol mm_simple_connect_properties_get_number mm_simple_connect_properties_set_number <SUBSECTION Private> diff --git a/libmm-glib/mm-simple-connect-properties.c b/libmm-glib/mm-simple-connect-properties.c index 5b9af11a..fd256513 100644 --- a/libmm-glib/mm-simple-connect-properties.c +++ b/libmm-glib/mm-simple-connect-properties.c @@ -364,6 +364,43 @@ mm_simple_connect_properties_get_allow_roaming (MMSimpleConnectProperties *self) return mm_bearer_properties_get_allow_roaming (self->priv->bearer_properties); } +/*****************************************************************************/ + +/** + * mm_simple_connect_properties_set_rm_protocol: + * @self: a #MMSimpleConnectProperties. + * @protocol: a #MMModemCdmaRmProtocol. + * + * Sets the RM protocol requested by the user. + * + * Since: 1.16 + */ +void +mm_simple_connect_properties_set_rm_protocol (MMSimpleConnectProperties *self, + MMModemCdmaRmProtocol protocol) +{ + g_return_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self)); + + mm_bearer_properties_set_rm_protocol (self->priv->bearer_properties, protocol); +} + +/** + * mm_simple_connect_properties_get_rm_protocol: + * @self: a #MMSimpleConnectProperties. + * + * Get the RM protocol requested by the user. + * + * Returns: a #MMModemCdmaRmProtocol. + * + * Since: 1.16 + */ +MMModemCdmaRmProtocol +mm_simple_connect_properties_get_rm_protocol (MMSimpleConnectProperties *self) +{ + g_return_val_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self), MM_MODEM_CDMA_RM_PROTOCOL_UNKNOWN); + + return mm_bearer_properties_get_rm_protocol (self->priv->bearer_properties); +} /*****************************************************************************/ diff --git a/libmm-glib/mm-simple-connect-properties.h b/libmm-glib/mm-simple-connect-properties.h index c8f24efa..d56f64f2 100644 --- a/libmm-glib/mm-simple-connect-properties.h +++ b/libmm-glib/mm-simple-connect-properties.h @@ -76,15 +76,18 @@ void mm_simple_connect_properties_set_ip_type (MMSimpleConnectProperties * MMBearerIpFamily ip_type); void mm_simple_connect_properties_set_allow_roaming (MMSimpleConnectProperties *self, gboolean allow_roaming); - -const gchar *mm_simple_connect_properties_get_pin (MMSimpleConnectProperties *self); -const gchar *mm_simple_connect_properties_get_operator_id (MMSimpleConnectProperties *self); -const gchar *mm_simple_connect_properties_get_apn (MMSimpleConnectProperties *self); -MMBearerAllowedAuth mm_simple_connect_properties_get_allowed_auth (MMSimpleConnectProperties *self); -const gchar *mm_simple_connect_properties_get_user (MMSimpleConnectProperties *self); -const gchar *mm_simple_connect_properties_get_password (MMSimpleConnectProperties *self); -MMBearerIpFamily mm_simple_connect_properties_get_ip_type (MMSimpleConnectProperties *self); -gboolean mm_simple_connect_properties_get_allow_roaming (MMSimpleConnectProperties *self); +void mm_simple_connect_properties_set_rm_protocol (MMSimpleConnectProperties *self, + MMModemCdmaRmProtocol protocol); + +const gchar *mm_simple_connect_properties_get_pin (MMSimpleConnectProperties *self); +const gchar *mm_simple_connect_properties_get_operator_id (MMSimpleConnectProperties *self); +const gchar *mm_simple_connect_properties_get_apn (MMSimpleConnectProperties *self); +MMBearerAllowedAuth mm_simple_connect_properties_get_allowed_auth (MMSimpleConnectProperties *self); +const gchar *mm_simple_connect_properties_get_user (MMSimpleConnectProperties *self); +const gchar *mm_simple_connect_properties_get_password (MMSimpleConnectProperties *self); +MMBearerIpFamily mm_simple_connect_properties_get_ip_type (MMSimpleConnectProperties *self); +gboolean mm_simple_connect_properties_get_allow_roaming (MMSimpleConnectProperties *self); +MMModemCdmaRmProtocol mm_simple_connect_properties_get_rm_protocol (MMSimpleConnectProperties *self); #ifndef MM_DISABLE_DEPRECATED G_DEPRECATED |