From ebd792d2aaa0917a6628eb1f9c1fbeedafbf2617 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sun, 7 Oct 2012 20:19:13 +0200 Subject: 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 Date: Thu Mar 15 16:19:43 2012 -0500 --- libmm-glib/mm-simple-connect-properties.c | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'libmm-glib/mm-simple-connect-properties.c') diff --git a/libmm-glib/mm-simple-connect-properties.c b/libmm-glib/mm-simple-connect-properties.c index bd2355f3..99d7e9a6 100644 --- a/libmm-glib/mm-simple-connect-properties.c +++ b/libmm-glib/mm-simple-connect-properties.c @@ -267,6 +267,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. -- cgit v1.2.3-70-g09d2