MMBearerProperties: libmm-glib Reference Manual

## MMBearerProperties MMBearerProperties — Helper object to handle bearer properties. |

## Functions

MMBearerProperties * | mm_bearer_properties_new ()
const gchar * | mm_bearer_properties_get_apn ()
void | mm_bearer_properties_set_apn ()
MMBearerApnType | mm_bearer_properties_get_apn_type ()
void | mm_bearer_properties_set_apn_type ()
MMBearerAllowedAuth | mm_bearer_properties_get_allowed_auth ()
void | mm_bearer_properties_set_allowed_auth ()
const gchar * | mm_bearer_properties_get_user ()
void | mm_bearer_properties_set_user ()
const gchar * | mm_bearer_properties_get_password ()
void | mm_bearer_properties_set_password ()
MMBearerIpFamily | mm_bearer_properties_get_ip_type ()
void | mm_bearer_properties_set_ip_type ()
gint | mm_bearer_properties_get_profile_id ()
void | mm_bearer_properties_set_profile_id ()
const gchar * | mm_bearer_properties_get_profile_name ()
void | mm_bearer_properties_set_profile_name ()
gboolean | mm_bearer_properties_get_allow_roaming ()
void | mm_bearer_properties_set_allow_roaming ()
MMModemCdmaRmProtocol | mm_bearer_properties_get_rm_protocol ()
void | mm_bearer_properties_set_rm_protocol ()
MMBearerMultiplexSupport | mm_bearer_properties_get_multiplex ()
void | mm_bearer_properties_set_multiplex ()
MMBearerAccessTypePreference | mm_bearer_properties_get_access_type_preference ()
void | mm_bearer_properties_set_access_type_preference ()
MMBearerRoamingAllowance | mm_bearer_properties_get_roaming_allowance ()
void | mm_bearer_properties_set_roaming_allowance ()

## Types and Values

struct | MMBearerProperties

## Object Hierarchy

        GObject
        ╰── MMBearerProperties

## Description

The MMBearerProperties is an object handling the properties requested to ModemManager when creating a new bearer.

This object is created by the user and passed to ModemManager with either `mm_modem_create_bearer()` or `mm_modem_create_bearer_sync()`.

## Functions

### mm_bearer_properties_new ()

    MMBearerProperties *
    mm_bearer_properties_new (void);

Creates a new empty MMBearerProperties.

#### Returns

a MMBearerProperties. The returned value should be freed with `g_object_unref()`.

[transfer full]

Since: 1.0

### mm_bearer_properties_get_apn ()

    const gchar *
    mm_bearer_properties_get_apn (MMBearerProperties *self);

Gets the name of the access point to use when connecting.

#### Parameters

self | a MMBearerProperties. |

#### Returns

the access point, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.0

### mm_bearer_properties_set_apn ()

    void
    mm_bearer_properties_set_apn (MMBearerProperties *self,
                                  const gchar *apn);

Sets the name of the access point to use when connecting.

#### Parameters

self | a MMBearerProperties. |
apn | Name of the access point. |

Since: 1.0

### mm_bearer_properties_get_apn_type ()

    MMBearerApnType
    mm_bearer_properties_get_apn_type (MMBearerProperties *self);

Gets the APN types to use.

#### Parameters

self | a MMBearerProperties. |

#### Returns

a mask of MMBearerApnType values.

Since: 1.18

### mm_bearer_properties_set_apn_type ()

    void
    mm_bearer_properties_set_apn_type (MMBearerProperties *self,
                                       MMBearerApnType apn_type);

Sets the APN types to use.

#### Parameters

self | a MMBearerProperties. |
apn_type | a mask of MMBearerApnType values. |

Since: 1.18

### mm_bearer_properties_get_allowed_auth ()

    MMBearerAllowedAuth
    mm_bearer_properties_get_allowed_auth (MMBearerProperties *self);

Gets the authentication methods allowed in the connection.

#### Parameters

self | a MMBearerProperties. |

#### Returns

a bitmask of MMBearerAllowedAuth values, or `MM_BEARER_ALLOWED_AUTH_UNKNOWN` to request the modem-default method.

Since: 1.0

### mm_bearer_properties_set_allowed_auth ()

    void
    mm_bearer_properties_set_allowed_auth (MMBearerProperties *self,
                                           MMBearerAllowedAuth allowed_auth);

Sets the authentication method to use.

#### Parameters

self | a MMBearerProperties. |
allowed_auth | a bitmask of MMBearerAllowedAuth values. `MM_BEARER_ALLOWED_AUTH_UNKNOWN` may be given to request the modem-default method. |

Since: 1.0

### mm_bearer_properties_get_user ()

    const gchar *
    mm_bearer_properties_get_user (MMBearerProperties *self);

Gets the username used to authenticate with the access point.

#### Parameters

self | a MMBearerProperties. |

#### Returns

the username, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.0

### mm_bearer_properties_set_user ()

    void
    mm_bearer_properties_set_user (MMBearerProperties *self,
                                   const gchar *user);

Sets the username used to authenticate with the access point.

#### Parameters

self | a MMBearerProperties. |
user | the username |

Since: 1.0

### mm_bearer_properties_get_password ()

    const gchar *
    mm_bearer_properties_get_password (MMBearerProperties *self);

Gets the password used to authenticate with the access point.

#### Parameters

self | a MMBearerProperties. |

#### Returns

the password, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.0

### mm_bearer_properties_set_password ()

    void
    mm_bearer_properties_set_password (MMBearerProperties *self,
                                       const gchar *password);

Sets the password used to authenticate with the access point.

#### Parameters

self | a MMBearerProperties. |
password | the password |

