bearer-properties: Add profile-name to the bearer properties
This commit is contained in:

committed by
Aleksander Morgado

parent
b2a7591bcf
commit
c355210f5d
@@ -1238,6 +1238,8 @@ mm_bearer_properties_get_ip_type
|
|||||||
mm_bearer_properties_set_ip_type
|
mm_bearer_properties_set_ip_type
|
||||||
mm_bearer_properties_get_profile_id
|
mm_bearer_properties_get_profile_id
|
||||||
mm_bearer_properties_set_profile_id
|
mm_bearer_properties_set_profile_id
|
||||||
|
mm_bearer_properties_get_profile_name
|
||||||
|
mm_bearer_properties_set_profile_name
|
||||||
mm_bearer_properties_get_allow_roaming
|
mm_bearer_properties_get_allow_roaming
|
||||||
mm_bearer_properties_set_allow_roaming
|
mm_bearer_properties_set_allow_roaming
|
||||||
mm_bearer_properties_get_rm_protocol
|
mm_bearer_properties_get_rm_protocol
|
||||||
|
@@ -454,6 +454,14 @@
|
|||||||
indicate an invalid or uninitialized profile id. Since 1.18.
|
indicate an invalid or uninitialized profile id. Since 1.18.
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"profile-name"</literal></term>
|
||||||
|
<listitem><para>
|
||||||
|
The name of the profile, given as a string
|
||||||
|
value (signature <literal>"s"</literal>).
|
||||||
|
This value has no effect on the connection, but can be used by the host
|
||||||
|
to identify the profiles. Since 1.20.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
The following settings apply to 3GPP2 (CDMA/EVDO) devices:
|
The following settings apply to 3GPP2 (CDMA/EVDO) devices:
|
||||||
|
@@ -55,6 +55,44 @@ struct _MMBearerPropertiesPrivate {
|
|||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mm_bearer_properties_set_profile_name:
|
||||||
|
* @self: a #MMBearerProperties.
|
||||||
|
* @profile_name: Name of the profile.
|
||||||
|
*
|
||||||
|
* Sets the name of the profile to use when connecting.
|
||||||
|
*
|
||||||
|
* Since: 1.20
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
mm_bearer_properties_set_profile_name (MMBearerProperties *self,
|
||||||
|
const gchar *profile_name)
|
||||||
|
{
|
||||||
|
g_return_if_fail (MM_IS_BEARER_PROPERTIES (self));
|
||||||
|
|
||||||
|
mm_3gpp_profile_set_profile_name (self->priv->profile, profile_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mm_bearer_properties_get_profile_name:
|
||||||
|
* @self: a #MMBearerProperties.
|
||||||
|
*
|
||||||
|
* Gets the name of the profile to use when connecting.
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): the profile name, or #NULL if not set. Do not free
|
||||||
|
* the returned value, it is owned by @self.
|
||||||
|
*
|
||||||
|
* Since: 1.20
|
||||||
|
*/
|
||||||
|
const gchar *
|
||||||
|
mm_bearer_properties_get_profile_name (MMBearerProperties *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (MM_IS_BEARER_PROPERTIES (self), NULL);
|
||||||
|
|
||||||
|
return mm_3gpp_profile_get_profile_name (self->priv->profile);
|
||||||
|
}
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mm_bearer_properties_set_apn:
|
* mm_bearer_properties_set_apn:
|
||||||
* @self: a #MMBearerProperties.
|
* @self: a #MMBearerProperties.
|
||||||
@@ -784,6 +822,9 @@ mm_bearer_properties_cmp (MMBearerProperties *a,
|
|||||||
if (!(flags & MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PROFILE_ID) &&
|
if (!(flags & MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PROFILE_ID) &&
|
||||||
(mm_3gpp_profile_get_profile_id (a->priv->profile) != mm_3gpp_profile_get_profile_id (b->priv->profile)))
|
(mm_3gpp_profile_get_profile_id (a->priv->profile) != mm_3gpp_profile_get_profile_id (b->priv->profile)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (!(flags & MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PROFILE_NAME) &&
|
||||||
|
!cmp_str (mm_3gpp_profile_get_profile_name (a->priv->profile), mm_3gpp_profile_get_profile_name (b->priv->profile), flags))
|
||||||
|
return FALSE;
|
||||||
if (!(flags & MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ALLOW_ROAMING)) {
|
if (!(flags & MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ALLOW_ROAMING)) {
|
||||||
if (a->priv->allow_roaming != b->priv->allow_roaming)
|
if (a->priv->allow_roaming != b->priv->allow_roaming)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -73,6 +73,8 @@ void mm_bearer_properties_set_apn_type (MMBearerProperties *self,
|
|||||||
MMBearerApnType apn_type);
|
MMBearerApnType apn_type);
|
||||||
void mm_bearer_properties_set_profile_id (MMBearerProperties *self,
|
void mm_bearer_properties_set_profile_id (MMBearerProperties *self,
|
||||||
gint profile_id);
|
gint profile_id);
|
||||||
|
void mm_bearer_properties_set_profile_name (MMBearerProperties *self,
|
||||||
|
const gchar *profile_name);
|
||||||
void mm_bearer_properties_set_allow_roaming (MMBearerProperties *self,
|
void mm_bearer_properties_set_allow_roaming (MMBearerProperties *self,
|
||||||
gboolean allow_roaming);
|
gboolean allow_roaming);
|
||||||
void mm_bearer_properties_set_rm_protocol (MMBearerProperties *self,
|
void mm_bearer_properties_set_rm_protocol (MMBearerProperties *self,
|
||||||
@@ -87,6 +89,7 @@ const gchar *mm_bearer_properties_get_password (MMBearerProper
|
|||||||
MMBearerIpFamily mm_bearer_properties_get_ip_type (MMBearerProperties *self);
|
MMBearerIpFamily mm_bearer_properties_get_ip_type (MMBearerProperties *self);
|
||||||
MMBearerApnType mm_bearer_properties_get_apn_type (MMBearerProperties *self);
|
MMBearerApnType mm_bearer_properties_get_apn_type (MMBearerProperties *self);
|
||||||
gint mm_bearer_properties_get_profile_id (MMBearerProperties *self);
|
gint mm_bearer_properties_get_profile_id (MMBearerProperties *self);
|
||||||
|
const gchar *mm_bearer_properties_get_profile_name (MMBearerProperties *self);
|
||||||
gboolean mm_bearer_properties_get_allow_roaming (MMBearerProperties *self);
|
gboolean mm_bearer_properties_get_allow_roaming (MMBearerProperties *self);
|
||||||
MMModemCdmaRmProtocol mm_bearer_properties_get_rm_protocol (MMBearerProperties *self);
|
MMModemCdmaRmProtocol mm_bearer_properties_get_rm_protocol (MMBearerProperties *self);
|
||||||
MMBearerMultiplexSupport mm_bearer_properties_get_multiplex (MMBearerProperties *self);
|
MMBearerMultiplexSupport mm_bearer_properties_get_multiplex (MMBearerProperties *self);
|
||||||
@@ -126,6 +129,7 @@ typedef enum {
|
|||||||
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_RM_PROTOCOL = 1 << 3,
|
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_RM_PROTOCOL = 1 << 3,
|
||||||
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_APN_TYPE = 1 << 4,
|
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_APN_TYPE = 1 << 4,
|
||||||
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PROFILE_ID = 1 << 5,
|
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PROFILE_ID = 1 << 5,
|
||||||
|
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PROFILE_NAME = 1 << 6,
|
||||||
} MMBearerPropertiesCmpFlags;
|
} MMBearerPropertiesCmpFlags;
|
||||||
|
|
||||||
gboolean mm_bearer_properties_cmp (MMBearerProperties *a,
|
gboolean mm_bearer_properties_cmp (MMBearerProperties *a,
|
||||||
|
Reference in New Issue
Block a user