summaryrefslogtreecommitdiff
path: root/libmm-glib/mm-simple-connect-properties.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-10-07 20:19:13 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-10-07 21:12:00 +0200
commitebd792d2aaa0917a6628eb1f9c1fbeedafbf2617 (patch)
treed8b5c542ffaa6951ab7d921427fbd1cfd42ca52e /libmm-glib/mm-simple-connect-properties.c
parent7ae18eecdd3c0aae851441d970b3a54319dd3404 (diff)
downloadModemManager-ebd792d2aaa0917a6628eb1f9c1fbeedafbf2617.tar.gz
api,libmm-glib: new `allowed-auth' configuration for bearers
For bearers using STATIC or DHCP IP method, the modem itself is the one negotiating authentication with the network. The new `allowed-auth' property allows users to specify which authentication method(s) are allowed to be used. See the following NetworkManager commit for more reference: commit 34aef8aaaa09b7473b9496aa49e550bd2def03f8 Author: Andrew Bird <ajb@spheresystems.co.uk> Date: Thu Mar 15 16:19:43 2012 -0500
Diffstat (limited to 'libmm-glib/mm-simple-connect-properties.c')
-rw-r--r--libmm-glib/mm-simple-connect-properties.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/libmm-glib/mm-simple-connect-properties.c b/libmm-glib/mm-simple-connect-properties.c
index bd2355f37..99d7e9a62 100644
--- a/libmm-glib/mm-simple-connect-properties.c
+++ b/libmm-glib/mm-simple-connect-properties.c
@@ -268,6 +268,40 @@ mm_simple_connect_properties_get_apn (MMSimpleConnectProperties *self)
/*****************************************************************************/
/**
+ * mm_simple_connect_properties_set_allowed_auth:
+ * @self: a #MMSimpleConnectProperties.
+ * @allowed_auth: a bitmask of #MMBearerAllowedAuth values. %MM_BEARER_ALLOWED_AUTH_UNKNOWN may be given to request the modem-default method.
+ *
+ * Sets the authentication method to use.
+ */
+void
+mm_simple_connect_properties_set_allowed_auth (MMSimpleConnectProperties *self,
+ MMBearerAllowedAuth allowed_auth)
+{
+ g_return_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self));
+
+ mm_bearer_properties_set_allowed_auth (self->priv->bearer_properties, allowed_auth);
+}
+
+/**
+ * mm_simple_connect_properties_get_allowed_auth:
+ * @self: a #MMSimpleConnectProperties.
+ *
+ * Gets the authentication methods allowed in the connection.
+ *
+ * Returns: a bitmask of #MMBearerAllowedAuth values, or %MM_BEARER_ALLOWED_AUTH_UNKNOWN to request the modem-default method.
+ */
+MMBearerAllowedAuth
+mm_simple_connect_properties_get_allowed_auth (MMSimpleConnectProperties *self)
+{
+ g_return_val_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self), MM_BEARER_ALLOWED_AUTH_UNKNOWN);
+
+ return mm_bearer_properties_get_allowed_auth (self->priv->bearer_properties);
+}
+
+/*****************************************************************************/
+
+/**
* mm_simple_connect_properties_set_user:
* @self: a #MMSimpleConnectProperties.
* @user: the username