Since: 1.0

### mm_bearer_properties_get_ip_type ()

    MMBearerIpFamily
    mm_bearer_properties_get_ip_type (MMBearerProperties *self);

Sets the IP type to use.

#### Parameters

self | a MMBearerProperties. |

#### Returns

a MMBearerIpFamily.

Since: 1.0

### mm_bearer_properties_set_ip_type ()

    void
    mm_bearer_properties_set_ip_type (MMBearerProperties *self,
                                      MMBearerIpFamily ip_type);

Sets the IP type to use.

#### Parameters

self | a MMBearerProperties. |
ip_type | a MMBearerIpFamily. |

Since: 1.0

### mm_bearer_properties_get_profile_id ()

    gint
    mm_bearer_properties_get_profile_id (MMBearerProperties *self);

Gets the profile ID to use.

#### Parameters

self | a MMBearerProperties. |

#### Returns

the profile id.

Since: 1.18

### mm_bearer_properties_set_profile_id ()

    void
    mm_bearer_properties_set_profile_id (MMBearerProperties *self,
                                         gint profile_id);

Sets the profile ID to use.

#### Parameters

self | a MMBearerProperties. |
profile_id | a profile id. |

Since: 1.18

### mm_bearer_properties_get_profile_name ()

    const gchar *
    mm_bearer_properties_get_profile_name (MMBearerProperties *self);

Gets the name of the profile to use when connecting.

#### Parameters

self | a MMBearerProperties. |

#### Returns

the profile name, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.20

### mm_bearer_properties_set_profile_name ()

    void
    mm_bearer_properties_set_profile_name (MMBearerProperties *self,
                                           const gchar *profile_name);

Sets the name of the profile to use when connecting.

#### Parameters

self | a MMBearerProperties. |
profile_name | Name of the profile. |

Since: 1.20

### mm_bearer_properties_get_allow_roaming ()

    gboolean
    mm_bearer_properties_get_allow_roaming
                                   (MMBearerProperties *self);

Checks whether roaming is allowed in the connection.

#### Parameters

self | a MMBearerProperties. |

#### Returns

`TRUE` if roaming is allowed, `FALSE` otherwise.

Since: 1.0

### mm_bearer_properties_set_allow_roaming ()

    void
    mm_bearer_properties_set_allow_roaming
                                   (MMBearerProperties *self,
                                    gboolean allow_roaming);

Sets the flag to indicate whether roaming is allowed or not in the connection.

#### Parameters

self | a MMBearerProperties. |
allow_roaming | boolean value. |

Since: 1.0

### mm_bearer_properties_get_rm_protocol ()

    MMModemCdmaRmProtocol
    mm_bearer_properties_get_rm_protocol (MMBearerProperties *self);

Gets the RM protocol requested to use in the CDMA connection.

#### Parameters

self | a MMBearerProperties. |

#### Returns

a MMModemCdmaRmProtocol.

Since: 1.0

### mm_bearer_properties_set_rm_protocol ()

    void
    mm_bearer_properties_set_rm_protocol (MMBearerProperties *self,
                                          MMModemCdmaRmProtocol protocol);

Sets the RM protocol to use in the CDMA connection.

#### Parameters

self | a MMBearerProperties. |
protocol | a MMModemCdmaRmProtocol. |

Since: 1.0

### mm_bearer_properties_get_multiplex ()

    MMBearerMultiplexSupport
    mm_bearer_properties_get_multiplex (MMBearerProperties *self);

Gets the type of multiplex support requested by the user.

#### Parameters

self | a MMBearerProperties. |

#### Returns

a MMBearerMultiplexSupport.

Since: 1.18

### mm_bearer_properties_set_multiplex ()

    void
    mm_bearer_properties_set_multiplex (MMBearerProperties *self,
                                        MMBearerMultiplexSupport multiplex);

Gets the type of multiplex support requested by the user.

#### Parameters

self | a MMBearerProperties. |
multiplex | a MMBearerMultiplexSupport. |

Since: 1.18

### mm_bearer_properties_get_access_type_preference ()

    MMBearerAccessTypePreference
    mm_bearer_properties_get_access_type_preference
                                   (MMBearerProperties *self);

Gets the 5G network access type preference.

#### Parameters

self | a MMBearerProperties. |

#### Returns

a MMBearerAccessTypePreference value.

Since: 1.20

### mm_bearer_properties_set_access_type_preference ()

    void
    mm_bearer_properties_set_access_type_preference
                                   (MMBearerProperties *self,
                                    MMBearerAccessTypePreference access_type_preference);

Sets the 5G network access type preference.

#### Parameters

self | a MMBearerProperties. |
access_type_preference | a MMBearerAccessTypePreference value. |

Since: 1.20

### mm_bearer_properties_get_roaming_allowance ()

    MMBearerRoamingAllowance
    mm_bearer_properties_get_roaming_allowance
                                   (MMBearerProperties *self);

Gets the roaming allowance rules.

#### Parameters

self | a MMBearerProperties. |

#### Returns

a mask of MMBearerRoamingAllowance values.

Since: 1.20

### mm_bearer_properties_set_roaming_allowance ()

    void
    mm_bearer_properties_set_roaming_allowance
                                   (MMBearerProperties *self,
                                    MMBearerRoamingAllowance roaming_allowance);

Sets the roaming allowance rules.

#### Parameters

self | a MMBearerProperties. |
roaming_allowance | a mask of MMBearerRoamingAllowance values |

Since: 1.20

## Types and Values

### struct MMBearerProperties

    struct MMBearerProperties;

The MMBearerProperties structure contains private data and should only be accessed using the provided API.